diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-09-23 01:03:51 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-09-23 01:03:51 +0000 |
commit | ce2e16f00c5f544879e8ac1e149b5fb268241817 (patch) | |
tree | a8fba6bbe7813194c0c3893a18a46b26942c7fcd /llvm/lib/Target/X86/X86Subtarget.h | |
parent | b54a72ef78f3236a6c831687d505cdb725cb51ff (diff) | |
download | bcm5719-llvm-ce2e16f00c5f544879e8ac1e149b5fb268241817.tar.gz bcm5719-llvm-ce2e16f00c5f544879e8ac1e149b5fb268241817.zip |
Android support for SafeStack.
Add two new ways of accessing the unsafe stack pointer:
* At a fixed offset from the thread TLS base. This is very similar to
StackProtector cookies, but we plan to extend it to other backends
(ARM in particular) soon. Bionic-side implementation here:
https://android-review.googlesource.com/170988.
* Via a function call, as a fallback for platforms that provide
neither a fixed TLS slot, nor a reasonable TLS implementation (i.e.
not emutls).
llvm-svn: 248357
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.h')
-rw-r--r-- | llvm/lib/Target/X86/X86Subtarget.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h index c5d74e66b7b..52e68c08180 100644 --- a/llvm/lib/Target/X86/X86Subtarget.h +++ b/llvm/lib/Target/X86/X86Subtarget.h @@ -394,6 +394,9 @@ public: bool isTargetMachO() const { return TargetTriple.isOSBinFormatMachO(); } bool isTargetLinux() const { return TargetTriple.isOSLinux(); } + bool isTargetAndroid() const { + return TargetTriple.getEnvironment() == Triple::Android; + } bool isTargetNaCl() const { return TargetTriple.isOSNaCl(); } bool isTargetNaCl32() const { return isTargetNaCl() && !is64Bit(); } bool isTargetNaCl64() const { return isTargetNaCl() && is64Bit(); } |