diff options
author | Viktor Kutuzov <vkutuzov@accesssoftek.com> | 2014-03-12 12:44:36 +0000 |
---|---|---|
committer | Viktor Kutuzov <vkutuzov@accesssoftek.com> | 2014-03-12 12:44:36 +0000 |
commit | 05a3c89d1c2f54cd7a23fe2021a3fc428b642864 (patch) | |
tree | fa16ac830dbe96c839a49cdb975e7d5c68a4d426 /lib | |
parent | b28b15a4041cc938863c0ec165e5f0732979fa4e (diff) |
Add FreeBSD 9.2 support to asan_linux.cc
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203658 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/asan/asan_linux.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc index 3482e5de7..5529f56bd 100644 --- a/lib/asan/asan_linux.cc +++ b/lib/asan/asan_linux.cc @@ -39,6 +39,17 @@ #include <sys/ucontext.h> #endif +// x86_64 FreeBSD 9.2 and older define 64-bit register names in both 64-bit +// and 32-bit modes. +#if SANITIZER_FREEBSD +#include <sys/param.h> +# if __FreeBSD_version <= 902001 // v9.2 +# define mc_eip mc_rip +# define mc_ebp mc_rbp +# define mc_esp mc_rsp +# endif +#endif + extern "C" void* _DYNAMIC; namespace __asan { |