From e88ba8d56975c6d5d7c6ba83fc146ab6e89510d5 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 13 Nov 2014 11:36:57 -0800 Subject: Don't make PLT entry for R_X86_64_GOTPLT64 * x86_64.cc (Target_x86_64::Scan::global): Don't make PLT entry for R_X86_64_GOTPLT64. (Target_x86_64::Relocate::relocate): Update comments for R_X86_64_GOTPLT64. --- gold/x86_64.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'gold/x86_64.cc') diff --git a/gold/x86_64.cc b/gold/x86_64.cc index f58c843..1fb601d 100644 --- a/gold/x86_64.cc +++ b/gold/x86_64.cc @@ -2923,11 +2923,6 @@ Target_x86_64::Scan::global(Symbol_table* symtab, } } } - // For GOTPLT64, we also need a PLT entry (but only if the - // symbol is not fully resolved). - if (r_type == elfcpp::R_X86_64_GOTPLT64 - && !gsym->final_value_is_known()) - target->make_plt_entry(symtab, layout, gsym); } break; @@ -3454,9 +3449,9 @@ Target_x86_64::Relocate::relocate( break; case elfcpp::R_X86_64_GOT64: - // The ABI doc says "Like GOT64, but indicates a PLT entry is needed." - // Since we always add a PLT entry, this is equivalent. case elfcpp::R_X86_64_GOTPLT64: + // R_X86_64_GOTPLT64 is obsolete and treated the the same as + // GOT64. gold_assert(have_got_offset); Relocate_functions::rela64(view, got_offset, addend); break; -- cgit v1.1