bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/13817] New: Broken IFUNC support


From: jakub at redhat dot com
Subject: [Bug ld/13817] New: Broken IFUNC support
Date: Wed, 07 Mar 2012 10:21:33 +0000

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: address@hidden
        ReportedBy: address@hidden
                CC: address@hidden
    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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]