Dear uclibc-ng devs,
The LLVM linker seems to be quite clever. When resolving relocations, accesses to the GOT are potentially replaced by PC relative addressing to the requested symbol. This breaks the old method of calculating the load address by using an unrelocated GOT entry value. Instead, rely on __ehdr_start having a link address of zero.The LLVM linker seems to be quite clever. When resolving relocations, accesses to the GOT are potentially replaced by PC relative addressing to the requested symbol. This breaks the old method of calculating the load address by using an unrelocated GOT entry value. Instead, rely on __ehdr_start having a link address of zero.
The patch is attached.
Best regards,
- Marcus