bfd 2.10.90: Handle R_MIPS_REL32 relocations correctly
Maciej W. Rozycki
macro@ds2.pg.gda.pl
Tue Jun 20 10:03:00 GMT 2000
Hi Ulf,
> > Basically any reference from executable's .data section to a .text object
> > defined within a shared library. For example:
> >
> > #include <stdlib.h>
> > void (*myfree)(void *) = free;
> >
> > int main(void)
> > {
> > return 0;
> > }
> >
> > I use gcc 2.95.2, so your problem might actually be different.
>
> I tried this on both 2.91.66 and 2.96 that I have installed and I
> didn't experience any problems.
How does `objdump -r' on your relocateable look like? I've seen this
happening for R_MIPS_32 relocations in .data section that refer to a
versioned symbol in a shared object upon linking.
OK, try to supply:
.data
.globl myfree
myfree:
.word free
.text
.globl main
main:
to gas and then link it instead.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
More information about the Binutils
mailing list