x86; Don't add elf64-x86-64.lo nor elf64.lo together with elfxx-x86.lo

Don't set r_info and r_sym fields in _bfd_x86_elf_link_hash_table_create.
Instead, set them in _bfd_x86_elf_link_setup_gnu_properties.  We can
avoid adding elf64-x86-64.lo and elf64.lo together with elfxx-x86.lo to
bfd_backends.

	* configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
	elf64.lo together with elfxx-x86.lo for 64-bit BFD.
	* configure: Regenerated.
	* elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
	and r_sym fields of plt_layout.
	* elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
	Likewise.
	* elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
	(_bfd_x86_elf_link_hash_table_create): Likewise.  Don't set
	r_info nor r_sym fields.
	(_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
	fields of htab.
	* elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
This commit is contained in:
H.J. Lu
2017-09-07 17:19:10 -07:00
parent bd757a5bf2
commit 7a382c1c50
7 changed files with 38 additions and 26 deletions

View File

@@ -4628,6 +4628,9 @@ elf_i386_link_setup_gnu_properties (struct bfd_link_info *info)
break;
}
plt_layout.r_info = elf32_r_info;
plt_layout.r_sym = elf32_r_sym;
return _bfd_x86_elf_link_setup_gnu_properties (info, &plt_layout);
}