diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2016-03-04 00:41:39 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2016-03-04 00:41:39 +0000 |
commit | c8f2c957e077e39283894940576e6e8c9268b8d6 (patch) | |
tree | ed72c1c8b94b809aa1f2314117984e9b19b72809 | |
parent | a3135be77d3569f1d423da815da77a68f6a71fa5 (diff) | |
download | bcm5719-llvm-c8f2c957e077e39283894940576e6e8c9268b8d6.tar.gz bcm5719-llvm-c8f2c957e077e39283894940576e6e8c9268b8d6.zip |
[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!
llvm-svn: 262678
-rw-r--r-- | compiler-rt/test/asan/TestCases/Linux/odr_c_test.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler-rt/test/asan/TestCases/Linux/odr_c_test.c b/compiler-rt/test/asan/TestCases/Linux/odr_c_test.c index 75f46ed1325..b1d23493b57 100644 --- a/compiler-rt/test/asan/TestCases/Linux/odr_c_test.c +++ b/compiler-rt/test/asan/TestCases/Linux/odr_c_test.c @@ -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; |