arm-elf linker mishandling R_ARM_REL32 with -shared
Ian Lance Taylor
ian@wasabisystems.com
Thu Apr 15 15:18:00 GMT 2004
"Dave Korn" <dk@artimi.com> writes:
> > -----Original Message-----
> > From: binutils-owner On Behalf Of Phil Blundell
> > Sent: 15 April 2004 15:03
>
> > Consider a source file:
> >
> > .text
> > .word sym - .
> >
> > .bss
> > sym:
> > .word 0
> >
> > If this is assembled and then linked -shared, the resulting
> > .so ends up
> > with a bogus R_ARM_RELATIVE relocation in .text.
>
>
> What's bogus about it?
After a shared library is linked, the distance between .bss and .text
is fixed, so the value of ".word sym - ." is completely determined.
It should not change depending upon where the shared library is loaded
into memory. But that is exactly the effect of the R_ARM_RELATIVE
relocation.
Ian
More information about the Binutils
mailing list