https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121931
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WONTFIX
Status|UNCONFIRMED |RESOLVED
--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So It looks like GCC implemented not instrumenting variables in user specified
sections since the code was added back in r0-120230-g8240018b0c5da1:
```
/* Don't protect if using user section, often vars placed
into user section from multiple TUs are then assumed
to be an array of such vars, putting padding in there
breaks this assumption. */
|| (DECL_SECTION_NAME (decl) != NULL
&& !symtab_node::get (decl)->implicit_section
&& !section_sanitized_p (DECL_SECTION_NAME (decl)))
```
So the use case of no_sanitize here is not needed.
So yes this is a won't fix for now.