[ARC] Don't check extAuxRegister second argument for sign.
[deliverable/binutils-gdb.git] / gold / symtab.cc
index a53f6c93fb472f5f10522c0e2155448df261167a..c872f47d38638540278e1dcc05caee1195d88f5d 100644 (file)
@@ -80,6 +80,7 @@ Symbol::init_fields(const char* name, const char* version,
   this->undef_binding_set_ = false;
   this->undef_binding_weak_ = false;
   this->is_predefined_ = false;
+  this->is_protected_ = false;
 }
 
 // Return the demangled version of the symbol's name, but only
@@ -865,6 +866,9 @@ Symbol_table::define_default_version(Sized_symbol<size>* sym,
       // other is defined in a shared object, then they are different
       // symbols.
 
+      // If the two symbols are from different shared objects,
+      // they are different symbols.
+
       // Otherwise, we just resolve the symbols as though they were
       // the same.
 
@@ -876,6 +880,11 @@ Symbol_table::define_default_version(Sized_symbol<size>* sym,
       else if (pdef->second->visibility() != elfcpp::STV_DEFAULT
               && sym->is_from_dynobj())
        ;
+      else if (pdef->second->is_from_dynobj()
+              && sym->is_from_dynobj()
+              && pdef->second->is_defined()
+              && pdef->second->object() != sym->object())
+        ;
       else
        {
          const Sized_symbol<size>* symdef;
@@ -1317,6 +1326,9 @@ Symbol_table::add_from_relobj(
       res = this->add_from_object(relobj, name, name_key, ver, ver_key,
                                  is_default_version, *psym, st_shndx,
                                  is_ordinary, orig_st_shndx);
+
+      if (res == NULL)
+       continue;
       
       if (is_forced_local)
        this->force_local(res);
@@ -1398,6 +1410,9 @@ Symbol_table::add_from_pluginobj(
                              is_default_version, *sym, st_shndx,
                              is_ordinary, st_shndx);
 
+  if (res == NULL)
+    return NULL;
+
   if (is_forced_local)
     this->force_local(res);
 
@@ -1594,6 +1609,9 @@ Symbol_table::add_from_dynobj(
            }
        }
 
+      if (res == NULL)
+       continue;
+
       // Note that it is possible that RES was overridden by an
       // earlier object, in which case it can't be aliased here.
       if (st_shndx != elfcpp::SHN_UNDEF
@@ -1603,6 +1621,13 @@ Symbol_table::add_from_dynobj(
          && res->object() == dynobj)
        object_symbols.push_back(res);
 
+      // If the symbol has protected visibility in the dynobj,
+      // mark it as such if it was not overridden.
+      if (res->source() == Symbol::FROM_OBJECT
+          && res->object() == dynobj
+          && sym.get_st_visibility() == elfcpp::STV_PROTECTED)
+        res->set_is_protected();
+
       if (sympointers != NULL)
        (*sympointers)[i] = res;
     }
@@ -1625,7 +1650,6 @@ Symbol_table::add_from_incrobj(
 
   Stringpool::Key ver_key = 0;
   bool is_default_version = false;
-  bool is_forced_local = false;
 
   Stringpool::Key name_key;
   name = this->namepool_.add(name, true, &name_key);
@@ -1635,9 +1659,6 @@ Symbol_table::add_from_incrobj(
                              is_default_version, *sym, st_shndx,
                              is_ordinary, st_shndx);
 
-  if (is_forced_local)
-    this->force_local(res);
-
   return res;
 }
 
@@ -3817,6 +3838,21 @@ Sized_symbol<32>::init_output_data(const char* name, const char* version,
                                   unsigned char nonvis,
                                   bool offset_is_from_end,
                                   bool is_predefined);
+
+template
+void
+Sized_symbol<32>::init_constant(const char* name, const char* version,
+                               Value_type value, Size_type symsize,
+                               elfcpp::STT type, elfcpp::STB binding,
+                               elfcpp::STV visibility, unsigned char nonvis,
+                               bool is_predefined);
+
+template
+void
+Sized_symbol<32>::init_undefined(const char* name, const char* version,
+                                Value_type value, elfcpp::STT type,
+                                elfcpp::STB binding, elfcpp::STV visibility,
+                                unsigned char nonvis);
 #endif
 
 #if defined(HAVE_TARGET_64_LITTLE) || defined(HAVE_TARGET_64_BIG)
@@ -3830,6 +3866,21 @@ Sized_symbol<64>::init_output_data(const char* name, const char* version,
                                   unsigned char nonvis,
                                   bool offset_is_from_end,
                                   bool is_predefined);
+
+template
+void
+Sized_symbol<64>::init_constant(const char* name, const char* version,
+                               Value_type value, Size_type symsize,
+                               elfcpp::STT type, elfcpp::STB binding,
+                               elfcpp::STV visibility, unsigned char nonvis,
+                               bool is_predefined);
+
+template
+void
+Sized_symbol<64>::init_undefined(const char* name, const char* version,
+                                Value_type value, elfcpp::STT type,
+                                elfcpp::STB binding, elfcpp::STV visibility,
+                                unsigned char nonvis);
 #endif
 
 #ifdef HAVE_TARGET_32_LITTLE
This page took 0.024861 seconds and 4 git commands to generate.