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: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Andreas Jaeger <aj at suse dot de>, 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>
- Date: Tue, 12 Mar 2002 20:54:20 -0500 (EST)
- Subject: Re: Not linking 32-bit and 64-bit objects
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