[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
This commit is contained in:
Alexey Samsonov 2016-03-04 00:41:39 +00:00
parent a3135be77d
commit c8f2c957e0
1 changed files with 3 additions and 0 deletions

View File

@ -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;