This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
re: Not linking 32-bit and 64-bit objects
- From: matthew green <mrg at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Martin Schwidefsky <schwidefsky at de dot ibm dot com>,Peter Bergner <bergner at brule dot borg dot umn dot edu>,Alan Modra <amodra at bigpond dot net dot au>, binutils at sources dot redhat dot com,Andreas Jaeger <aj at suse dot de>
- Date: Thu, 21 Mar 2002 12:34:59 +1100
- Subject: re: Not linking 32-bit and 64-bit objects
- Organisation: Red Hat, Asia-Pacific.
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.