diff options
author | Doug Kwan <dougkwan@google.com> | 2009-10-21 00:45:52 +0000 |
---|---|---|
committer | Doug Kwan <dougkwan@google.com> | 2009-10-21 00:45:52 +0000 |
commit | 6c172549153b87152a140a13acee44633f126fa2 (patch) | |
tree | dc84310e526124e543ac235cb6320660e349b15c /gold/object.cc | |
parent | da21e7bb9c7851a9882da9faa9ad55da71a845b4 (diff) | |
download | gdb-6c172549153b87152a140a13acee44633f126fa2.zip gdb-6c172549153b87152a140a13acee44633f126fa2.tar.gz gdb-6c172549153b87152a140a13acee44633f126fa2.tar.bz2 |
2009-10-20 Doug Kwan <dougkwan@google.com>
* object.cc (Sized_relobj::do_finalize_local_symbols): Handle section
symbols of relaxed input sections.
* output.h (Output_section::find_relaxed_input_section): Make
method public.
Diffstat (limited to 'gold/object.cc')
-rw-r--r-- | gold/object.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gold/object.cc b/gold/object.cc index e9826b0..8089774 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -1711,12 +1711,18 @@ Sized_relobj<size, big_endian>::do_finalize_local_symbols(unsigned int index, } else if (!os->find_starting_output_address(this, shndx, &start)) { - // This is a section symbol, but apparently not one - // in a merged section. Just use the start of the - // output section. This happens with relocatable - // links when the input object has section symbols - // for arbitrary non-merge sections. - lv.set_output_value(os->address()); + // This is a section symbol, but apparently not one in a + // merged section. First check to see if this is a relaxed + // input section. If so, use its address. Otherwise just + // use the start of the output section. This happens with + // relocatable links when the input object has section + // symbols for arbitrary non-merge sections. + const Output_section_data* posd = + os->find_relaxed_input_section(this, shndx); + if (posd != NULL) + lv.set_output_value(posd->address()); + else + lv.set_output_value(os->address()); } else { |