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]
Other format: [Raw text]

Re: [RFA] ARM OABI - pc-relative relocations


Jerome Guitton <guitton@act-europe.fr> writes:

> Zack Weinberg (zack@codesourcery.com):
>
>> I already have patches for this.  They are not quite suitable for
>> inclusion, but I think only small changes would be required.  Also I
>> am not sure they solve your problem.  What I did was hack up BFD to
>> produce RELA relocs for ARM, and then I modified GAS so that in
>> RELA/arm mode it always sets the instruction addend to zero.  The
>> linker then need not know or care about the quirky old-ABI spec for
>> RELA.  Conveniently, this is what WRS' tools do, too.
>
> Interesting, I have the more or less the same patch...  I was trying
> to clean it up before a possible inclusion. If you want to do it
> please go ahead!
>
> My experience of the WRS' tools is that they do something more
> perverse... They use the instruction addend. So the linker _do_ need to
> know about the old-ABI spec (the src_mask should not be null)...

My experience is that their linker and loader do honor the instruction
addend if it's nonzero, but their assembler doesn't ever set it to
anything but zero.  So setting it to zero in the assembler, and
ignoring it in the linker, is good enough for interoperability.  I
agree that honoring the letter of the old-ABI spec might be desirable,
but I don't have time to figure out how at the moment, or how to make
that play nice with the revision to the spec that eliminates this
quirk.

zw


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