[Bug target/92902] jump tables are put into the text section
gcc at tribudubois dot net
gcc-bugzilla@gcc.gnu.org
Sat Dec 14 07:59:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92902
--- Comment #18 from Jean-Christophe Dubois <gcc at tribudubois dot net> ---
(In reply to Mikael Pettersson from comment #17)
> My though reading this is that most RICSs have problems synthesizing large
> literals, so putting a jump table in .text might increase the likelihood of
> its address being synthesizable with a PC + offset addressing mode. Putting
> it in .rodata would almost certainly require you to indirect through the GOT
> to address it. That said, if the user wants .text to be execute-only, then
> the jump table ought to land in .rodata.
As far as I can say with the assembly code generated today for SPARC32, the
jump tables could be anywhere in memory (4GB address space) with the exact same
code. I don't think it would trigger additional indirection.
It might be different for other architecture.
More information about the Gcc-bugs
mailing list