aboutsummaryrefslogtreecommitdiff
path: root/gold/dynobj.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-09-21 07:20:01 +0000
committerIan Lance Taylor <iant@google.com>2007-09-21 07:20:01 +0000
commit7e1edb9089c4eec761d09d9bb0ce675eb0bcbc2b (patch)
tree8e9869d1fd6febfdfdc5e754ba12f36e899d9bb2 /gold/dynobj.cc
parentbe9d5a933eb75809b583dc29bc7deb7690954d12 (diff)
downloadgdb-7e1edb9089c4eec761d09d9bb0ce675eb0bcbc2b.zip
gdb-7e1edb9089c4eec761d09d9bb0ce675eb0bcbc2b.tar.gz
gdb-7e1edb9089c4eec761d09d9bb0ce675eb0bcbc2b.tar.bz2
Add global parameters.
Diffstat (limited to 'gold/dynobj.cc')
-rw-r--r--gold/dynobj.cc22
1 files changed, 8 insertions, 14 deletions
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 <cstring>
#include "elfcpp.h"
+#include "parameters.h"
#include "symtab.h"
#include "dynobj.h"
@@ -340,8 +341,7 @@ Sized_dynobj<size, big_endian>::do_read_symbols(Read_symbols_data* sd)
template<int size, bool big_endian>
void
-Sized_dynobj<size, big_endian>::do_layout(const General_options&,
- Symbol_table* symtab,
+Sized_dynobj<size, big_endian>::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<int size, bool big_endian>
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<Symbol*>& 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<Symbol*>&,
@@ -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<Symbol*>&,
@@ -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<Symbol*>&,
@@ -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<Symbol*>&,