summaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c27
1 files changed, 5 insertions, 22 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 5d77e7b3a89..30cc29a8d46 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1494,6 +1494,9 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
+ if (info->relocateable)
+ return true;
+
htab = elf64_x86_64_hash_table (info);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
@@ -1524,30 +1527,9 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_set_error (bfd_error_bad_value);
return false;
}
- howto = x86_64_elf_howto_table + r_type;
+ howto = x86_64_elf_howto_table + r_type;
r_symndx = ELF64_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. */
h = NULL;
sym = NULL;
sec = NULL;
@@ -2230,6 +2212,7 @@ elf64_x86_64_finish_dynamic_sections (output_bfd, info)
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size (GOT_ENTRY_SIZE*3)
#define elf_backend_plt_header_size PLT_ENTRY_SIZE
+#define elf_backend_rela_normal 1
#define elf_info_to_howto elf64_x86_64_info_to_howto