summaryrefslogtreecommitdiff
path: root/bfd/elf-m10300.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-12-31 11:29:31 +0000
committerNick Clifton <nickc@redhat.com>2007-12-31 11:29:31 +0000
commit90b79d75f0e853dcf5a8806fad9f6392e29964e5 (patch)
tree9dad56208e4f641353e23e3d09a85943be4a369a /bfd/elf-m10300.c
parenta4a385c293b0fb8a0d5379533d9334d2cf51804a (diff)
downloadbinutils-redhat-90b79d75f0e853dcf5a8806fad9f6392e29964e5.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.
Diffstat (limited to 'bfd/elf-m10300.c')
-rw-r--r--bfd/elf-m10300.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index af2fff3c14..61ce3e167f 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