[Bug target/110709] how to handle the initialization of global struct data for position independent executable application.
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 18 04:19:10 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110709
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I don't understand your question since if we look at the output of GCC we get:
.LC0:
.ascii "const char *text\000"
.section .data.rel.local,"aw"
.align 2
.type user_test, %object
.size user_test, 112
user_test:
.ascii "struct member testChArray\000"
.space 74
.word 10
.word .LC0
.word 27
Only text will have a relocation associated with it since that is the only one
that needs it. Everything else has no need for a relocation since it is just
data.
More information about the Gcc-bugs
mailing list