diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-12-07 11:12:18 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2001-12-07 11:12:18 +0000 |
commit | 6383ab490baa9ff595886406438bc1d67bc1112a (patch) | |
tree | 6e5129cfe0edaa1b67c5034b04bb43f02c19df23 /bfd/elf32-sh.c | |
parent | 9310215b09a155b3fe8f75c1489c6b68edea39ca (diff) | |
download | binutils-redhat-6383ab490baa9ff595886406438bc1d67bc1112a.tar.gz |
* elf.c (_bfd_elf_rela_local_sym): Only call
_bfd_merged_section_offset if merge_info is non-NULL.
(_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
* elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
prototypes.
* elf32-arm.h (elf32_arm_final_link_relocate): Use
_bfd_elf_section_offset.
(elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
* elf32-i386.c (elf_i386_relocate_section): Use
_bfd_elf_section_offset and _bfd_elf_rel_local_sym.
* elf32-sh.c (sh_elf_relocate_section): Likewise.
* elf32-sparc.c (elf32_sparc_relocate_section): Use
_bfd_elf_section_offset.
* elf32-cris.c (cris_elf_relocate_section): Likewise.
* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
* elf32-i370.c (i370_elf_relocate_section): Likewise.
* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
* elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
* elf32-s390.c (elf_s390_relocate_section): Likewise.
* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
* elf64-s390.c (elf_s390_relocate_section): Likewise.
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
* elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r-- | bfd/elf32-sh.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 74b725a0ee..9fe9873e3f 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -3101,9 +3101,7 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section, addend = bfd_get_32 (input_bfd, contents + rel->r_offset); msec = sec; addend = - _bfd_merged_section_offset (output_bfd, &msec, - elf_section_data (sec)->merge_info, - sym->st_value + addend, (bfd_vma) 0) + _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend) - relocation; addend += msec->output_section->vma + msec->output_offset; bfd_put_32 (input_bfd, addend, contents + rel->r_offset); @@ -3284,22 +3282,11 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section, skip = false; - if (elf_section_data (input_section)->stab_info == NULL) - outrel.r_offset = rel->r_offset; - else - { - bfd_vma off; - - off = (_bfd_stab_section_offset - (output_bfd, &elf_hash_table (info)->stab_info, - input_section, - &elf_section_data (input_section)->stab_info, - rel->r_offset)); - if (off == (bfd_vma) -1) - skip = true; - outrel.r_offset = off; - } - + outrel.r_offset = + _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset); + if (outrel.r_offset == (bfd_vma) -1) + skip = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); |