aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-09-01 14:51:58 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-09-01 14:51:58 -0700
commit4f501a245f67d0b43f245b09515c87bfeec983ec (patch)
tree640bd84069dbeddffb62a05436d26692808c0774 /bfd/elf64-x86-64.c
parenteeb2f20a764bee3a6a1edb9872467d044aaad848 (diff)
downloadgdb-4f501a245f67d0b43f245b09515c87bfeec983ec.zip
gdb-4f501a245f67d0b43f245b09515c87bfeec983ec.tar.gz
gdb-4f501a245f67d0b43f245b09515c87bfeec983ec.tar.bz2
x86: Add _bfd_x86_elf_gc_mark_hook
Since R_X86_64_GNU_VTINHERIT == R_386_GNU_VTINHERIT and R_X86_64_GNU_VTENTRY == R_386_GNU_VTENTRY, we can share _bfd_x86_elf_gc_mark_hook in elf32-i386.c and elf64-x86-64.c. * elf32-i386.c (elf_i386_gc_mark_hook): Removed. (elf_backend_gc_mark_hook): Likewise. * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise. (elf_backend_gc_mark_hook): Likewise. * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function. * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New. (elf_backend_gc_mark_hook): Likewise.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index ef8ca1a..63aff46 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -2414,27 +2414,6 @@ error_return:
return FALSE;
}
-/* Return the section that should be marked against GC for a given
- relocation. */
-
-static asection *
-elf_x86_64_gc_mark_hook (asection *sec,
- struct bfd_link_info *info,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
-{
- if (h != NULL)
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_X86_64_GNU_VTINHERIT:
- case R_X86_64_GNU_VTENTRY:
- return NULL;
- }
-
- return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
-}
-
/* Allocate space in .plt, .got and associated reloc sections for
dynamic relocs. */
@@ -6266,7 +6245,6 @@ elf_x86_64_special_sections[]=
#define elf_backend_finish_dynamic_sections elf_x86_64_finish_dynamic_sections
#define elf_backend_finish_dynamic_symbol elf_x86_64_finish_dynamic_symbol
#define elf_backend_output_arch_local_syms elf_x86_64_output_arch_local_syms
-#define elf_backend_gc_mark_hook elf_x86_64_gc_mark_hook
#define elf_backend_grok_prstatus elf_x86_64_grok_prstatus
#define elf_backend_grok_psinfo elf_x86_64_grok_psinfo
#ifdef CORE_HEADER