Skip to content
Commit 37904cc9 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov
Browse files

criu/pie/Makefile: simplify and fix



The way criu/pie/Makefile is currently written, ld is run twice:

 1. link $(NAME-obj-y) objects to NAME.built-in.o

 2. link NAME.built-in.o, pie.lib.a, and compel plugins
    to NAME.built-in.bin.o (with compel ldflags and linker script)

There is absolutely no need for such two-stage linking, but it was OK.
It is not OK now, as "compel ldflags" for ARM doesn't need -r, and we
can't run the first stage with -r and the second stage without it.

So, let's simplify linking using a single ld invocation. This is my
third attempt in doing it, I think I nailed it this time -- it is now
clean and (relatively) simple.

While at it:
 - fix compel linker script dependency (it was not working);
 - rearrange the Makefile so variables goes first, then rules;
 - remove a comment about mount implementation in restorer.

NOTE that compel is called with ./ prefix so the file paths it prints
are also prefixed with ./, which is needed for objectify macro to ignore
those.

Acked-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: default avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: default avatarAndrei Vagin <avagin@virtuozzo.com>
parent 9cf884f0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment