diff options
author | Ian Lance Taylor <ian@airs.com> | 2009-02-28 17:53:16 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2009-02-28 17:53:16 +0000 |
commit | b4ecf66bbe002c85155bb538a781b2b0b10d44fd (patch) | |
tree | 0da70850f5c5dfe9a4dcae2c7b75e3b7cb11b486 /gold/symtab.cc | |
parent | fd9d194f0467de25e3d6e6131d641f179d7eb289 (diff) | |
download | gdb-b4ecf66bbe002c85155bb538a781b2b0b10d44fd.zip gdb-b4ecf66bbe002c85155bb538a781b2b0b10d44fd.tar.gz gdb-b4ecf66bbe002c85155bb538a781b2b0b10d44fd.tar.bz2 |
PR 6992
* 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.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc index 46bed68..d9bb379 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -2693,7 +2693,10 @@ Symbol_table::sized_write_section_symbol(const Output_section* os, elfcpp::Sym_write<size, big_endian> osym(pov); osym.put_st_name(0); - osym.put_st_value(os->address()); + if (parameters->options().relocatable()) + osym.put_st_value(0); + else + osym.put_st_value(os->address()); osym.put_st_size(0); osym.put_st_info(elfcpp::elf_st_info(elfcpp::STB_LOCAL, elfcpp::STT_SECTION)); |