This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Writing addend into instructions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]