This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: mips: branches to external labels are broken
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 28 Nov 2002 11:22:08 +1030
- Subject: Re: mips: branches to external labels are broken
- References: <orvg2lrpoe.fsf@free.redhat.lsd.ic.unicamp.br>
On Tue, Nov 26, 2002 at 01:10:57AM -0200, Alexandre Oliva wrote:
> After wasting hours on this problem
I understand fully, and sympathize. :)
One of the ideas I have for cleaner reloc application is to toss out
"bfd_perform_relocation" and "bfd_install_relocation" completely, and
instead implement two functions, "extract_addend" and "insert_addend".
The idea is that "extract_addend" retrieves a REL addend from the
section contents and is a nop on RELA targets. Internally, the linker
(and assembler) then always operate on RELA type addends, and
"insert_addend" writes section contents as necessary.
I suspect that some targets will need these functions to be overridden
via a scheme like the current howto.special_function. Comments
welcome. I want to get the design right before throwing too much code
together.. It may even be worth splitting insert_addend into two
functions, one that does assembler and ld -r output, and one that
does final linking.
--
Alan Modra
IBM OzLabs - Linux Technology Centre