aboutsummaryrefslogtreecommitdiff
path: root/gold/object.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-12-21 23:08:25 +0000
committerIan Lance Taylor <iant@google.com>2007-12-21 23:08:25 +0000
commit8d32f93595f28c70f21566384ca1dc8a441297b9 (patch)
treee15b3e44f7a3b3e81f270f0bdc12d1fe661c4ace /gold/object.cc
parent2e324ab383362a9497e286b5c56c58a6e40d7170 (diff)
downloadgdb-8d32f93595f28c70f21566384ca1dc8a441297b9.zip
gdb-8d32f93595f28c70f21566384ca1dc8a441297b9.tar.gz
gdb-8d32f93595f28c70f21566384ca1dc8a441297b9.tar.bz2
Correct handling of non-section symbol in merged section. Avoid some
64-bit signed/unsigned warnings.
Diffstat (limited to 'gold/object.cc')
-rw-r--r--gold/object.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/gold/object.cc b/gold/object.cc
index e92a66d..1a0d064 100644
--- a/gold/object.cc
+++ b/gold/object.cc
@@ -896,12 +896,13 @@ Sized_relobj<size, big_endian>::do_finalize_local_symbols(unsigned int index,
// value. If it is a section symbol, we can not, as in
// that case we have to consider the addend to determine
// the value to use in a relocation.
- section_offset_type start =
- os->starting_output_address(this, shndx);
if (!lv.is_section_symbol())
- lv.set_output_value(lv.input_value() + start);
+ lv.set_output_value(os->output_address(this, shndx,
+ lv.input_value()));
else
{
+ section_offset_type start =
+ os->starting_output_address(this, shndx);
Merged_symbol_value<size>* msv =
new Merged_symbol_value<size>(lv.input_value(), start);
lv.set_merged_symbol_value(msv);