diff options
author | Alan Modra <amodra@gmail.com> | 2003-11-05 13:17:09 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2003-11-05 13:17:09 +0000 |
commit | 8517fae7a54a3d541aecc6be63e22d6ef5d51a66 (patch) | |
tree | 2bbd5fe5d7851185bc8cea317d932039a1b6ac05 /bfd/elf32-ppc.c | |
parent | a2b0fe9d4dcfabbed6702a73f8d2e2b2e9441ef5 (diff) | |
download | gdb-8517fae7a54a3d541aecc6be63e22d6ef5d51a66.zip gdb-8517fae7a54a3d541aecc6be63e22d6ef5d51a66.tar.gz gdb-8517fae7a54a3d541aecc6be63e22d6ef5d51a66.tar.bz2 |
* elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
updated section in case of merged section.
* elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
* elf-hppa.h (elf_hppa_relocate_section): Adjust call.
* elf-m10200.c (mn10200_elf_relocate_section): Likewise.
* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
* elf32-arm.h (elf32_arm_relocate_section): Likewise.
* elf32-avr.c (elf32_avr_relocate_section): Likewise.
* elf32-cris.c (cris_elf_relocate_section): Likewise.
* elf32-fr30.c (fr30_elf_relocate_section): Likewise.
* elf32-frv.c (elf32_frv_relocate_section): Likewise.
* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
* elf32-i370.c (i370_elf_relocate_section): Likewise.
* elf32-i860.c (elf32_i860_relocate_section): Likewise.
* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
* elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
* elf32-s390.c (elf_s390_relocate_section): Likewise.
* elf32-sh.c (sh_elf_relocate_section): Likewise.
* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
* elf32-v850.c (v850_elf_relocate_section) Likewise.
* elf32-vax.c (elf_vax_relocate_section): Likewise.
* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
* elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
* elf64-s390.c (elf_s390_relocate_section): Likewise.
* elf64-sh64.c (sh_elf64_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_relocate_section): Likewise.
* elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
section for reloc output.
* elf32-i370.c (i370_elf_relocate_section): Likewise.
* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
* elf32-vax.c (elf_vax_relocate_section): Likewise.
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
* elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
return value.
* elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
sec->id.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r-- | bfd/elf32-ppc.c | 43 |
1 files changed, 4 insertions, 39 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 1b10e56..71a5d45 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -4715,7 +4715,7 @@ ppc_elf_relocate_section (bfd *output_bfd, sec = local_sections[r_symndx]; sym_name = bfd_elf_local_sym_name (input_bfd, sym); - relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); + relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); } else { @@ -5441,44 +5441,9 @@ ppc_elf_relocate_section (bfd *output_bfd, break; case R_PPC_RELAX32: - { - unsigned long r_symndx; - Elf_Internal_Sym *sym; - asection *sym_sec; - bfd_byte *hit_addr = 0; - bfd_vma value = 0; - - r_symndx = ELF32_R_SYM (rel->r_info); - - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - sym_sec = local_sections[r_symndx]; - - value = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel); - } - else - { - bfd_boolean warned; - bfd_boolean unresolved_reloc; - - RELOC_FOR_GLOBAL_SYMBOL (h, elf_sym_hashes (input_bfd), - r_symndx, symtab_hdr, - value, sym_sec, - unresolved_reloc, info, - warned); - if (warned) - continue; - } - hit_addr = contents + rel->r_offset; - value += rel->r_addend; - - r = ppc_elf_install_value (output_bfd, hit_addr, value, r_type); - if (r != bfd_reloc_ok) - break; - else - continue; - } + ppc_elf_install_value (output_bfd, contents + rel->r_offset, + relocation + addend, r_type); + continue; /* Indirect .sdata relocation. */ case R_PPC_EMB_SDAI16: |