aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-11-14 19:28:43 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2013-11-14 19:28:43 +0100
commit8c8b21e4f737fdf0e75fcc4a414eee0d4ce56113 (patch)
tree0213dbfa59e7b40f340629ba9057c38411ae7817 /gcc
parent13e0981af51244eef62156d1e7c4810e87d616da (diff)
downloadgcc-8c8b21e4f737fdf0e75fcc4a414eee0d4ce56113.zip
gcc-8c8b21e4f737fdf0e75fcc4a414eee0d4ce56113.tar.gz
gcc-8c8b21e4f737fdf0e75fcc4a414eee0d4ce56113.tar.bz2
re PR sanitizer/59122 (libsanitizer merge from upstream r191666 causes duplicate symbol errors)
PR sanitizer/59122 * asan.c (asan_emit_stack_protection): Ensure -fsection-anchors isn't confused by the artificial decl. From-SVN: r204801
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/asan.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 307ac54..8d0d893 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/59122
+ * asan.c (asan_emit_stack_protection): Ensure -fsection-anchors
+ isn't confused by the artificial decl.
+
2013-11-14 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* config/rs6000/rs6000.c (rs6000_emit_prologue): Do not place a
diff --git a/gcc/asan.c b/gcc/asan.c
index 9b6f968..a3fb51f 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -1002,6 +1002,9 @@ asan_emit_stack_protection (rtx base, HOST_WIDE_INT *offsets, tree *decls,
TREE_STATIC (decl) = 1;
TREE_PUBLIC (decl) = 0;
TREE_USED (decl) = 1;
+ DECL_INITIAL (decl) = decl;
+ TREE_ASM_WRITTEN (decl) = 1;
+ TREE_ASM_WRITTEN (id) = 1;
emit_move_insn (mem, expand_normal (build_fold_addr_expr (decl)));
shadow_base = expand_binop (Pmode, lshr_optab, base,
GEN_INT (ASAN_SHADOW_SHIFT),