[llvm-bugs] [Bug 33820] New: After r307364, some versioned symbols do not appear in .so files
llvm-bugs at lists.llvm.org
Mon Jul 17 10:46:50 PDT 2017
Bug ID: 33820
Summary: After r307364, some versioned symbols do not appear in
Assignee: unassignedbugs at nondot.org
Reporter: dimitry at andric.com
CC: llvm-bugs at lists.llvm.org
Created attachment 18806
Minimized test case for symbol versioning problem
As reported on https://reviews.llvm.org/rL307364, after this change I got
errors while linking the FreeBSD base system, similar to:
ld.lld: error: undefined symbol: openat
>>> referenced by dma-mbox-create.c:175 (/home/dim/src/clang500-import/contrib/dma/dma-mbox-create.c:175)
It turns out openat is a versioned symbol, which appears twice in libc.so.7:
$ readelf -sW /lib/libc.so.7 | grep -w openat
3087: 000000000004e2e0 203 FUNC WEAK DEFAULT 11 openat at FBSD_1.1
3088: 000000000004e2e0 203 FUNC WEAK DEFAULT 11 openat@@FBSD_1.2
When doing the link with lld, on aarch64, the openat@@FBSD_1.2 version
disappears, for some reason.
I've attached a minimized test case in a tarball. There is a Makefile in the
extracted directory, which links with both ld.bfd and ld.ldd, and shows the
difference in output.
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs