From: H.J. Lu Date: Fri, 27 Jan 2012 23:26:55 +0000 (+0000) Subject: Support x32 IFUNC function pointer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1bae613c85d3266ff261e36da1625582dd5d2655;p=binutils-gdb.git Support x32 IFUNC function pointer 2012-01-27 H.J. Lu * x86_64.cc (Scan::global): Support x32 IFUNC function pointer. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 8ed05f57c39..627dcb25799 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,7 @@ +2012-01-27 H.J. Lu + + * x86_64.cc (Scan::global): Support x32 IFUNC function pointer. + 2012-01-27 H.J. Lu * configure.ac: Check if -mcmodel=medium works. diff --git a/gold/x86_64.cc b/gold/x86_64.cc index cfc6384cd15..029f89c008e 100644 --- a/gold/x86_64.cc +++ b/gold/x86_64.cc @@ -2476,7 +2476,8 @@ Target_x86_64::Scan::global(Symbol_table* symtab, target->copy_reloc(symtab, layout, object, data_shndx, output_section, gsym, reloc); } - 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->type() == elfcpp::STT_GNU_IFUNC && gsym->can_use_relative_reloc(false) && !gsym->is_from_dynobj()