bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/19031] New: R_386_PC32 does not imply a call


From: rafael.espindola at gmail dot com
Subject: [Bug gold/19031] New: R_386_PC32 does not imply a call
Date: Wed, 30 Sep 2015 13:34:28 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=19031

            Bug ID: 19031
           Summary: R_386_PC32 does not imply a call
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: rafael.espindola at gmail dot com
                CC: amonakov at gmail dot com, bugdal at aerifal dot cx,
                    hjl.tools at gmail dot com, ian at airs dot com
  Target Milestone: ---

Created attachment 8652
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8652&action=edit
testcase

In order for function pointer comparisons to work when a non -fPIC non -fPIE
program uses a shared library symbol the static linker has to create an
undefined symbol with a value that points to the plt entry.

Currently both gold and bfd ld assume that R_386_PC32 is a call and therefore
doesn't capture the address, but there is no such guarantee in the psabi.

The attached patch has two functions, g and h. g will get the function address
of f using the GOT. h will get the function address of f using R_386_PC32. If f
is linked in from a .o, both return the same value. If f is linked in from a
.so one gets the body of f and another gets the plt entry.

-- 
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]