[JITLink][ELF][x86-64] Adjust addends for R_X86_64_PLT32 relocations.
R_X86_64_PLT32 explicitly represents the '-4' PC-adjustment in the relocation's addend, but JITLink's x86_64::Branch32PCRel includes the PC-adjustment implicitly. We have been zeroing the addend to account for the difference, but this breaks for branches to non-zero offsets past labels. This patch updates the relocation parsing code to unconditionally adjust the offset by '+4' instead. For branches directly to labels the result is still 0, for branches to offsets past labels the result is the correct addend for x86_64::Branch32PCRel.
Loading
Please register or sign in to comment