diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-12-11 13:06:07 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-12-11 13:06:07 +0100 |
commit | a8a6fd74c4ed085c47a69842e77d55aa817a919a (patch) | |
tree | 491a5fed91156bbc060b9acbd315e3c8d7a79b70 /gcc/varasm.c | |
parent | c699deeb3ea44bbc646dc0ec3186160cd126386b (diff) | |
download | gcc-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.c | 3 |
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; |