load-time ELF relocation

前端 未结 2 1242
无人及你
无人及你 2021-01-31 19:43

I am writing a simple user-space ELF loader under Linux (why? for \'fun\'). My loader at the moment is quite simple and is designed to load only statically-linked ELF files con

2条回答
  •  滥情空心
    2021-01-31 20:21

    If you modify the absolute addresses available in the .got section, (global offset table) your program should work. Make sure to modify the absolute address calculation to cater for the new distance between .text and .data, I'm afraid you need to figure out where this information comes from, for your architecture.

    See this: Global Offset Table (Processor-Specific)

    Good luck.

提交回复
热议问题