* 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.
* 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.
* 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.
* 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.
\f
/* 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.
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;
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;
|| 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;
#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