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.
This commit is contained in:
H.J. Lu 2017-08-30 11:13:32 -07:00
parent 765e526c75
commit 5b86dbf454
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -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;