Not linking 32-bit and 64-bit objects
matthew green
mrg@redhat.com
Wed Mar 20 23:07:00 GMT 2002
It is not working properly.
It gives an error message, but then crashes anyway, e.g.:
$ gcc -m64 -c helloworld.c
$ gcc -o helloworld helloworld.o
/usr/bin/ld: warning: sparc:v9 architecture of input file `helloworld.o' is incompatible with sparc output
/usr/bin/ld: BFD 2.11.93.0.2 20020207 assertion fail elflink.h:2817
helloworld.o: In function `main':
helloworld.o(.text+0x0): relocation truncated to fit: R_SPARC_DISP8 *UND*
collect2: ld returned 1 exit status
$ gcc -c helloworld.c
$ gcc -m64 -o helloworld helloworld.o
collect2: ld terminated with signal 11 [Segmentation fault], core dumped
/usr/bin/ld: warning: sparc architecture of input file `helloworld.o' is incompatible with sparc:v9 output
/usr/bin/ld: helloworld.o: invalid string offset 6841708 >= 47 for section `.strtab'
this works for an older release (2.11) on sparc for me... there was
bugs in the netbsd/sparc64 kernel makefiles that endedup attempting
to mix 32 & 64 bit objects, and ld failed gracefully..
.mrg.
More information about the Binutils
mailing list