[llvm-bugs] [Bug 28681] New: Runtime library not exposing some _Unwind symbols.
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jul 24 03:07:25 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28681
Bug ID: 28681
Summary: Runtime library not exposing some _Unwind symbols.
Product: compiler-rt
Version: 3.9
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: compiler-rt
Assignee: unassignedbugs at nondot.org
Reporter: krejzi at email.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Currently, compiler-rt isn't exposing some _Unwind symbols exposed by
libgcc_s.so, which makes it unsuitable replacement for libgcc_s.so.
While building clang with another clang that uses compiler-rt as its runtime
lib, on Linux x86_64, I get the following error:
../../sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_unwind_linux_libcdep.cc.o:
In function `__sanitizer::BufferedStackTrace::SlowUnwindStack(unsigned long,
unsigned int)':
/sources/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc:125:
undefined reference to `_Unwind_Backtrace'
../../sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_unwind_linux_libcdep.cc.o:
In function `SlowUnwindStack':
/sources/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc:125:
undefined reference to `_Unwind_Backtrace'
clang-3.9: error: linker command failed with exit code 1 (use -v to see
invocation)
Grepping for _Unwind on libgcc_s.so, I get the following:
# strings libgcc_s.so.1 | grep Unwind
_Unwind_GetGR
_Unwind_GetCFA
_Unwind_SetGR
_Unwind_GetIP
_Unwind_GetIPInfo
_Unwind_SetIP
_Unwind_GetLanguageSpecificData
_Unwind_GetRegionStart
_Unwind_FindEnclosingFunction
_Unwind_Find_FDE
_Unwind_GetDataRelBase
_Unwind_GetTextRelBase
_Unwind_RaiseException
_Unwind_ForcedUnwind
_Unwind_Resume
_Unwind_Resume_or_Rethrow
_Unwind_DeleteException
_Unwind_Backtrace
Doing the same for clang runtime:
# strings libclang_rt.builtins-x86_64.a | grep Unwind
_Unwind_GetLanguageSpecificData
_Unwind_GetIP
_Unwind_GetRegionStart
_Unwind_SetGR
_Unwind_SetIP
The rest of the functions seems to be exposed by llvm's libunwind. The solution
is to either link libunwind statically to the runtime or explicitly specify it
at linker command line when adding compiler-rt runtime libs (it seemed to work
manually).
--
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/20160724/8b7046e0/attachment.html>
More information about the llvm-bugs
mailing list