#include "elfcpp.h"
#include "parameters.h"
-#include "options.h"
#include "script.h"
#include "symtab.h"
#include "dynobj.h"
// 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
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);
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.
// 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
{
// 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_);
// 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;