diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-02-08 16:29:19 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-02-08 16:30:55 -0800 |
commit | 15b23f3612ffa19bd7fb20ce07485cdb3c06162f (patch) | |
tree | 598e58050461060fb76022b35d2cf0ec998fba56 /bfd/elf64-x86-64.c | |
parent | 4d6945e70a0ce0c939d06e29c5883e57501f1e20 (diff) | |
download | gdb-15b23f3612ffa19bd7fb20ce07485cdb3c06162f.zip gdb-15b23f3612ffa19bd7fb20ce07485cdb3c06162f.tar.gz gdb-15b23f3612ffa19bd7fb20ce07485cdb3c06162f.tar.bz2 |
x86: Set need_global_offset_table with info->output_bfd->xvec
* elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
Remove prototype.
(i386_elf32_sol2_vec): Declared.
(elf_i386_link_setup_gnu_properties): Set
need_global_offset_table with info->output_bfd->xvec.
* elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
Remove prototype.
(x86_64_elf64_sol2_vec): Declared.
(elf_x86_64_link_setup_gnu_properties): Set
need_global_offset_table with info->output_bfd->xvec.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r-- | bfd/elf64-x86-64.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 7fa0408..149543f 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -27,9 +27,6 @@ #include "opcode/i386.h" #include "elf/x86-64.h" -static bfd_boolean elf64_x86_64_copy_solaris_special_section_fields - (const bfd *, bfd *, const Elf_Internal_Shdr *, Elf_Internal_Shdr *); - #ifdef CORE_HEADER #include <stdarg.h> #include CORE_HEADER @@ -4854,6 +4851,8 @@ elf_x86_64_relocs_compatible (const bfd_target *input, && _bfd_elf_relocs_compatible (input, output)); } +extern const bfd_target x86_64_elf64_sol2_vec; + /* Set up x86-64 GNU properties. Return the first relocatable ELF input with GNU properties if found. Otherwise, return NULL. */ @@ -4861,7 +4860,6 @@ static bfd * elf_x86_64_link_setup_gnu_properties (struct bfd_link_info *info) { struct elf_x86_init_table init_table; - const struct elf_backend_data *bed; if ((int) R_X86_64_standard >= (int) R_X86_64_converted_reloc_bit || (int) R_X86_64_max <= (int) R_X86_64_converted_reloc_bit @@ -4918,10 +4916,8 @@ elf_x86_64_link_setup_gnu_properties (struct bfd_link_info *info) init_table.r_sym = elf32_r_sym; } - bed = get_elf_backend_data (info->output_bfd); init_table.need_global_offset_table - = (bed->elf_backend_copy_special_section_fields - == elf64_x86_64_copy_solaris_special_section_fields); + = info->output_bfd->xvec == &x86_64_elf64_sol2_vec; return _bfd_x86_elf_link_setup_gnu_properties (info, &init_table); } |