From 18af8d16cf71b75081f20184d34206ff4ebce025 Mon Sep 17 00:00:00 2001 From: Yury Gribov Date: Fri, 17 Apr 2015 07:51:02 +0000 Subject: asan.c (set_sanitized_sections): New function. 2015-04-17 Yury Gribov gcc/ * asan.c (set_sanitized_sections): New function. (section_sanitized_p): Ditto. (asan_protect_global): Optionally sanitize user-defined sections. * asan.h (set_sanitized_sections): Declare new function. * common.opt (fsanitize-sections): New option. * doc/invoke.texi (-fsanitize-sections): Document new option. * opts-global.c (handle_common_deferred_options): Handle new option. gcc/testsuite/ * c-c++-common/asan/user-section-1.c: New test. From-SVN: r222168 --- gcc/common.opt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/common.opt') diff --git a/gcc/common.opt b/gcc/common.opt index b49ac46..380848c 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -897,6 +897,11 @@ fasan-shadow-offset= Common Joined RejectNegative Var(common_deferred_options) Defer -fasan-shadow-offset= Use custom shadow memory offset. +fsanitize-sections= +Common Joined RejectNegative Var(common_deferred_options) Defer +-fsanitize-sections= Sanitize global variables +in user-defined sections. + fsanitize-recover= Common Report Joined After diagnosing undefined behavior attempt to continue execution -- cgit v1.1