mirror of git://sourceware.org/git/glibc.git
x86-64: Ignore r_addend for R_X86_64_GLOB_DAT/R_X86_64_JUMP_SLOT
According to x86-64 psABI, r_addend should be ignored for R_X86_64_GLOB_DAT and R_X86_64_JUMP_SLOT. Since linkers always set their r_addends to 0, we can ignore their r_addends. Reviewed-by: Fangrui Song <maskray@google.com>
This commit is contained in:
parent
9c66efb86f
commit
f8587a6189
|
@ -325,11 +325,13 @@ and creates an unsatisfiable circular dependency.\n",
|
||||||
# endif
|
# endif
|
||||||
/* Set to symbol size plus addend. */
|
/* Set to symbol size plus addend. */
|
||||||
value = sym->st_size;
|
value = sym->st_size;
|
||||||
|
*reloc_addr = value + reloc->r_addend;
|
||||||
|
break;
|
||||||
# endif
|
# endif
|
||||||
/* Fall through. */
|
|
||||||
case R_X86_64_GLOB_DAT:
|
case R_X86_64_GLOB_DAT:
|
||||||
case R_X86_64_JUMP_SLOT:
|
case R_X86_64_JUMP_SLOT:
|
||||||
*reloc_addr = value + reloc->r_addend;
|
*reloc_addr = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R_X86_64_DTPMOD64:
|
case R_X86_64_DTPMOD64:
|
||||||
|
|
Loading…
Reference in New Issue