[PATCH] bfd sparc64 fixes and tail call optimizations (take 2)
Jakub Jelinek
jakub@redhat.com
Tue May 23 09:00:00 GMT 2000
On Thu, May 18, 2000 at 09:04:17AM -0700, Richard Henderson wrote:
> On Thu, May 18, 2000 at 04:26:11PM +0200, Jakub Jelinek wrote:
> > I have no idea how can I safely optimize the last one (perhaps I'll just
> > teach gcc to always emit 2nd one), but for the first two, the call can be
> > replaced by branch always instruction.
>
> You should probably be doing this with the linker relaxation
> hooks rather than directly in the relocation routines. That
> way you have a way to turn the optimization off if you want.
>
Ok, what about this?
I've added -relax and -no-relax options to gas on SPARC, plus I have
implemented a minimal *_relax_section in elf*_sparc.c, so that it only notes
the section should be relaxed and the actual relaxation is done later in
relocate_section.
I thought about doing it in relax_section for a while, but I think it would
be slower, because I'd have to look up a bunch of things, while at the
relocate_section time all the information is already handy (because the
relocation is being done).
Other relaxations can be done in relax_section if needed, but I don't think this
one must be done there. And ld -relax works as expected.
Jakub
More information about the Binutils
mailing list