[Bug 236141] LLD (unlike BFD) ignores unresolved references in libraries for indirect linking
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Mar 1 22:15:37 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236141
Bug ID: 236141
Summary: LLD (unlike BFD) ignores unresolved references in
libraries for indirect linking
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: toolchain at FreeBSD.org
Reporter: jbeich at FreeBSD.org
ports/ assume if build succeeded then binaries usually work, sans crashes. Only
shared libraries with no immediate consumers need -z defs. Turns out this is no
longer true after bug 214864 e.g., ports r494319.
$ cat a.c
void foo(void);
void bar() { foo(); }
$ cat b.c
int main() {}
$ cc -fPIC -shared a.c -o a.so
$ cc b.c a.so
$ cc -fuse-ld=bfd b.c a.so
/usr/local/bin/ld.bfd: a.so: undefined reference to `foo'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-toolchain
mailing list