[llvm-bugs] [Bug 36623] llvm doesn't handle @@@ in symbol names at lto time
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Mar 23 13:21:02 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=36623
Dimitry Andric <dimitry at andric.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |---
Status|RESOLVED |REOPENED
--- Comment #3 from Dimitry Andric <dimitry at andric.com> ---
There's still an issue with this fix (either with r327930 or something else):
the symbol version gets tacked on *twice* in the final shared library.
E.g. when using test.ll from the description, and clang + lld trunk r328345:
$ ~/ins/llvm-trunk-r328345/bin/clang -O2 -fPIC -flto -c test.ll -o test.pico
warning: overriding the module target triple with x86_64-unknown-freebsd12.0
[-Woverride-module]
1 warning generated.
$ ~/ins/llvm-trunk-r328345/bin/ld.lld --eh-frame-hdr -Bshareable
--hash-style=both --enable-new-dtags -o t.so /usr/lib/crti.o
/usr/lib/crtbeginS.o -L/usr/lib -plugin
/home/dim/ins/llvm-trunk-r328345/lib/LLVMgold.so -plugin-opt=mcpu=x86-64
-plugin-opt=O2 test.pico --version-script test.ver -lgcc --as-needed -lgcc_s
--no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtendS.o
/usr/lib/crtn.o
$ readelf -sW t.so
Symbol table (.dynsym) contains 7 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
2: 0000000000000000 0 FUNC WEAK DEFAULT UND
__cxa_finalize at FBSD_1.0 (3)
3: 00000000000010dc 0 FUNC GLOBAL DEFAULT 14 _fini
4: 00000000000010c8 0 FUNC GLOBAL DEFAULT 13 _init
5: 00000000000010c8 0 NOTYPE GLOBAL DEFAULT 12 foo@@VER1@@VER1 (2)
6: 00000000000031a8 0 NOTYPE GLOBAL DEFAULT 22 _end
Symbol table (.symtab) contains 21 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000003000 8 OBJECT LOCAL DEFAULT 18 __CTOR_LIST__
2: 0000000000003010 8 OBJECT LOCAL DEFAULT 19 __DTOR_LIST__
3: 0000000000003020 0 OBJECT LOCAL DEFAULT 20 __JCR_LIST__
4: 0000000000001000 85 FUNC LOCAL DEFAULT 12
__do_global_dtors_aux
5: 0000000000002010 1 OBJECT LOCAL DEFAULT 16
__do_global_dtors_aux.completed
6: 0000000000002008 8 OBJECT LOCAL DEFAULT 16
__do_global_dtors_aux.p
7: 0000000000001060 38 FUNC LOCAL DEFAULT 12 frame_dummy
8: 0000000000003008 8 OBJECT LOCAL DEFAULT 18 __CTOR_END__
9: 0000000000003018 8 OBJECT LOCAL DEFAULT 19 __DTOR_END__
10: 000000000000045c 4 OBJECT LOCAL DEFAULT 11 __FRAME_END__
11: 0000000000003020 8 OBJECT LOCAL DEFAULT 20 __JCR_END__
12: 0000000000001090 54 FUNC LOCAL DEFAULT 12
__do_global_ctors_aux
13: 0000000000002000 8 OBJECT LOCAL HIDDEN 16 __dso_handle
14: 0000000000003028 0 NOTYPE LOCAL HIDDEN 21 _DYNAMIC
15: 00000000000010dc 0 FUNC GLOBAL DEFAULT 14 _fini
16: 00000000000010c8 0 FUNC GLOBAL DEFAULT 13 _init
17: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
18: 0000000000000000 0 FUNC WEAK DEFAULT UND __cxa_finalize
19: 00000000000010c8 0 NOTYPE GLOBAL DEFAULT 12 foo@@VER1
20: 00000000000031a8 0 NOTYPE GLOBAL DEFAULT 22 _end
The "foo@@VER1@@VER1" dynamic symbol is clearly incorrect.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180323/bc75267a/attachment.html>
More information about the llvm-bugs
mailing list