http://sourceware.org/bugzilla/show_bug.cgi?id=13817

             Bug #: 13817
           Summary: Broken IFUNC support
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassig...@sourceware.org
        ReportedBy: ja...@redhat.com
                CC: hjl.to...@gmail.com
    Classification: Unclassified
            Target: i386-linux


The PR ld/13302 changes broke not only x86_64 (fixed
http://sources.redhat.com/ml/binutils-cvs/2012-03/msg00019.html ), but also
i386.
ifunc3.sh test in prelink fails because of that.
The problem is that you just can't on i?86 use a standard PLT entry for what
you want to do, because unlike x86_64 in i?86 shared libraries/PIEs the PLT
slot assumes that %ebx of the caller points to the _GLOBAL_OFFSET_TABLE_ symbol
of
the library containing the PLT slot.  That is normally the responsibility of
the compiler or assembly writer, but in this case where you just have a
function pointer that resolves internally to an IFUNC symbol you have no such
guarantee.
If that function pointer is called from the main binary, %ebx can contain
random garbage, if it is called from some other shared library, it will contain
address of a different _GLOBAL_OFFSET_TABLE_ symbol.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to