2009-12-04 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 5 Dec 2009 07:28:45 +0000 (07:28 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 5 Dec 2009 07:28:45 +0000 (07:28 +0000)
* resolve.cc (symbol_to_bits): Treat STB_GNU_UNIQUE as STB_GLOBAL.
(Symbol_table::override_with_special): Likewise.
(Symbol_table::add_from_object): Likewise.

gold/ChangeLog
gold/resolve.cc
gold/symtab.cc

index 084bd91ca6badef961ff5b14853707b66da01287..36803df08b195686a07c646b96a45a3d2a3292ec 100644 (file)
@@ -1,3 +1,9 @@
+2009-12-04  H.J. Lu  <hongjiu.lu@intel.com>
+       * resolve.cc (symbol_to_bits): Treat STB_GNU_UNIQUE as STB_GLOBAL.
+       (Symbol_table::override_with_special): Likewise.
+       (Symbol_table::add_from_object): Likewise.
+
 2009-12-04  Rafael Avila de Espindola  <espindola@google.com>
 
        * incremental.cc (Incremental_inputs::sized_create_inputs_section_data):
index 2f0479ac85c65f73ecb4e81a3fd1d55fc645a18f..89b10b9f9a8a8c3edbdc0360d12b07106527ca6a 100644 (file)
@@ -178,6 +178,7 @@ symbol_to_bits(elfcpp::STB binding, bool is_dynamic,
   switch (binding)
     {
     case elfcpp::STB_GLOBAL:
+    case elfcpp::STB_GNU_UNIQUE:
       bits = global_flag;
       break;
 
@@ -883,6 +884,7 @@ Symbol_table::override_with_special(Sized_symbol<size>* tosym,
       || ((tosym->visibility() == elfcpp::STV_HIDDEN
           || tosym->visibility() == elfcpp::STV_INTERNAL)
          && (tosym->binding() == elfcpp::STB_GLOBAL
+             || tosym->binding() == elfcpp::STB_GNU_UNIQUE
              || tosym->binding() == elfcpp::STB_WEAK)
          && !parameters->options().relocatable()))
     this->force_local(tosym);
index dd521456077b6e3508b61c482a5ba7f83204be29..7427f8e03f9fe70f6dc84f64c274c88ff8b323c7 100644 (file)
@@ -1010,6 +1010,7 @@ Symbol_table::add_from_object(Object* object,
   if ((ret->visibility() == elfcpp::STV_HIDDEN
        || ret->visibility() == elfcpp::STV_INTERNAL)
       && (ret->binding() == elfcpp::STB_GLOBAL
+         || ret->binding() == elfcpp::STB_GNU_UNIQUE
          || ret->binding() == elfcpp::STB_WEAK)
       && !parameters->options().relocatable())
     this->force_local(ret);