This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Optionally sanitize globals in user-defined sections
- From: Andi Kleen <andi at firstfloor dot org>
- To: Yury Gribov <y dot gribov at samsung dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Andrey Ryabinin <a dot ryabinin at samsung dot com>, Jakub Jelinek <jakub at redhat dot com>, Dmitry Vyukov <dvyukov at google dot com>
- Date: Fri, 17 Apr 2015 10:29:54 -0700
- Subject: Re: [PATCH] Optionally sanitize globals in user-defined sections
- Authentication-results: sourceware.org; auth=none
- References: <5530B739 dot 5000306 at samsung dot com> <5530B84E dot 7030709 at samsung dot com>
Yury Gribov <y.gribov@samsung.com> writes:
> +
> +static bool
> +section_sanitized_p (const char *sec)
> +{
> + if (!sanitized_sections)
> + return false;
> + size_t len = strlen (sec);
> + const char *p = sanitized_sections;
> + while ((p = strstr (p, sec)))
> + {
> + if ((p == sanitized_sections || p[-1] == ',')
> + && (p[len] == 0 || p[len] == ','))
> + return true;
No wildcard support? That may be a long option in some cases.
-Andi
--
ak@linux.intel.com -- Speaking for myself only