*** empty log message ***
[deliverable/binutils-gdb.git] / gold / dynobj.cc
index 78594a95ae6c0adfae40bf43defdb76394517422..a33707b8c812d189a6d4ed0876f858a5f236ccda 100644 (file)
@@ -27,7 +27,6 @@
 
 #include "elfcpp.h"
 #include "parameters.h"
-#include "options.h"
 #include "script.h"
 #include "symtab.h"
 #include "dynobj.h"
@@ -1229,9 +1228,10 @@ Verneed::write(const Stringpool* dynpool, bool is_last,
 
 // Versions methods.
 
-Versions::Versions(const General_options& options, Stringpool* dynpool)
+Versions::Versions(const Version_script_info& version_script,
+                   Stringpool* dynpool)
   : defs_(), needs_(), version_table_(),
-    is_finalized_(false), version_script_(options.version_script())
+    is_finalized_(false), version_script_(version_script)
 {
   // We always need a base version, so define that first. Nothing
   // explicitly declares itself as part of base, so it doesn't need to
@@ -1260,7 +1260,7 @@ Versions::Versions(const General_options& options, Stringpool* dynpool)
                                              true, &version_key);
           Verdef* const vd = new Verdef(
               version,
-              options.version_script().get_dependencies(version),
+              this->version_script_.get_dependencies(version),
               false, false, false);
           this->defs_.push_back(vd);
           Key key(version_key, 0);
@@ -1334,7 +1334,7 @@ Versions::add_def(const Symbol* sym, const char* version,
   Version_base* const vbnull = NULL;
   std::pair<Version_table::iterator, bool> ins =
     this->version_table_.insert(std::make_pair(k, vbnull));
-  
+
   if (!ins.second)
     {
       // We already have an entry for this version.
@@ -1344,9 +1344,6 @@ Versions::add_def(const Symbol* sym, const char* version,
       // weak.
       gold_assert(vb != NULL);
       vb->clear_weak();
-
-      // FIXME: When we support version scripts, we will need to
-      // check whether this symbol should be forced local.
     }
   else
     {
@@ -1418,8 +1415,8 @@ Versions::add_need(Stringpool* dynpool, const char* filename, const char* name,
 // each new version definition.
 
 unsigned int
-Versions::finalize(const Target* target, Symbol_table* symtab,
-                  unsigned int dynsym_index, std::vector<Symbol*>* syms)
+Versions::finalize(Symbol_table* symtab, unsigned int dynsym_index,
+                  std::vector<Symbol*>* syms)
 {
   gold_assert(!this->is_finalized_);
 
@@ -1435,12 +1432,12 @@ Versions::finalize(const Target* target, Symbol_table* symtab,
       // Create a version symbol if necessary.
       if (!(*p)->is_symbol_created())
        {
-         Symbol* vsym = symtab->define_as_constant(target, (*p)->name(),
+         Symbol* vsym = symtab->define_as_constant((*p)->name(),
                                                    (*p)->name(), 0, 0,
                                                    elfcpp::STT_OBJECT,
                                                    elfcpp::STB_GLOBAL,
                                                    elfcpp::STV_DEFAULT, 0,
-                                                   false);
+                                                   false, false);
          vsym->set_needs_dynsym_entry();
           vsym->set_dynsym_index(dynsym_index);
          ++dynsym_index;
This page took 0.026145 seconds and 4 git commands to generate.