Fix gold error: hidden symbol '...' is not defined locally
authorAlan Modra <amodra@gmail.com>
Wed, 18 Feb 2015 12:06:35 +0000 (22:36 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 18 Feb 2015 12:21:14 +0000 (22:51 +1030)
Found when applying relocs in .debug that reference removed functions.

PR 17954
* powerpc.cc (Global_symbol_visitor_opd::operator()): Set default
visibility.

gold/ChangeLog
gold/powerpc.cc

index 56696350830b33f384c6923bf1bc4bda0f40f698..71a5ab2281262b7e0e2c6c08ce5d42e18f1b9e5a 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-18  Alan Modra  <amodra@gmail.com>
+
+       PR 17954
+       * powerpc.cc (Global_symbol_visitor_opd::operator()): Set default
+       visibility.
+
 2015-02-17  Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
 
        * gc.h (Garbage_collection::add_reference): Don't use find.
index ac8d05b0a5b57785cfeaf18c5e1edf2b42d95ad1..4deb5afbb4b308c3c1323b2729a008543836b3a9 100644 (file)
@@ -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);
       }