aboutsummaryrefslogtreecommitdiff
path: root/gold/object.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-02-28 00:18:24 +0000
committerIan Lance Taylor <iant@google.com>2008-02-28 00:18:24 +0000
commit8851eccaec28f25f56fab5ba5d8ae44f71729975 (patch)
tree8580999a45a15a7e86dbabb0675a05f647aedd1a /gold/object.cc
parentf960754aeea602f787d1828efb0f9a8baeca646e (diff)
downloadgdb-8851eccaec28f25f56fab5ba5d8ae44f71729975.zip
gdb-8851eccaec28f25f56fab5ba5d8ae44f71729975.tar.gz
gdb-8851eccaec28f25f56fab5ba5d8ae44f71729975.tar.bz2
From Craig Silverstein: Have Parameters point to General_options.
Diffstat (limited to 'gold/object.cc')
-rw-r--r--gold/object.cc24
1 files changed, 13 insertions, 11 deletions
diff --git a/gold/object.cc b/gold/object.cc
index c886717..e444ec1 100644
--- a/gold/object.cc
+++ b/gold/object.cc
@@ -451,7 +451,7 @@ Sized_relobj<size, big_endian>::include_section_group(
if ((flags & elfcpp::GRP_COMDAT) == 0
|| layout->add_comdat(signature, true))
{
- if (parameters->output_is_object())
+ if (parameters->options().relocatable())
layout->layout_group(symtab, this, index, name, signature, shdr,
pword);
return true;
@@ -594,8 +594,9 @@ Sized_relobj<size, big_endian>::do_layout(Symbol_table* symtab,
std::vector<bool> omit(shnum, false);
// Keep track of reloc sections when emitting relocations.
- const bool output_is_object = parameters->output_is_object();
- const bool emit_relocs = output_is_object || parameters->emit_relocs();
+ const bool relocatable = parameters->options().relocatable();
+ const bool emit_relocs = (relocatable
+ || parameters->options().emit_relocs());
std::vector<unsigned int> reloc_sections;
// Keep track of .eh_frame sections.
@@ -618,7 +619,7 @@ Sized_relobj<size, big_endian>::do_layout(Symbol_table* symtab,
if (this->handle_gnu_warning_section(name, i, symtab))
{
- if (!output_is_object)
+ if (!relocatable)
omit[i] = true;
}
@@ -669,7 +670,7 @@ Sized_relobj<size, big_endian>::do_layout(Symbol_table* symtab,
continue;
}
- if (output_is_object && shdr.get_sh_type() == elfcpp::SHT_GROUP)
+ if (relocatable && shdr.get_sh_type() == elfcpp::SHT_GROUP)
continue;
// The .eh_frame section is special. It holds exception frame
@@ -678,7 +679,7 @@ Sized_relobj<size, big_endian>::do_layout(Symbol_table* symtab,
// sections so that the exception frame reader can reliably
// determine which sections are being discarded, and discard the
// corresponding information.
- if (!output_is_object
+ if (!relocatable
&& strcmp(name, ".eh_frame") == 0
&& this->check_eh_frame_flags(&shdr))
{
@@ -1068,7 +1069,8 @@ Sized_relobj<size, big_endian>::write_local_symbols(
const Stringpool* sympool,
const Stringpool* dynpool)
{
- if (parameters->strip_all() && this->output_local_dynsym_count_ == 0)
+ if (parameters->options().strip_all()
+ && this->output_local_dynsym_count_ == 0)
return;
gold_assert(this->symtab_shndx_ != -1U);
@@ -1134,7 +1136,7 @@ Sized_relobj<size, big_endian>::write_local_symbols(
}
// Write the symbol to the output symbol table.
- if (!parameters->strip_all()
+ if (!parameters->options().strip_all()
&& this->local_values_[i].needs_output_symtab_entry())
{
elfcpp::Sym_write<size, big_endian> osym(ov);
@@ -1235,7 +1237,7 @@ Sized_relobj<size, big_endian>::get_symbol_location_info(
else
{
info->enclosing_symbol_name = symbol_names + sym.get_st_name();
- if (parameters->demangle())
+ if (parameters->options().demangle())
{
char* demangled_name = cplus_demangle(
info->enclosing_symbol_name.c_str(),
@@ -1264,9 +1266,9 @@ Input_objects::add_object(Object* obj)
{
// Set the global target from the first object file we recognize.
Target* target = obj->target();
- if (!parameters->is_target_valid())
+ if (!parameters->target_valid())
set_parameters_target(target);
- else if (target != parameters->target())
+ else if (target != &parameters->target())
{
obj->error(_("incompatible target"));
return false;