This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Specify section for jump tables


Hello!

I have a problem with GCC jump tables as generated in
switch-statements. I'm working on a project where I recompile MIPS
binaries into java bytecode (http://spel.bth.se/index.php/Cibyl). This
means that addresses within the text segment no longer have any
meaning, so jumps via registers (for example through function returns)
are handled specially.


Anyway, the jump tables also use jumps via registers, and I would like
to handle these the same way as the other register-jumps. This would
be simple if the jump table would be present in a known section. So
the question is:

  Is it possible to specify the section where jump tables generated by
  GCC end up?

As I understand it, the jump tables now end up in the .rodata section?
This would be fine, I guess, if it could be guaranteed that no other
data ends up there. Strings are placed in the .rodata.str1.4, but is
there any other read-only data that is placed in .rodata?


Thanks,
// Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]