• Cyrill Gorcunov's avatar
    make: Generate offsets from linked files only · 4a2a2901
    Cyrill Gorcunov authored
    Instead of generating offsets from early compiled
    object files (one day the offsets obtained from
    there might be changed during linkage stage) better
    to get them from a final stage where all object
    files involved are linked into complete binary blob.
    
    That happened that at early stage we indeed were using
    only single file per parasite and restorer but at present
    there a couple of file involved (and will be more in
    future) so we need a safe approach.
    
    Also note the symbols being exported are prefixed as
    "__export_". This is easier approach for now. Putting
    such symbols into separate section requires a way
    more efforts to handle.
    
    The main reason of having two files (Elf object
    and binary blob) is to get 1:1 mapping between
    symbols definition and their position in binary
    target.
    
    The exported symbols name addresses are obtained
    from object file and used as offsets in binary
    target.
    Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    4a2a2901
pie.lds.S 298 Bytes