bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/28849] symbol info passed to linker plugin does not include DT_N


From: hjl.tools at gmail dot com
Subject: [Bug ld/28849] symbol info passed to linker plugin does not include DT_NEEDED shared libraries
Date: Wed, 02 Feb 2022 14:08:44 +0000

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

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 13949
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13949&action=edit
A testcase without -lfto

[hjl@gnu-tgl-3 pr28849-2]$ make
gcc -O2   -c -o z1.o z1.c
gcc  -shared -fPIC -Wl,-soname,libz3.so -o libz3.so z3.c
gcc  -shared -fPIC -Wl,-soname,libz2.so -o libz2.so z2.c
gcc -Wl,--copy-dt-needed-entries -O2 -o zexec1 -L. -Wl,-R,. z1.o -lz2 -lz3
gcc -Wl,--copy-dt-needed-entries -O2 -o zexec2 -L. -Wl,-R,. z1.o -lz2
/usr/local/bin/ld: z1.o: in function `main':
z1.c:(.text.startup+0x5): undefined reference to `should_be_dynamic_in_exec'
collect2: error: ld returned 1 exit status
make: *** [Makefile:17: zexec2] Error 1
[hjl@gnu-tgl-3 pr28849-2]$

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