diff options
-rw-r--r-- | gcc/varasm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 0fac368..5b2e123 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -294,6 +294,7 @@ get_section (const char *name, unsigned int flags, tree decl, flags |= SECTION_NAMED; if (HAVE_GAS_SHF_GNU_RETAIN && decl != nullptr + && DECL_P (decl) && DECL_PRESERVE_P (decl)) flags |= SECTION_RETAIN; if (*slot == NULL) |