[CRIU] Building PIE/PIC objects separately

Cyrill Gorcunov gorcunov at gmail.com
Wed Oct 7 06:09:28 PDT 2015


On Wed, Oct 07, 2015 at 03:03:42PM +0200, Laurent Dufour wrote:
> 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).

Hi! You know the former idea was exactly the opposite ;) We
wanted to build them once and reuse it. Could you please
point which exactly problems you're facing?

> 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..

At moment we don't have ability to build same source with different
targets. But if really needed -- make a symlink for source code
file, rename it and define as own file for obj-y or whatever.


More information about the CRIU mailing list