]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gold/symtab.h
From Cary Coutant: preliminary shared library support.
[thirdparty/binutils-gdb.git] / gold / symtab.h
index b46510d4c9dd563e04438634d121e903d9725161..d8e68a0276975c2767cf29532f66e4ab2aa4c3d2 100644 (file)
@@ -220,6 +220,11 @@ class Symbol
   set_needs_dynsym_entry()
   { this->needs_dynsym_entry_ = true; }
 
+  // Return whether this symbol should be added to the dynamic symbol
+  // table.
+  bool
+  should_add_dynsym_entry() const;
+
   // Return whether this symbol has been seen in a regular object.
   bool
   in_reg() const
@@ -395,6 +400,16 @@ class Symbol
             || this->visibility_ == elfcpp::STV_PROTECTED);
   }
 
+  // Return true if this symbol can be preempted by a definition in
+  // another link unit.
+  bool
+  is_preemptible() const
+  {
+    return (this->visibility_ != elfcpp::STV_INTERNAL
+            && this->visibility_ != elfcpp::STV_HIDDEN
+            && this->visibility_ != elfcpp::STV_PROTECTED);
+  }
+
   // Return whether there should be a warning for references to this
   // symbol.
   bool