From 7e1edb9089c4eec761d09d9bb0ce675eb0bcbc2b Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 21 Sep 2007 07:20:01 +0000 Subject: Add global parameters. --- gold/dynobj.cc | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'gold/dynobj.cc') diff --git a/gold/dynobj.cc b/gold/dynobj.cc index 10f8fbe..a328b4d 100644 --- a/gold/dynobj.cc +++ b/gold/dynobj.cc @@ -6,6 +6,7 @@ #include #include "elfcpp.h" +#include "parameters.h" #include "symtab.h" #include "dynobj.h" @@ -340,8 +341,7 @@ Sized_dynobj::do_read_symbols(Read_symbols_data* sd) template void -Sized_dynobj::do_layout(const General_options&, - Symbol_table* symtab, +Sized_dynobj::do_layout(Symbol_table* symtab, Layout*, Read_symbols_data* sd) { @@ -1196,7 +1196,7 @@ Versions::record_version(const General_options* options, if (!sym->is_from_dynobj()) { - if (options->is_shared()) + if (parameters->output_is_shared()) this->add_def(options, sym, version, version_key); } else @@ -1239,7 +1239,7 @@ Versions::add_def(const General_options* options, const Symbol* sym, // If we are creating a shared object, it is an error to // find a definition of a symbol with a version which is not // in the version script. - if (options->is_shared()) + if (parameters->output_is_shared()) { fprintf(stderr, _("%s: symbol %s has undefined version %s\n"), program_name, sym->name(), version); @@ -1366,8 +1366,7 @@ Versions::finalize(const Target* target, Symbol_table* symtab, // pointers. unsigned int -Versions::version_index(const General_options* options, - const Stringpool* dynpool, const Symbol* sym) const +Versions::version_index(const Stringpool* dynpool, const Symbol* sym) const { Stringpool::Key version_key; const char* version = dynpool->find(sym->version(), &version_key); @@ -1376,7 +1375,7 @@ Versions::version_index(const General_options* options, Key k; if (!sym->is_from_dynobj()) { - if (!options->is_shared()) + if (!parameters->output_is_shared()) return elfcpp::VER_NDX_GLOBAL; k = Key(version_key, 0); } @@ -1404,8 +1403,7 @@ Versions::version_index(const General_options* options, template void -Versions::symbol_section_contents(const General_options* options, - const Stringpool* dynpool, +Versions::symbol_section_contents(const Stringpool* dynpool, unsigned int local_symcount, const std::vector& syms, unsigned char** pp, @@ -1430,7 +1428,7 @@ Versions::symbol_section_contents(const General_options* options, if (version == NULL) version_index = elfcpp::VER_NDX_GLOBAL; else - version_index = this->version_index(options, dynpool, *p); + version_index = this->version_index(dynpool, *p); elfcpp::Swap<16, big_endian>::writeval(pbuf + (*p)->dynsym_index() * 2, version_index); } @@ -1554,7 +1552,6 @@ class Sized_dynobj<64, true>; template void Versions::symbol_section_contents<32, false>( - const General_options*, const Stringpool*, unsigned int, const std::vector&, @@ -1567,7 +1564,6 @@ Versions::symbol_section_contents<32, false>( template void Versions::symbol_section_contents<32, true>( - const General_options*, const Stringpool*, unsigned int, const std::vector&, @@ -1580,7 +1576,6 @@ Versions::symbol_section_contents<32, true>( template void Versions::symbol_section_contents<64, false>( - const General_options*, const Stringpool*, unsigned int, const std::vector&, @@ -1593,7 +1588,6 @@ Versions::symbol_section_contents<64, false>( template void Versions::symbol_section_contents<64, true>( - const General_options*, const Stringpool*, unsigned int, const std::vector&, -- cgit v1.1