[PATCH] D15235: [ELF] - Implemented R_*_IRELATIVE relocations for x86, x64 targets.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 02:15:02 PST 2015


grimar added a comment.

In http://reviews.llvm.org/D15235#305015, @ruiu wrote:

> I'm not still sure if these relocations have to be handled by the linker. These relocations use runtime addresses, so only the dynamic linker has to handle them, no?


Yes, and I dont handle them in this patch. Patch only creates it:
If we see the call to function of type STT_GNU_IFUNC then R_*_IRELATIVE relocation should be created and added to RelaPlt. These relocations always uses PLT entry which is also created. Without that logic even sample app from patch summary would not work correctly.

Also __rel_iplt_end/__rel_iplt_star symbols are added to point on start/end of section holding these relocations. The multi-arch libc will use these symbols to locate these relocations at program startup time.

Just in case both gold and bfd implements the same logic.


http://reviews.llvm.org/D15235





More information about the llvm-commits mailing list