This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Writing addend into instructions
- To: binutils at sources dot redhat dot com
- Subject: Writing addend into instructions
- From: Torbjorn Granlund <tege at swox dot com>
- Date: 13 Mar 2001 21:53:26 +0100
Some assembler backends write addends into relocation fields, in
addition to into the relocation record itself. An example is
tc-ppc.c.
For some object file formats, that is actually desirable. IBM's XCOFF
format is one example.
But for ELF, writing the addends into, say, a 16-bit instruction field
seems like a strange thing to do. Most ELF ABIs require that such
addends are ignored anyway.
We've rewritten md_apply_fix3 of tc-ppc.c, and the new version only
patches relocation addresses when a fixup is fully resolved, never
when a relocation with a separate addend is generated.
Does anybody see any problems with such a change?
--
Torbjörn