[RFA] ARM OABI - pc-relative relocations

Jerome Guitton guitton@act-europe.fr
Mon Dec 15 17:18:00 GMT 2003


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)...

> Patch is appended.  Comments?  I do not know the proper way to get
> USE_REL set to 0; obviously "#ifndef NOT_VXWORKS" is not the right
> approach.

I am using a targ_cflags in config.bfd (targ_cflags="-DUSE_REL=0").
I may be cleaner.

-- 
Jerome



More information about the Binutils mailing list