https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127240

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I guess -O2 -fpic
void *ro = &ro;
will do it (or similarly for local, though it is less harmful in that case).
Or even void foo (void) { static void *ro = &ro; asm ("" : : "r" (&ro)); }
The .data.rel.ro, .data.rel.ro.*, .data.rel.ro.local* sections are in wide use
since 2002, so it is definitely too late to change it now.
What we could change is if the name without prefix is ro or local or starts
with ro. or local, emit an extra dot or something similar.
So, for data section for ro use .data.rel..ro etc.

Reply via email to