From 9dcabc37972061ef5cbec9921b12997b084b4cbf Mon Sep 17 00:00:00 2001 From: Kuba Brecka Date: Thu, 23 Jul 2015 10:55:13 +0000 Subject: [asan] Rename the ABI versioning symbol to '__asan_version_mismatch_check' instead of abusing '__asan_init' We currently version `__asan_init` and when the ABI version doesn't match, the linker gives a `undefined reference to '__asan_init_v5'` message. From this, it might not be obvious that it's actually a version mismatch error. This patch makes the error message much clearer by changing the name of the undefined symbol to be `__asan_version_mismatch_check_xxx` (followed by the version string). We obviously don't want the initializer to be named like that, so it's a separate symbol that is used only for the purpose of version checking. Reviewed at http://reviews.llvm.org/D11004 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243004 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/asan/TestCases/Darwin/interface_symbols_darwin.c | 2 +- test/asan/TestCases/Linux/interface_symbols_linux.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'test/asan/TestCases') diff --git a/test/asan/TestCases/Darwin/interface_symbols_darwin.c b/test/asan/TestCases/Darwin/interface_symbols_darwin.c index bd9bbee84..f37072a3a 100644 --- a/test/asan/TestCases/Darwin/interface_symbols_darwin.c +++ b/test/asan/TestCases/Darwin/interface_symbols_darwin.c @@ -8,7 +8,7 @@ // RUN: nm -g `%clang_asan %s -fsanitize=address -### 2>&1 | grep "libclang_rt.asan_osx_dynamic.dylib" | sed -e 's/.*"\(.*libclang_rt.asan_osx_dynamic.dylib\)".*/\1/'` \ // RUN: | grep " T " | sed "s/.* T //" \ // RUN: | grep "__asan_" | sed "s/___asan_/__asan_/" \ -// RUN: | sed -E "s/__asan_init_v[0-9]+/__asan_init/" \ +// RUN: | sed -E "s/__asan_version_mismatch_check_v[0-9]+/__asan_version_mismatch_check/" \ // RUN: | grep -v "__asan_default_options" \ // RUN: | grep -v "__asan_on_error" > %t.symbols diff --git a/test/asan/TestCases/Linux/interface_symbols_linux.c b/test/asan/TestCases/Linux/interface_symbols_linux.c index 9e876799d..beb44bdc0 100644 --- a/test/asan/TestCases/Linux/interface_symbols_linux.c +++ b/test/asan/TestCases/Linux/interface_symbols_linux.c @@ -3,7 +3,7 @@ // RUN: %clang_asan -O2 %s -o %t.exe // RUN: nm -D %t.exe | grep " T " | sed "s/.* T //" \ // RUN: | grep "__asan_" | sed "s/___asan_/__asan_/" \ -// RUN: | sed -E "s/__asan_init_v[0-9]+/__asan_init/" \ +// RUN: | sed -E "s/__asan_version_mismatch_check_v[0-9]+/__asan_version_mismatch_check/" \ // RUN: | grep -v "__asan_default_options" \ // RUN: | grep -v "__asan_stack_" \ // RUN: | grep -v "__asan_on_error" > %t.symbols -- cgit v1.2.3