llvm-project/compiler-rt/lib
Evgeniy Stepanov 75a35179de [Sanitizers, CMake] Also use version script for libclang_rt.asan-i386.so
When building LLVM on x86_64-pc-linux-gnu (Fedora 25) with the bundled gcc 6.4.1
which uses gld 2.26.1-1.fc25, the dynamic/Asan-i386-calls-Dynamic-Test and
dynamic/Asan-i386-inline-Dynamic-Test tests failed to link with

/usr/bin/ld: /var/scratch/gcc/llvm/dist/lib/clang/6.0.0/lib/linux/libclang_rt.asan-i386.so: fork: invalid version 21 (max 0)
/var/scratch/gcc/llvm/dist/lib/clang/6.0.0/lib/linux/libclang_rt.asan-i386.so: error adding symbols: Bad value

I tried building with a self-compiled gcc 7.1.0 using gld 2.28, but the error remained.

It seems the error has been hit before (cf. https://reviews.llvm.org/rL314085), but
no real explanation has been found.

However, the problem goes away when linking the i386 libclang_rt.asan with a version
script just like every other variant is. Not using the version script in this single case
dates back to the initial introduction of the version script in r236551, but this change
was just checked in without any explanation AFAICT.

Since I've not found any other workaround and no reason for not always using the
version script, I propose to do so.

Tested on x86_64-pc-linux-gnu.

Patch by Rainer Orth.

Differential Revision: https://reviews.llvm.org/D39795

llvm-svn: 317738
2017-11-08 22:51:09 +00:00
..
BlocksRuntime [compiler-rt] Test commit: remove some trailing white spaces. 2017-08-25 19:36:30 +00:00
asan [Sanitizers, CMake] Also use version script for libclang_rt.asan-i386.so 2017-11-08 22:51:09 +00:00
builtins [WebAssembly] Include GENERIC_TF_SOURCES in wasm builds 2017-11-07 19:03:11 +00:00
cfi (NFC) Rename GetMax{,User}VirtualAddress. 2017-11-07 23:51:22 +00:00
dfsan [sanitizer_common] Move filesystem-related code out of sanitizer_common.cc 2017-07-22 01:46:40 +00:00
esan [esan] Use stack_t instead of struct sigaltstack (PR34011) 2017-08-22 21:54:37 +00:00
fuzzer [fuzzer] Fix nested mallocs 2017-11-02 04:12:10 +00:00
interception [asan] Intercept heap routines in VS2010 CRT 2017-10-30 17:26:13 +00:00
lsan [LSan] Detect dynamic loader by its base address. 2017-11-06 21:27:06 +00:00
msan (NFC) Rename GetMax{,User}VirtualAddress. 2017-11-07 23:51:22 +00:00
profile Implement flock for Windows in compiler-rt 2017-11-08 19:11:54 +00:00
safestack Enable SafeStack on NetBSD 2017-08-10 18:40:09 +00:00
sanitizer_common [sanitizer] Add Scudo to the sanitizer lint checks. 2017-11-08 16:42:29 +00:00
scudo [sanitizer] Add Scudo to the sanitizer lint checks. 2017-11-08 16:42:29 +00:00
stats Support compiler-rt builtins 2017-07-28 03:39:38 +00:00
tsan Correct atexit(3) support in TSan/NetBSD 2017-11-08 22:34:17 +00:00
ubsan [sanitizer] Don't intercept signal and sigaction on Fuchsia 2017-10-09 18:29:52 +00:00
ubsan_minimal [ubsan-minimal] Make the interface more compatible with RTUBSan 2017-09-19 06:46:36 +00:00
xray [XRay] [compiler-rt] fix build by including errno.h into FDR mode 2017-10-28 01:35:07 +00:00
CMakeLists.txt [cmake] Add a separate CMake var to control profile runtime 2017-10-02 05:03:55 +00:00