diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-08-30 11:13:32 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-08-30 11:13:32 -0700 |
commit | 5b86dbf4549af98c4428da4764182e03f22c58ab (patch) | |
tree | 740f6298b78b2f9684ac57f162ea79d0630b2e62 /bfd | |
parent | 765e526c75506a7d9644bc7c137ac1923fdb1369 (diff) | |
download | gdb-5b86dbf4549af98c4428da4764182e03f22c58ab.zip gdb-5b86dbf4549af98c4428da4764182e03f22c58ab.tar.gz gdb-5b86dbf4549af98c4428da4764182e03f22c58ab.tar.bz2 |
x86: Check target_id instead of elf_machine_code
Since both elf32-i386.c and elf64-x86-64.c support targets with
different ELF_MACHINE_CODEs, _bfd_x86_elf_link_hash_table_create
should check target_id instead of elf_machine_code.
* elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
target_id instead of elf_machine_code.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elfxx-x86.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 095373e..9c7e2ba 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2017-08-30 H.J. Lu <hongjiu.lu@intel.com> + * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check + target_id instead of elf_machine_code. + +2017-08-30 H.J. Lu <hongjiu.lu@intel.com> + * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed. (elf_i386_lazy_plt_layout): Likewise. (elf_i386_non_lazy_plt_layout): Likewise. diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c index ccd6e10..d040ee3 100644 --- a/bfd/elfxx-x86.c +++ b/bfd/elfxx-x86.c @@ -278,7 +278,7 @@ _bfd_x86_elf_link_hash_table_create (bfd *abfd) { ret->r_info = elf32_r_info; ret->r_sym = elf32_r_sym; - if (bed->elf_machine_code == EM_X86_64) + if (bed->target_id == X86_64_ELF_DATA) { ret->pointer_r_type = R_X86_64_32; ret->dynamic_interpreter = ELFX32_DYNAMIC_INTERPRETER; |