[compiler-rt] r262678 - [asan] Fix odr_c_test failure with gold linker
Alexey Samsonov via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 16:41:39 PST 2016
Author: samsonov
Date: Thu Mar 3 18:41:39 2016
New Revision: 262678
URL: http://llvm.org/viewvc/llvm-project?rev=262678&view=rev
Log:
[asan] Fix odr_c_test failure with gold linker
Summary:
Adds another global to asan's odr_c_test to help force the target global to
not lie at the start of bss with the gold linker where it is always
aligned.
Patch by Derek Bruening!
Modified:
compiler-rt/trunk/test/asan/TestCases/Linux/odr_c_test.c
Modified: compiler-rt/trunk/test/asan/TestCases/Linux/odr_c_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/odr_c_test.c?rev=262678&r1=262677&r2=262678&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/odr_c_test.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/odr_c_test.c Thu Mar 3 18:41:39 2016
@@ -13,6 +13,9 @@
#if defined(FILE1)
__attribute__((aligned(8))) int x;
__attribute__((aligned(1))) char y;
+// The gold linker puts ZZZ at the start of bss (where it is aligned)
+// unless we have a large alternative like Displace:
+__attribute__((aligned(1))) char Displace[105];
__attribute__((aligned(1))) char ZZZ[100];
#elif defined(FILE2)
int ZZZ = 1;
More information about the llvm-commits
mailing list