[AArch64] Enable Address Sanitizer.

2014-09-26  Christophe Lyon  <christophe.lyon@linaro.org>

	[AArch64] Enable Address Sanitizer.

	gcc/
	* config/aarch64/aarch64-linux.h (ASAN_CC1_SPEC): Define.
        (CC1_SPEC): Define.
        * config/aarch64/aarch64.c (aarch64_asan_shadow_offset): New function.
        (TARGET_ASAN_SHADOW_OFFSET): Define.

	libsanitzer/
	* configure.tgt: Enable build on aarch64*-linux.

From-SVN: r215642
This commit is contained in:
Christophe Lyon 2014-09-26 13:07:42 +00:00 committed by Christophe Lyon
parent bf898b300e
commit a3125fc233
5 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2014-09-26 Christophe Lyon <christophe.lyon@linaro.org>
* config/aarch64/aarch64-linux.h (ASAN_CC1_SPEC): Define.
(CC1_SPEC): Define.
* config/aarch64/aarch64.c (aarch64_asan_shadow_offset): New function.
(TARGET_ASAN_SHADOW_OFFSET): Define.
2014-09-26 Martin Liska <mliska@suse.cz>
* cgraph.c (cgraph_node::release_body): New argument keep_arguments

View File

@ -23,6 +23,12 @@
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
#undef ASAN_CC1_SPEC
#define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
#undef CC1_SPEC
#define CC1_SPEC GNU_USER_TARGET_CC1_SPEC ASAN_CC1_SPEC
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
#define LINUX_TARGET_LINK_SPEC "%{h*} \

View File

@ -9777,6 +9777,14 @@ aarch64_expand_movmem (rtx *operands)
return true;
}
/* Implement the TARGET_ASAN_SHADOW_OFFSET hook. */
static unsigned HOST_WIDE_INT
aarch64_asan_shadow_offset (void)
{
return (HOST_WIDE_INT_1 << 36);
}
#undef TARGET_ADDRESS_COST
#define TARGET_ADDRESS_COST aarch64_address_cost
@ -10023,6 +10031,9 @@ aarch64_expand_movmem (rtx *operands)
#undef TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS
#define TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS true
#undef TARGET_ASAN_SHADOW_OFFSET
#define TARGET_ASAN_SHADOW_OFFSET aarch64_asan_shadow_offset
struct gcc_target targetm = TARGET_INITIALIZER;
#include "gt-aarch64.h"

View File

@ -1,3 +1,7 @@
2014-09-26 Christophe Lyon <christophe.lyon@linaro.org>
* configure.tgt: Enable build on aarch64*-linux.
2014-09-19 Kostya Serebryany <kcc@google.com>
* All source files: Merge from upstream r218156.

View File

@ -35,6 +35,8 @@ case "${target}" in
;;
arm*-*-linux*)
;;
aarch64*-*-linux*)
;;
x86_64-*-darwin[1]* | i?86-*-darwin[1]*)
TSAN_SUPPORTED=no
;;