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: toolch...@freebsd.org
          Reporter: jbe...@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.
_______________________________________________
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"

Reply via email to