diff options
author | Alan Modra <amodra@gmail.com> | 2002-07-23 12:29:33 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-07-23 12:29:33 +0000 |
commit | f0fe0e16e17d196619746299b29755f87718a96b (patch) | |
tree | 532435a5a3411f6c9f7b4461db032b2bd23ea5d6 /bfd/elf32-hppa.c | |
parent | 5e8d7549530ad332442a2dde84d45242608a0446 (diff) | |
download | gdb-f0fe0e16e17d196619746299b29755f87718a96b.zip gdb-f0fe0e16e17d196619746299b29755f87718a96b.tar.gz gdb-f0fe0e16e17d196619746299b29755f87718a96b.tar.bz2 |
* elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
immediately. Remove code handling relocatable linking.
* elf32-avr.c (elf32_avr_relocate_section): Likewise.
* elf32-cris.c (cris_elf_relocate_section): Likewise.
* elf32-fr30.c (elf32_frv_relocate_section): Likewise.
* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
* elf32-ip2k.c (ip2k_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.
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
* elf32-avr.c (elf_backend_rela_normal): Define.
* elf32-cris.c: Likewise.
* elf32-fr30.c: Likewise.
* elf32-h8300.c: Likewise.
* elf32-hppa.c: Likewise.
* elf32-ip2k.c: Likewise.
* elf32-sparc.c: Likewise.
* elf32-v850.c: Likewise.
* elf32-vax.c: Likewise.
* elf64-hppa.c: Likewise.
* elf64-sparc.c: Likewise.
* elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
* elf32-i860.c (elf32_i860_relocate_section): Likewise.
* elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
* elf-m10200.c (USE_RELA): Don't define.
* elf-m10300.c: Likewise.
* elf32-i370.c: Likewise.
* elf32-ip2k.c: Likewise.
* elf32-m68k.c: Likewise.
* elf32-mcore.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-s390.c: Likewise.
* elf32-vax.c: Likewise.
* elf64-ppc.c: Likewise.
* elf64-s390.c: Likewise.
* elf64-x86-64.c: Likewise.
* elfxx-ia64.c: Likewise.
* elf32-avr.c (USE_REL): Don't undef.
* elf32-ip2k.c: Likewise.
Diffstat (limited to 'bfd/elf32-hppa.c')
-rw-r--r-- | bfd/elf32-hppa.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 7a244ec..ca62709 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -3610,6 +3610,9 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section, Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; + if (info->relocateable) + return true; + symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; htab = hppa_link_hash_table (info); @@ -3641,27 +3644,8 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section, || r_type == (unsigned int) R_PARISC_GNU_VTINHERIT) continue; - r_symndx = ELF32_R_SYM (rel->r_info); - - if (info->relocateable) - { - /* This is a relocatable link. We don't have to change - anything, unless the reloc is against a section symbol, - in which case we have to adjust according to where the - section symbol winds up in the output section. */ - if (r_symndx < symtab_hdr->sh_info) - { - sym = local_syms + r_symndx; - if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - { - sym_sec = local_sections[r_symndx]; - rel->r_addend += sym_sec->output_offset; - } - } - continue; - } - /* This is a final link. */ + r_symndx = ELF32_R_SYM (rel->r_info); h = NULL; sym = NULL; sym_sec = NULL; @@ -4469,6 +4453,7 @@ elf32_hppa_elf_get_symbol_type (elf_sym, type) #define elf_backend_plt_readonly 0 #define elf_backend_want_plt_sym 0 #define elf_backend_got_header_size 8 +#define elf_backend_rela_normal 1 #define TARGET_BIG_SYM bfd_elf32_hppa_vec #define TARGET_BIG_NAME "elf32-hppa" |