diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2013-09-03 17:38:57 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2013-09-03 17:38:57 +0000 |
commit | b14016f0b25bcd9e8d44998abb8e46372bbbcef5 (patch) | |
tree | ed41484a98647b9d1400f955498985abdb8662b0 /gold/x86_64.cc | |
parent | 07107ca6f983e2dde5fa669a56563760a1f44c11 (diff) | |
download | fsf-binutils-gdb-b14016f0b25bcd9e8d44998abb8e46372bbbcef5.zip fsf-binutils-gdb-b14016f0b25bcd9e8d44998abb8e46372bbbcef5.tar.gz fsf-binutils-gdb-b14016f0b25bcd9e8d44998abb8e46372bbbcef5.tar.bz2 |
Use relative relocation for R_X86_64_32 on x32
2013-09-03 Pavel Chupin <pavel.v.chupin@intel.com>
PR gold/15927
* x86_64.cc (Target_x86_64<size>::Scan::global): Use relative
relocation for R_X86_64_32 on x32.
Diffstat (limited to 'gold/x86_64.cc')
-rw-r--r-- | gold/x86_64.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/x86_64.cc b/gold/x86_64.cc index dca6022..5bf78fd 100644 --- a/gold/x86_64.cc +++ b/gold/x86_64.cc @@ -2742,7 +2742,8 @@ Target_x86_64<size>::Scan::global(Symbol_table* symtab, reloc.get_r_offset(), reloc.get_r_addend()); } - else if (r_type == elfcpp::R_X86_64_64 + else if (((size == 64 && r_type == elfcpp::R_X86_64_64) + || (size == 32 && r_type == elfcpp::R_X86_64_32)) && gsym->can_use_relative_reloc(false)) { Reloc_section* rela_dyn = target->rela_dyn_section(layout); |