From: H.J. Lu Date: Tue, 3 Sep 2013 17:38:57 +0000 (+0000) Subject: Use relative relocation for R_X86_64_32 on x32 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b14016f0b25bcd9e8d44998abb8e46372bbbcef5;p=binutils-gdb.git Use relative relocation for R_X86_64_32 on x32 2013-09-03 Pavel Chupin PR gold/15927 * x86_64.cc (Target_x86_64::Scan::global): Use relative relocation for R_X86_64_32 on x32. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index df61e9ccbd6..ed8105d0229 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2013-09-03 Pavel Chupin + + PR gold/15927 + * x86_64.cc (Target_x86_64::Scan::global): Use relative + relocation for R_X86_64_32 on x32. + 2013-08-27 Roland McGrath * output.cc (Output_segment::set_section_addresses): Take new diff --git a/gold/x86_64.cc b/gold/x86_64.cc index dca60222715..5bf78fdef7f 100644 --- a/gold/x86_64.cc +++ b/gold/x86_64.cc @@ -2742,7 +2742,8 @@ Target_x86_64::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);