* symtab.cc (Symbol_table::sized_write_section_symbol): In a
	relocatable link set the value of the section symbol to zero.
	* object.cc (Sized_relobj::do_finalize_local_symbols): In a
	relocatable link don't include the section address in the local
	symbol value.
This commit is contained in:
Ian Lance Taylor
2009-02-28 17:53:16 +00:00
parent fd9d194f04
commit b4ecf66bbe
3 changed files with 15 additions and 2 deletions

View File

@@ -1509,6 +1509,7 @@ Sized_relobj<size, big_endian>::do_finalize_local_symbols(unsigned int index,
const unsigned int loccount = this->local_symbol_count_;
this->local_symbol_offset_ = off;
const bool relocatable = parameters->options().relocatable();
const Output_sections& out_sections(this->output_sections());
const std::vector<Address>& out_offsets(this->section_offsets_);
unsigned int shnum = this->shnum();
@@ -1589,7 +1590,7 @@ Sized_relobj<size, big_endian>::do_finalize_local_symbols(unsigned int index,
+ out_offsets[shndx]
+ lv.input_value());
else
lv.set_output_value(os->address()
lv.set_output_value((relocatable ? 0 : os->address())
+ out_offsets[shndx]
+ lv.input_value());
}