[CRIU] [PATCH 1/8] piegen: Implement tool building, v2

Cyrill Gorcunov gorcunov at gmail.com
Wed May 13 01:40:10 PDT 2015


On Wed, May 13, 2015 at 10:29:50AM +0200, Laurent Dufour wrote:
> > 
> > Would attached be more convenient for you? (Pushed it into ia32 branch)
> 
> I think it would be nice to share some definition between piegen/elf.c
> and the processing code since the first one is building data for the
> second one.
> 
> I'd rather though at something like that - file names are just proposal ;) :
> 
> - pie/parasite-reloc.c
> Containing the C code used to process relocation at loading time.
> 
> - pie/parasite-reloc.h
> The header file containing definition used by parasite-reloc.c and by
> piegen/elf.c to create the relocation data (the struct elf_reloc_t and
> the type definition).
> 
> - pie/parasite-reloc-data.c
> - pie/restorer-reloc-data.c
> These files are generated by piegen at build time. The name of the
> generated elf_reloc_t variable would have to be different to avoid name
> conflict. I think we should prefix them based on the blob's name. For
> instance:
> 	parasite_relocs
> 	parasite_nr_gotpcrel
> 	parasite_blob
> 
> Then, in the Makefile we build pie/parasite-reloc.c,
> pie/restorer-reloc-data.c and link them. At run time we call the
> parasite-reloc's code passing the data corresponding to the loaded blob
> (parasite or restorer).

Sure, thanks. Will do something like that.


More information about the CRIU mailing list