[llvm-bugs] [Bug 36678] New: Cannot use a regular plt entry for R_386_PC32 with -pie/-shared

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 9 13:54:42 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36678

            Bug ID: 36678
           Summary: Cannot use a regular plt entry for R_386_PC32 with
                    -pie/-shared
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: rafael at espindo.la
                CC: llvm-bugs at lists.llvm.org

If a program has a R_386_PC32 to a function in a shared library, lld tries to
use the plt address as the canonical address of the function.

The preemption will work, but the plt entry assumes that ebx is set, which
might not be the case for R_386_PC32.

What bfd/gold do is enable text relocations. We could probably create special
plt entries that set ebx. I will give that a try.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180309/61547e88/attachment.html>


More information about the llvm-bugs mailing list