diff options
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 3a9fbae..76675cd 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -6060,7 +6060,12 @@ default_section_type_flags (tree decl, const char *name, int reloc) flags = SECTION_WRITE; } else - flags = SECTION_WRITE; + { + flags = SECTION_WRITE; + if (strcmp (name, ".data.rel.ro") == 0 + || strcmp (name, ".data.rel.ro.local") == 0) + flags |= SECTION_RELRO; + } if (decl && DECL_ONE_ONLY (decl)) flags |= SECTION_LINKONCE; |