+2015-05-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
+ and output_bfd with abfd.
+ * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
+
2015-05-06 Toni Spets <toni.spets@iki.fi>
PR ld/18372
/* STT_GNU_IFUNC must keep R_386_GOT32 relocation. */
if (ELF_ST_TYPE (isym->st_info) != STT_GNU_IFUNC
&& irel->r_offset >= 2
- && bfd_get_8 (input_bfd,
- contents + irel->r_offset - 2) == 0x8b)
+ && bfd_get_8 (abfd, contents + irel->r_offset - 2) == 0x8b)
{
- bfd_put_8 (output_bfd, 0x8d,
- contents + irel->r_offset - 2);
+ bfd_put_8 (abfd, 0x8d, contents + irel->r_offset - 2);
irel->r_info = ELF32_R_INFO (r_symndx, R_386_GOTOFF);
if (local_got_refcounts != NULL
&& local_got_refcounts[r_symndx] > 0)
&& h != htab->elf.hdynamic
&& SYMBOL_REFERENCES_LOCAL (link_info, h)
&& irel->r_offset >= 2
- && bfd_get_8 (input_bfd,
- contents + irel->r_offset - 2) == 0x8b)
+ && bfd_get_8 (abfd, contents + irel->r_offset - 2) == 0x8b)
{
- bfd_put_8 (output_bfd, 0x8d,
- contents + irel->r_offset - 2);
+ bfd_put_8 (abfd, 0x8d, contents + irel->r_offset - 2);
irel->r_info = ELF32_R_INFO (r_symndx, R_386_GOTOFF);
if (h->got.refcount > 0)
h->got.refcount -= 1;
/* STT_GNU_IFUNC must keep R_X86_64_GOTPCREL relocation. */
if (ELF_ST_TYPE (isym->st_info) != STT_GNU_IFUNC
&& irel->r_offset >= 2
- && bfd_get_8 (input_bfd,
- contents + irel->r_offset - 2) == 0x8b)
+ && bfd_get_8 (abfd, contents + irel->r_offset - 2) == 0x8b)
{
- bfd_put_8 (output_bfd, 0x8d,
- contents + irel->r_offset - 2);
+ bfd_put_8 (abfd, 0x8d, contents + irel->r_offset - 2);
irel->r_info = htab->r_info (r_symndx, R_X86_64_PC32);
if (local_got_refcounts != NULL
&& local_got_refcounts[r_symndx] > 0)
&& h != htab->elf.hdynamic
&& SYMBOL_REFERENCES_LOCAL (link_info, h)
&& irel->r_offset >= 2
- && bfd_get_8 (input_bfd,
- contents + irel->r_offset - 2) == 0x8b)
+ && bfd_get_8 (abfd, contents + irel->r_offset - 2) == 0x8b)
{
- bfd_put_8 (output_bfd, 0x8d,
- contents + irel->r_offset - 2);
+ bfd_put_8 (abfd, 0x8d, contents + irel->r_offset - 2);
irel->r_info = htab->r_info (r_symndx, R_X86_64_PC32);
if (h->got.refcount > 0)
h->got.refcount -= 1;