diff options
author | Nick Clifton <nickc@redhat.com> | 2007-12-31 11:29:31 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2007-12-31 11:29:31 +0000 |
commit | f969f172d07b1194f2ca73a1d9189562679664df (patch) | |
tree | 5785a6b994bfc0034af58ff157009b6a42a58894 | |
parent | 47123ec658ba7d63e1bc1762a5d49a68a8c780fa (diff) | |
download | gdb-f969f172d07b1194f2ca73a1d9189562679664df.tar.gz |
* elf-m10300.c (mn10300_elf_relax_section): Use _bfd_merged_section_offset
to compute the offset of a symbol in a merged section.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf-m10300.c | 11 |
2 files changed, 11 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d12d6155666..a5567b0ff21 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ 2007-12-31 Nick Clifton <nickc@redhat.com> + * elf-m10300.c (mn10300_elf_relax_section): Use + _bfd_merged_section_offset to compute the offset of a symbol in a + merged section. + +2007-12-31 Nick Clifton <nickc@redhat.com> + * elf.c (_bfd_elf_find_segment_containing_section): New function: Scan the segment map looking for the segment containing a specified function. diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c index af2fff3c140..61ce3e167fe 100644 --- a/bfd/elf-m10300.c +++ b/bfd/elf-m10300.c @@ -2813,12 +2813,11 @@ mn10300_elf_relax_section (bfd *abfd, && ELF_ST_TYPE (isym->st_info) == STT_SECTION && sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE) { - bfd_vma saved_addend; - - saved_addend = irel->r_addend; - symval = _bfd_elf_rela_local_sym (abfd, isym, & sym_sec, irel); - symval += irel->r_addend; - irel->r_addend = saved_addend; + symval = isym->st_value + irel->r_addend; + symval = _bfd_merged_section_offset (abfd, & sym_sec, + elf_section_data (sym_sec)->sec_info, + symval); + symval += sym_sec->output_section->vma + sym_sec->output_offset - irel->r_addend; } else symval = (isym->st_value |