Message ID | 20110205170424.GC30899@tyan-ft48-01.lab.bos.redhat.com |
---|---|
State | New |
Headers | show |
--- gcc/varasm.c.jj 2011-02-03 20:09:38.000000000 +0100 +++ gcc/varasm.c 2011-02-05 00:01:59.911796344 +0100 @@ -6060,7 +6060,12 @@ default_section_type_flags (tree decl, c 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;