[CRIU] Building PIE/PIC objects separately

Laurent Dufour ldufour at linux.vnet.ibm.com
Wed Oct 7 06:03:42 PDT 2015


Hi,

While investigating the build issue raised on ppc64 by the commit
871da9a11147, I discover that some object are used by criu and the
parasite/restorer binaries.

I think this is wrong since parasite/restore binaries are PIE or
PIC object and are build without the C library (thus belonging on
builtin services like system call, memory or bits operation).

We may build such objects twice:
 1. *normally* to be linked with criu
 2. in PIE or PIC form to be linked with the parasite/restore object

I tried to modify the make files to achieve that, but I didn't find a
clean way to do so. I tried using the keyword obj-ext-src-y as
documented in Documentation/Makefile.build.txt but it failed miserably.

I have to admit that I'm not a make file expert, and I'd appreciate
ideas and advices here.

My goal is to build the following object file in PIE mode for
parasite/restorer and in *normal* way for criu:
	pie/util.c
	pie/util-fd.c
	pie/util-vdso.c

Please advise..

Thanks,
Laurent.



More information about the CRIU mailing list