[compiler-rt] r175431 - [asan] enable asan_prelink_test when gold is the default linker (gold and bfd linker have different flag syntax)

Kostya Serebryany kcc at google.com
Mon Feb 18 00:37:49 PST 2013


Author: kcc
Date: Mon Feb 18 02:37:49 2013
New Revision: 175431

URL: http://llvm.org/viewvc/llvm-project?rev=175431&view=rev
Log:
[asan] enable asan_prelink_test when gold is the default linker (gold and bfd linker have different flag syntax)

Modified:
    compiler-rt/trunk/lib/asan/lit_tests/Linux/asan_prelink_test.cc

Modified: compiler-rt/trunk/lib/asan/lit_tests/Linux/asan_prelink_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/Linux/asan_prelink_test.cc?rev=175431&r1=175430&r2=175431&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/Linux/asan_prelink_test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/Linux/asan_prelink_test.cc Mon Feb 18 02:37:49 2013
@@ -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





More information about the llvm-commits mailing list