summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2013-02-18 08:37:49 +0000
committerKostya Serebryany <kcc@google.com>2013-02-18 08:37:49 +0000
commitd843fea3d6f7e7dcfcb6e2a98826b85e5106f189 (patch)
treee98afe588f42dd5a687cd6e5141957ed5d8febb8 /lib
parent8e32db4efc90a4d136786b4bdda62363df99e12c (diff)
[asan] enable asan_prelink_test when gold is the default linker (gold and bfd linker have different flag syntax)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175431 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/asan/lit_tests/Linux/asan_prelink_test.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/asan/lit_tests/Linux/asan_prelink_test.cc b/lib/asan/lit_tests/Linux/asan_prelink_test.cc
index de329fb28..114ffa51e 100644
--- a/lib/asan/lit_tests/Linux/asan_prelink_test.cc
+++ b/lib/asan/lit_tests/Linux/asan_prelink_test.cc
@@ -1,10 +1,11 @@
// Test if asan works with prelink.
-// It does not actually use prelink, but relies on ld's flag -Ttext-segment.
-// This flag is not present in GNU gold, so if the link command line fails
-// we just exit 0.
+// It does not actually use prelink, but relies on ld's flag -Ttext-segment
+// or gold's flag -Ttext (we try the first flag first, if that fails we
+// try the second flag).
//
// RUN: %clangxx_asan -m64 -c %s -o %t.o
-// RUN: %clangxx_asan -m64 -DBUILD_SO=1 -fPIC -shared %s -o %t.so -Wl,-Ttext-segment=0x3600000000 || exit 0
+// RUN: %clangxx_asan -m64 -DBUILD_SO=1 -fPIC -shared %s -o %t.so -Wl,-Ttext-segment=0x3600000000 ||\
+// RUN: %clangxx_asan -m64 -DBUILD_SO=1 -fPIC -shared %s -o %t.so -Wl,-Ttext=0x3600000000
// RUN: %clangxx_asan -m64 %t.o %t.so -Wl,-R. -o %t
// RUN: ASAN_OPTIONS=verbosity=1 %t 2>&1 | FileCheck %s
#if BUILD_SO