PATCH: Re: 971225: bootstrap fails on powerpc-unknown-linux-gnu*
Jeffrey A Law
law@cygnus.com
Sun Feb 1 13:18:00 GMT 1998
In message <v03130302b0f6b969485c@[195.180.235.165]>you write:
> Hi,
>
> the reported bootstrap fail on Linux/PPC was introduced in rev. 1.3 of
> rs6000/sysv4.h by a #undef JUMP_TABLES_IN_TEXT_SECTION. linux.h includes
> sysv4.h but didn't override the change.
> Eventually this hides a bug in binutils?
>
> Bye,
> Franz.
>
>
> Tue Jan 29 22:44:00 1998 Franz Sirl <franz.sirl-kernel@lauterbach.com>
> * rs6000/linux.h: define JUMP_TABLES_IN_TEXT_SECTION
Thanks. I installed this patch.
As Geoffrey noted, the real problem is how we handle switch tables
in general. I ran into the same group of problems when trying to
change the PA port from using an indexed jump into jumps to case
labels. We had something like this:
start of tablejump insn
blr
nop
start of ADDR_VEC insn
jmp case1
nop
jmp case2
nop
jmp case3
What I wanted to do was a more traditional scheme where either offsets
or actual locations are kept as a table (it's the first step towards
a much more branch prediction friendly tablejump on the PA).
On the PA it is absolutely necessary to never mix data into a code
section. So these tables needed to go into readonly data... And
bang I ran into the same problems y'all are running into.
I banged my head on the wall for about an hour or so trying to find
an easy solution and just gave up when I realized that some fundamental
changes in our switch/tablejump code would be necessary to make it
work.
jeff
More information about the Gcc
mailing list