aboutsummaryrefslogtreecommitdiff
path: root/gold/script-sections.cc
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-10-01 15:02:33 +0000
committerNick Clifton <nickc@redhat.com>2010-10-01 15:02:33 +0000
commitbacff3ab9ca8b5f171823f2659f44770c594710f (patch)
treefc218e1feff5a1ebd4f5f40c35cbeb244632abed /gold/script-sections.cc
parentf6d250ce5c780e6b43ea4b658d6037be34eb91bd (diff)
downloadfsf-binutils-gdb-bacff3ab9ca8b5f171823f2659f44770c594710f.zip
fsf-binutils-gdb-bacff3ab9ca8b5f171823f2659f44770c594710f.tar.gz
fsf-binutils-gdb-bacff3ab9ca8b5f171823f2659f44770c594710f.tar.bz2
* expression.cc (eval): Replace dummy argument with NULL.
(eval_maybe_dot): Check for a NULL result section pointer. (Symbol_expression::value): Likewise. (Dot_expression::value): Likewise. (BINARY_EXPRESSION): Likewise. (Max_expression::value): Likewise. (Min_expression::value): Likewise. (Absolute_expression::value): Likewise. (Addr_expression::value_from_output_section): Likewise. (Loaddddr_expression::value_from_output_section): Likewise. (Segment_start_expression::value): Likewise. * script-sections.cc (Sections_elememt_dot_assignment::finalize_symbols): Replace dummy argument with NULL. (Sections_elememt_dot_assignment::set_section_addresses): Likewise. (Output_data_expression::do_write_to_buffer): Likewise. (Output_section_definition::finalize_symbols): Likewise. (Output_section_definition::set_section_addresses): Likewise.
Diffstat (limited to 'gold/script-sections.cc')
-rw-r--r--gold/script-sections.cc25
1 files changed, 8 insertions, 17 deletions
diff --git a/gold/script-sections.cc b/gold/script-sections.cc
index eebbb5e..2de3a3f 100644
--- a/gold/script-sections.cc
+++ b/gold/script-sections.cc
@@ -656,9 +656,8 @@ class Sections_element_dot_assignment : public Sections_element
// We ignore the section of the result because outside of an
// output section definition the dot symbol is always considered
// to be absolute.
- Output_section* dummy;
*dot_value = this->val_->eval_with_dot(symtab, layout, true, *dot_value,
- NULL, &dummy, NULL);
+ NULL, NULL, NULL);
}
// Update the dot symbol while setting section addresses.
@@ -667,9 +666,8 @@ class Sections_element_dot_assignment : public Sections_element
uint64_t* dot_value, uint64_t* dot_alignment,
uint64_t* load_address)
{
- Output_section* dummy;
*dot_value = this->val_->eval_with_dot(symtab, layout, false, *dot_value,
- NULL, &dummy, dot_alignment);
+ NULL, NULL, dot_alignment);
*load_address = *dot_value;
}
@@ -980,10 +978,9 @@ Output_data_expression::do_write(Output_file* of)
void
Output_data_expression::do_write_to_buffer(unsigned char* buf)
{
- Output_section* dummy;
uint64_t val = this->val_->eval_with_dot(this->symtab_, this->layout_,
true, this->dot_value_,
- this->dot_section_, &dummy, NULL);
+ this->dot_section_, NULL, NULL);
if (parameters->target().is_big_endian())
this->endian_write_to_buffer<true>(val, buf);
@@ -2052,18 +2049,15 @@ Output_section_definition::finalize_symbols(Symbol_table* symtab,
uint64_t address = *dot_value;
if (this->address_ != NULL)
{
- Output_section* dummy;
address = this->address_->eval_with_dot(symtab, layout, true,
*dot_value, NULL,
- &dummy, NULL);
+ NULL, NULL);
}
if (this->align_ != NULL)
{
- Output_section* dummy;
uint64_t align = this->align_->eval_with_dot(symtab, layout, true,
- *dot_value,
- NULL,
- &dummy, NULL);
+ *dot_value, NULL,
+ NULL, NULL);
address = align_address(address, align);
}
*dot_value = address;
@@ -2131,9 +2125,8 @@ Output_section_definition::set_section_addresses(Symbol_table* symtab,
address = *dot_value;
else
{
- Output_section* dummy;
address = this->address_->eval_with_dot(symtab, layout, true,
- *dot_value, NULL, &dummy,
+ *dot_value, NULL, NULL,
dot_alignment);
}
}
@@ -2178,11 +2171,9 @@ Output_section_definition::set_section_addresses(Symbol_table* symtab,
this->evaluated_load_address_ = address;
else
{
- Output_section* dummy;
uint64_t laddr =
this->load_address_->eval_with_dot(symtab, layout, true, *dot_value,
- this->output_section_, &dummy,
- NULL);
+ this->output_section_, NULL, NULL);
if (this->output_section_ != NULL)
this->output_section_->set_load_address(laddr);
this->evaluated_load_address_ = laddr;