bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/25593] New: --as-needed breaks DT_NEEDED order with linker plugi


From: rguenth at gcc dot gnu.org
Subject: [Bug ld/25593] New: --as-needed breaks DT_NEEDED order with linker plugin
Date: Mon, 24 Feb 2020 12:18:24 +0000

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

            Bug ID: 25593
           Summary: --as-needed breaks DT_NEEDED order with linker plugin
           Product: binutils
           Version: 2.33
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

echo 'void foo() {}' > libt.c
echo 'void foo(); int main() { foo(); }' > t.c
gcc -o libt.so -shared libt.c -Wl,-soname,libt.so -fPIC -flto
gcc -c t.c -flto
gcc -Wl,--as-needed t.o libt.so
readelf -d a.out | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libt.so]

but libc has to come last so the program can use RTLD_NEXT to arrive at
symbols from libc.  Works fine with gold.

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