diff options
author | Will Schmidt <will_schmidt@vnet.ibm.com> | 2014-10-15 18:34:04 +0000 |
---|---|---|
committer | Will Schmidt <will_schmidt@vnet.ibm.com> | 2014-10-15 18:34:04 +0000 |
commit | c57a8a6547299f9b65dadcab02dde232b88fb31d (patch) | |
tree | ddd6e456b02329fa09a848507f68aaf4d247dda8 /lib/asan/asan_mapping.h | |
parent | 1d7819bcce8836dc543e200d6acc1fac8ded0a36 (diff) |
[compiler-rt] Enable ASAN for powerpc64le-linux
Whitespace update for lint check by myself (Will). Otherwise code and comments by Peter Bergner, as previously seen on llvm-commits.
The following patch gets ASAN somewhat working on powerpc64le-linux.
It currently assumes the LE kernel uses 46-bit addressing, which is
true, but it doesn't solve the case for BE where it may be 44 or
46 bits. That can be fixed with a follow on patch.
There are some test suite fails even with this patch that I haven't had
time to solve yet, but this is better than the state it is in now.
The limited debugging of those test suite fails seems to show that the
address map for 46-bit addressing has changed and so we'll need to
modify the shadow memory location slightly. Again, that can be fixed
with a follow on patch.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@219827 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_mapping.h')
-rw-r--r-- | lib/asan/asan_mapping.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/asan/asan_mapping.h b/lib/asan/asan_mapping.h index 8acc99a1f..68428e1f5 100644 --- a/lib/asan/asan_mapping.h +++ b/lib/asan/asan_mapping.h @@ -87,7 +87,11 @@ static const u64 kDefaultShadowOffset64 = 1ULL << 44; static const u64 kDefaultShort64bitShadowOffset = 0x7FFF8000; // < 2G. static const u64 kAArch64_ShadowOffset64 = 1ULL << 36; static const u64 kMIPS32_ShadowOffset32 = 0x0aaa8000; +#if defined(__powerpc64__) && defined(__BIG_ENDIAN__) static const u64 kPPC64_ShadowOffset64 = 1ULL << 41; +#elif defined(__powerpc64__) && defined(__LITTLE_ENDIAN__) +static const u64 kPPC64_ShadowOffset64 = 1ULL << 43; +#endif static const u64 kFreeBSD_ShadowOffset32 = 1ULL << 30; // 0x40000000 static const u64 kFreeBSD_ShadowOffset64 = 1ULL << 46; // 0x400000000000 |