[CRIU] Re: [PATCH 2/5] make: Generate offsets from linked files only
Pavel Emelyanov
xemul at parallels.com
Wed Apr 18 08:17:01 EDT 2012
> @@ -89,7 +89,8 @@ parasite-util-net.o: util-net.c
>
> $(HEAD-BIN): $(PIE-LDS) $(OBJS-BLOB) parasite-util-net.o
> $(E) " GEN " $@
> - $(Q) $(LD) -T $(PIE-LDS) $(OBJS-BLOB) parasite-util-net.o -o $@
> + $(Q) $(LD) --oformat=binary -T $(PIE-LDS) $(OBJS-BLOB) parasite-util-net.o -o $@
> + $(Q) $(LD) --oformat=elf64-x86-64 -T $(PIE-LDS) $(OBJS-BLOB) parasite-util-net.o -o $@.o
>
> $(HEAD-BLOB-GEN): $(HEAD-BIN) $(GEN-OFFSETS)
> $(E) " GEN " $@
I don't like that we build two files in one rule out of the same sources. Let's better do it
like this:
parasite.bin.o: pie.lds.S objs
ld --oformat=elf64-x86-64 -T pie.lds.S objs -o $@
parasite.bin: parasite.bin.o
ld -b elf64-x86-64 --oformat=binary -T pie.lds.S $< -o $@
This should work, no?
If yes, then plz make %.bin: %.bin.o dependence with one rule for both parasite and restorer.
Thanks,
Pavel
More information about the CRIU
mailing list