RFA: Fix FRV switch table generation in PIC mode
Nick Clifton
nickc@redhat.com
Thu Feb 22 21:25:00 GMT 2007
Hi Richard,
>> It is not these relocations which are not working (they do). It is the
>> fact that the generated switch table code uses the .L8 label as the
>> address of the switch table in RAM, but currently the .L8 label is in
>> the .text section and the table itself is in the .rodata section....
>
> Yes, I realize that. But if you take away *all* of the
> special handling, including the JUMP_TABLES_IN_TEXT_SECTION,
> does the program still work?
>
> Basically, why the motivation for JUMP_TABLES_IN_TEXT_SECTION?
> It looks left over from a copy from mips16 code, where there
> was in fact a justification.
Ah - now that I could not say. All I know is that defining
JUMP_TABLES_IN_TEXT_SECTION in this way creates working binaries when
compiling with -fPIC, whereas not applying the patch means broken
binaries. I do not know if having the jump tables in the .text section
is a hold over from the mips16 code or if it is a necessary feature of
the FRV port.
Cheers
Nick
More information about the Gcc-patches
mailing list