Not linking 32-bit and 64-bit objects
Hans-Peter Nilsson
hp@bitrange.com
Tue Mar 12 17:54:00 GMT 2002
On Tue, 12 Mar 2002, Jakub Jelinek wrote:
> On Tue, Mar 12, 2002 at 03:58:04PM +0100, Andreas Jaeger wrote:
> > I copied the code from Sparc so you have it already for some time;-).
> > If it's not working, I would be really suprised.
>
> It is not working properly.
> It gives an error message, but then crashes anyway, e.g.:
No, that's a warning message.
In the general case, you just get a warning with a
cpu-*:compatible check. What happened for Andreas Jaeger's case
was for files searched for in the library path
(ldfile.c:ldfile_try_open_bfd).
If you put the object on the command-line (like crt1.o and your
case) it gets linked in as you noticed. See
ldlang.c:lang_check. Putting the test in
bfd_merge_private_bfd_data gives you an error (in the case of
library files, the file is ignored).
brgds, H-P
More information about the Binutils
mailing list