aboutsummaryrefslogtreecommitdiff
path: root/gold/reloc.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/reloc.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/reloc.cc')
-rw-r--r--gold/reloc.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/gold/reloc.cc b/gold/reloc.cc
index 63ebb84..405d1da 100644
--- a/gold/reloc.cc
+++ b/gold/reloc.cc
@@ -229,8 +229,8 @@ Sized_relobj<size, big_endian>::do_read_relocs(Read_relocs_data* rd)
bool is_section_allocated = ((secshdr.get_sh_flags() & elfcpp::SHF_ALLOC)
!= 0);
if (!is_section_allocated
- && !parameters->output_is_object()
- && !parameters->emit_relocs())
+ && !parameters->options().relocatable()
+ && !parameters->options().emit_relocs())
continue;
if (shdr.get_sh_link() != this->symtab_shndx_)
@@ -317,7 +317,7 @@ Sized_relobj<size, big_endian>::do_scan_relocs(const General_options& options,
p != rd->relocs.end();
++p)
{
- if (!parameters->output_is_object())
+ if (!parameters->options().relocatable())
{
// As noted above, when not generating an object file, we
// only scan allocated sections. We may see a non-allocated
@@ -329,7 +329,7 @@ Sized_relobj<size, big_endian>::do_scan_relocs(const General_options& options,
p->needs_special_offset_handling,
this->local_symbol_count_,
local_symbols);
- if (parameters->emit_relocs())
+ if (parameters->options().emit_relocs())
this->emit_relocs_scan(options, symtab, layout, local_symbols, p);
}
else
@@ -555,7 +555,8 @@ Sized_relobj<size, big_endian>::write_sections(const unsigned char* pshdrs,
if (shdr.get_sh_type() == elfcpp::SHT_NOBITS)
continue;
- if ((parameters->output_is_object() || parameters->emit_relocs())
+ if ((parameters->options().relocatable()
+ || parameters->options().emit_relocs())
&& (shdr.get_sh_type() == elfcpp::SHT_REL
|| shdr.get_sh_type() == elfcpp::SHT_RELA)
&& (shdr.get_sh_flags() & elfcpp::SHF_ALLOC) == 0)
@@ -731,7 +732,7 @@ Sized_relobj<size, big_endian>::relocate_sections(
off_t output_offset = map_sections[index].offset;
gold_assert((*pviews)[index].view != NULL);
- if (parameters->output_is_object())
+ if (parameters->options().relocatable())
gold_assert((*pviews)[i].view != NULL);
if (shdr.get_sh_link() != this->symtab_shndx_)
@@ -773,7 +774,7 @@ Sized_relobj<size, big_endian>::relocate_sections(
relinfo.reloc_shndx = i;
relinfo.data_shndx = index;
- if (!parameters->output_is_object())
+ if (!parameters->options().relocatable())
{
target->relocate_section(&relinfo,
sh_type,
@@ -784,7 +785,7 @@ Sized_relobj<size, big_endian>::relocate_sections(
(*pviews)[index].view,
(*pviews)[index].address,
(*pviews)[index].view_size);
- if (parameters->emit_relocs())
+ if (parameters->options().emit_relocs())
this->emit_relocs(&relinfo, i, sh_type, prelocs, reloc_count,
os, output_offset,
(*pviews)[index].view,