diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-12-11 12:06:07 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2012-12-11 12:06:07 +0000 |
commit | 4f481e8c6d7bc65796c2ea03782e9ac598dabb45 (patch) | |
tree | 491a5fed91156bbc060b9acbd315e3c8d7a79b70 /gcc/varasm.c | |
parent | 2bb0a29d02d2dbbc992aab64846afd019e97071c (diff) |
* 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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@194393 138bc75d-0d04-0410-961f-82ee72b054a4
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 3c420c013d8..b6170e6d8d2 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; |