diff options
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r-- | bfd/elf32-i386.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index b034154fb97..3bc710096aa 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -1778,7 +1778,13 @@ elf_i386_scan_relocs (bfd *abfd, if (r_type == R_386_32 && (sec->flags & SEC_READONLY) == 0) func_pointer_ref = true; - else + + /* IFUNC symbol needs pointer equality in PDE so that + function pointer reference will be resolved to its + PLT entry directly. */ + if (!func_pointer_ref + || (bfd_link_pde (info) + && h->type == STT_GNU_IFUNC)) h->pointer_equality_needed = 1; } |