https://sourceware.org/bugzilla/show_bug.cgi?id=27311
Bug ID: 27311
Summary: ld.bfd (symbol from plugin): undefined reference to
symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04
Product: binutils
Version: 2.36
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: mliska at suse dot cz
CC: matz at suse dot de
Target Milestone: ---
Created attachment 13189
--> https://sourceware.org/bugzilla/attachment.cgi?id=13189&action=edit
reproducer
Since the revision, the following does not work:
$ gcc x.i -O2 -c -flto && gcc x.o -lfoo -L.
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: x.o
(symbol from plugin): undefined reference to symbol 'sd_booted@@LIBSYSTEMD_209'
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld:
/usr/lib64/libsystemd.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
while ld.gold is fine:
$ gcc x.i -O2 -c -flto && gcc x.o -lfoo -L. -fuse-ld=gold
and similarly when -flto is omitted:
$ gcc x.i -O2 -c && gcc x.o -lfoo -L. -fuse-ld=gold
$ ldd libfoo.so
...
libsystemd.so.0 => /usr/lib64/libsystemd.so.0 (0x00007ffff7e62000)
--
You are receiving this mail because:
You are on the CC list for the bug.