aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-12-11 13:06:07 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2012-12-11 13:06:07 +0100
commita8a6fd74c4ed085c47a69842e77d55aa817a919a (patch)
tree491a5fed91156bbc060b9acbd315e3c8d7a79b70 /gcc/varasm.c
parentc699deeb3ea44bbc646dc0ec3186160cd126386b (diff)
downloadgcc-a8a6fd74c4ed085c47a69842e77d55aa817a919a.zip
gcc-a8a6fd74c4ed085c47a69842e77d55aa817a919a.tar.gz
gcc-a8a6fd74c4ed085c47a69842e77d55aa817a919a.tar.bz2
varasm.c (get_variable_section): Don't return lcomm_section for asan_protect_global decls.
* varasm.c (get_variable_section): Don't return lcomm_section for asan_protect_global decls. * asan.c (asan_protect_global): Only avoid public common variables. Don't call get_variable_section here. From-SVN: r194393
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 3c420c0..b6170e6 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1034,7 +1034,8 @@ get_variable_section (tree decl, bool prefer_noswitch_p)
&& !(prefer_noswitch_p && targetm.have_switchable_bss_sections)
&& bss_initializer_p (decl))
{
- if (!TREE_PUBLIC (decl))
+ if (!TREE_PUBLIC (decl)
+ && !(flag_asan && asan_protect_global (decl)))
return lcomm_section;
if (bss_noswitch_section)
return bss_noswitch_section;