From e3ee8ed41b6a4365897d776cc181a1bd813010c6 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 18 Feb 2015 22:36:35 +1030 Subject: [PATCH] Fix gold error: hidden symbol '...' is not defined locally Found when applying relocs in .debug that reference removed functions. PR 17954 * powerpc.cc (Global_symbol_visitor_opd::operator()): Set default visibility. --- gold/ChangeLog | 6 ++++++ gold/powerpc.cc | 1 + 2 files changed, 7 insertions(+) diff --git a/gold/ChangeLog b/gold/ChangeLog index 56696350830..71a5ab22812 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2015-02-18 Alan Modra + + PR 17954 + * powerpc.cc (Global_symbol_visitor_opd::operator()): Set default + visibility. + 2015-02-17 Rafael Ávila de Espíndola * gc.h (Garbage_collection::add_reference): Don't use find. diff --git a/gold/powerpc.cc b/gold/powerpc.cc index ac8d05b0a5b..4deb5afbb4b 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -6551,6 +6551,7 @@ class Global_symbol_visitor_opd && symobj->get_opd_discard(sym->value())) { sym->set_undefined(); + sym->set_visibility(elfcpp::STV_DEFAULT); sym->set_is_defined_in_discarded_section(); sym->set_symtab_index(-1U); } -- 2.30.2