1
# DP: Enable libsanitizer on ARM.
3
--- a/src/gcc/config/arm/arm.c 2013-02-28 10:26:41 +0000
4
+++ b/src/gcc/config/arm/arm.c 2013-03-04 08:39:02 +0000
7
static void arm_canonicalize_comparison (int *code, rtx *op0, rtx *op1,
8
bool op0_preserve_value);
9
+static unsigned HOST_WIDE_INT arm_asan_shadow_offset (void);
12
/* Table of machine attributes. */
13
static const struct attribute_spec arm_attribute_table[] =
15
#define TARGET_CANONICALIZE_COMPARISON \
16
arm_canonicalize_comparison
18
+#undef TARGET_ASAN_SHADOW_OFFSET
19
+#define TARGET_ASAN_SHADOW_OFFSET arm_asan_shadow_offset
21
struct gcc_target targetm = TARGET_INITIALIZER;
23
/* Obstack for minipool constant handling. */
24
@@ -27393,4 +27398,12 @@
28
+/* Implement the TARGET_ASAN_SHADOW_OFFSET hook. */
30
+static unsigned HOST_WIDE_INT
31
+arm_asan_shadow_offset (void)
33
+ return (unsigned HOST_WIDE_INT) 1 << 29;
38
--- a/src/gcc/config/arm/linux-eabi.h 2013-01-10 20:38:27 +0000
39
+++ b/src/gcc/config/arm/linux-eabi.h 2013-03-26 09:59:11 +0000
41
LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
42
LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
45
+#define ASAN_CC1_SPEC "%{fsanitize=*:-funwind-tables}"
49
- LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
50
- GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
51
+ LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC " " ASAN_CC1_SPEC, \
52
+ GNU_USER_TARGET_CC1_SPEC " " ASAN_CC1_SPEC " " \
55
#define CC1PLUS_SPEC \
56
LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC)
58
--- a/src/libsanitizer/configure.tgt 2013-02-11 23:13:37 +0000
59
+++ b/src/libsanitizer/configure.tgt 2013-03-04 08:39:02 +0000
66
x86_64-*-darwin[1]* | i?86-*-darwin[1]*)