bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/22791] New: Don't error when a -pie executable uses a shared f


From: rafael.espindola at gmail dot com
Subject: [Bug gold/22791] New: Don't error when a -pie executable uses a shared function without a got
Date: Mon, 05 Feb 2018 23:01:17 +0000

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

            Bug ID: 22791
           Summary: Don't error when a -pie executable uses a shared
                    function without a got
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: rafael.espindola at gmail dot com
                CC: ian at airs dot com
  Target Milestone: ---

The following testcase fails with gold

$ cat test.s
        .globl  _start
_start:
        callq   vcall
$ cat test2.s
        .global vcall
        .type vcall,@function
vcall:
        nop
$ ld.gold test2.o -o test2.so -shared
$ ld.gold test.o test2.so -o t -pie
ld.gold: error: test.o: requires dynamic R_X86_64_PC32 reloc against 'vcall'
which may overflow at runtime; recompile with -fPIC

But there is no reason why trick of defining a symbol pointing to the plt entry
would not work with a PIE.

Starting with c5bb8910e80c6cd80c63541f86471c18375c8198 bfd uses TEXTREL, but
that seems less desirable than creating a symbol pointing to the plt entry as
is done in the non -pie case.

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