Gold: Don't fail on R_X86_64_[REX_]GOTPCRELX relocations
This patch updates gold to treat the R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX relocations proposed in https://groups.google.com/forum/#!topic/x86-64-abi/n9AWHogmVY0 the same as R_X86_64_GOTPCREL. FIXME: Gold should perform the transformations as suggested. elfcpp/ * x86_64.h (R_X86_64_GOTPCRELX): New. (R_X86_64_REX_GOTPCRELX): Likewise. gold/ * x86_64.cc (Target_x86_64<size>::Scan::get_reference_flags): Treat R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX the same as R_X86_64_GOTPCREL. (Target_x86_64<size>::Scan::local): Likewise. (Target_x86_64<size>::Scan::possible_function_pointer_reloc): Likewise. (Target_x86_64<size>::Scan::global): Likewise. (Target_x86_64<size>::Relocate::relocate): Likewise. (Target_x86_64<size>::Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
This commit is contained in:
parent
493d4b48de
commit
2891b49104
4 changed files with 40 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* x86_64.h (R_X86_64_GOTPCRELX): New.
|
||||
(R_X86_64_REX_GOTPCRELX): Likewise.
|
||||
|
||||
2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* i386.h (R_386_GOT32X): New.
|
||||
|
|
|
@ -94,6 +94,10 @@ enum
|
|||
R_X86_64_RELATIVE64 = 38, // 64-bit adjust by program base
|
||||
R_X86_64_PC32_BND = 39, // PC relative 32 bit signed with BND prefix
|
||||
R_X86_64_PLT32_BND = 40, // 32 bit PLT address with BND prefix
|
||||
R_X86_64_GOTPCRELX = 41, // 32 bit signed PC relative offset to GOT
|
||||
// without REX prefix, relaxable.
|
||||
R_X86_64_REX_GOTPCRELX = 42, // 32 bit signed PC relative offset to GOT
|
||||
// with REX prefix, relaxable.
|
||||
// GNU vtable garbage collection extensions.
|
||||
R_X86_64_GNU_VTINHERIT = 250,
|
||||
R_X86_64_GNU_VTENTRY = 251
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue