https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter6-54839.html#chapter7-2 states:
64–bit SPARC and 64–bit x86 use only Elf64_Rela relocation entries. Thus, the r_addend member serves as the relocation addend. x86 uses only Elf32_Rel relocation entries. The field to be relocated holds the addend.
There exists an Elf64_Rel
struct, so why isn't it being used on 64-bit x86 targets? Doesn't using Elf64_Rela
only waste space here as the pre-relocation addresses are just ignored (or at least are always 0 from what I've seen in testing)?
Note: r_addend
is omitted in Elf64_Rel
, not simply unused.