aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-vax.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-vax.c')
-rw-r--r--bfd/elf32-vax.c28
1 files changed, 5 insertions, 23 deletions
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index e7145f1..068578b 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -341,8 +341,6 @@ reloc_type_lookup (abfd, code)
#define bfd_elf32_bfd_reloc_type_lookup reloc_type_lookup
#define ELF_ARCH bfd_arch_vax
/* end code generated by elf.el */
-
-#define USE_RELA
/* Functions for the VAX ELF linker. */
@@ -1419,6 +1417,9 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
+ if (info->relocateable)
+ return true;
+
dynobj = elf_hash_table (info)->dynobj;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
@@ -1450,28 +1451,8 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
}
howto = howto_table + r_type;
- 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);
h = NULL;
sym = NULL;
sec = NULL;
@@ -2208,5 +2189,6 @@ elf_vax_finish_dynamic_sections (output_bfd, info)
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size 16
+#define elf_backend_rela_normal 1
#include "elf32-target.h"