https://llvm.org/bugs/show_bug.cgi?id=31495
Bug ID: 31495 Summary: LLD fails to link object file with version-extended symbol Product: lld Version: unspecified Hardware: PC OS: FreeBSD Status: NEW Severity: normal Priority: P Component: ELF Assignee: unassignedb...@nondot.org Reporter: ema...@freebsd.org CC: llvm-bugs@lists.llvm.org Blocks: 23214 Classification: Unclassified FreeBSD's "pkg" package management tool is currently building an object file that depends on a compatibility symbol. I think this needs to be addressed in pkg itself, but GNU ld is able to link such an object. LLD reports: % ld.lld $(cat response.txt) /tank/emaste/src/llvm/build-nodebug/bin/ld.lld: error: wrkdirs/usr/ports/ports-mgmt/pkg/work/pkg-1.7.2/libpkg/.libs/libpkg.lax/libbsd_compat.a/libbsd_compat_la-basename.o: symbol basename@FBSD_1.0 has undefined version FBSD_1.0 /tank/emaste/src/llvm/build-nodebug/bin/ld.lld: error: wrkdirs/usr/ports/ports-mgmt/pkg/work/pkg-1.7.2/libpkg/.libs/libpkg.lax/libbsd_compat.a/libbsd_compat_la-dirname.o: symbol dirname@FBSD_1.0 has undefined version FBSD_1.0 ld.bfd has no complaints: % ld.bfd $(cat response.txt) % The offending symbol is basename@FBSD_1.0: % readelf -s libbsd_compat_la-basename.o Symbol table '.symtab' contains 5 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FILE LOCAL DEFAULT ABS basename.c 2: 0000000000000000 0 SECTION LOCAL DEFAULT 2 3: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND basename@FBSD_1.0 4: 0000000000000000 10 FUNC GLOBAL DEFAULT 2 bsd_basename And indeed, a .o file has no symver information: % readelf -V libbsd_compat_la-basename.o No version information found in this file. I suspect we should accept version-extended symbols from object files. Reprodcer available at https://people.freebsd.org/~emaste/lld/object-sym-version.cpio -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs