[Bug target/92902] jump tables are put into the text section
mikpelinux at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Dec 12 22:59:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92902
Mikael Pettersson <mikpelinux at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpelinux at gmail dot com
--- Comment #17 from Mikael Pettersson <mikpelinux at gmail dot com> ---
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.
More information about the Gcc-bugs
mailing list