* elf32-i386.c (elf_i386_convert_mov_to_lea): Skip if relocation
offset is less than 2.
* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
+2014-10-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-i386.c (elf_i386_convert_mov_to_lea): Skip if relocation
+ offset is less than 2.
+ * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
+
2014-10-14 Alan Modra <amodra@gmail.com>
PR 17453
/* 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)
{
&& h->type != STT_GNU_IFUNC
&& 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)
{
/* 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)
{
&& h->type != STT_GNU_IFUNC
&& 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)
{