From: Alan Modra Date: Tue, 23 Jul 2002 12:34:35 +0000 (+0000) Subject: missed 'em from the last delta X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=de2d743ed8e1d4559e79b900e49ccc28a405cef9;p=binutils-gdb.git missed 'em from the last delta --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0bdb1f8078f..5a7cb539e90 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -5,6 +5,7 @@ * 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-frv.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. @@ -15,6 +16,7 @@ * elf32-avr.c (elf_backend_rela_normal): Define. * elf32-cris.c: Likewise. * elf32-fr30.c: Likewise. + * elf32-frv.c: Likewise. * elf32-h8300.c: Likewise. * elf32-hppa.c: Likewise. * elf32-ip2k.c: Likewise. @@ -24,6 +26,7 @@ * elf64-hppa.c: Likewise. * elf64-sparc.c: Likewise. * elf32-fr30.c (elf32_frv_relocate_section): Edit comment. + * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. @@ -31,6 +34,7 @@ * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf-m10200.c (USE_RELA): Don't define. * elf-m10300.c: Likewise. + * elfarm-oabi.c: Likewise. * elf32-i370.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-m68k.c: Likewise. diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c index 8cab505989c..c8187957c4e 100644 --- a/bfd/elf32-frv.c +++ b/bfd/elf32-frv.c @@ -621,9 +621,6 @@ frv_final_link_relocate (howto, input_bfd, input_section, contents, rel, relocat /* Relocate an FRV ELF section. - There is some attempt to make this function usable for many architectures, - both USE_REL and USE_RELA ['twould be nice if such a critter existed], - if only to serve as a learning tool. The RELOCATE_SECTION function is called by the new ELF backend linker to handle the relocations for a section. @@ -655,7 +652,7 @@ frv_final_link_relocate (howto, input_bfd, input_section, contents, rel, relocat static boolean elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section, - contents, relocs, local_syms, local_sections) + contents, relocs, local_syms, local_sections) bfd * output_bfd ATTRIBUTE_UNUSED; struct bfd_link_info * info; bfd * input_bfd; @@ -670,6 +667,9 @@ elf32_frv_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; sym_hashes = elf_sym_hashes (input_bfd); relend = relocs + input_section->reloc_count; @@ -692,29 +692,8 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section, || r_type == R_FRV_GNU_VTENTRY) continue; - r_symndx = ELF32_R_SYM (rel->r_info); - - if (info->relocateable) - { - /* This is a relocateable 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) - { - sec = local_sections [r_symndx]; - rel->r_addend += sec->output_offset + sym->st_value; - } - } - - continue; - } - /* This is a final link. */ + r_symndx = ELF32_R_SYM (rel->r_info); howto = elf32_frv_howto_table + ELF32_R_TYPE (rel->r_info); h = NULL; sym = NULL; @@ -1389,6 +1368,7 @@ frv_elf_print_private_bfd_data (abfd, ptr) #define elf_backend_add_symbol_hook elf32_frv_add_symbol_hook #define elf_backend_can_gc_sections 1 +#define elf_backend_rela_normal 1 #define bfd_elf32_bfd_reloc_type_lookup frv_reloc_type_lookup #define bfd_elf32_bfd_set_private_flags frv_elf_set_private_flags diff --git a/bfd/elfarm-oabi.c b/bfd/elfarm-oabi.c index c8e3fe6248f..fb920462d60 100644 --- a/bfd/elfarm-oabi.c +++ b/bfd/elfarm-oabi.c @@ -37,8 +37,6 @@ #define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0]) #endif -#define USE_RELA - #define TARGET_LITTLE_SYM bfd_elf32_littlearm_oabi_vec #define TARGET_LITTLE_NAME "elf32-littlearm-oabi" #define TARGET_BIG_SYM bfd_elf32_bigarm_oabi_vec