Not linking 32-bit and 64-bit objects

Daniel Jacobowitz drow@mvista.com
Tue Mar 12 08:32:00 GMT 2002


On Tue, Mar 12, 2002 at 10:15:56PM +1030, Alan Modra wrote:
> On Tue, Mar 12, 2002 at 12:05:47PM +0100, Andreas Jaeger wrote:
> > 
> > If I try to link a 32-bit i386 object as 64-bit x86-64 object, it
> > should fail but I'd like to see a better error message.
> 
> I think you're probably better off writing a replacement for
> bfd_default_compatible in bfd/cpu-i386.c

Is there any architecture where linking together objects with a
different bits_per_word is really legal?  If not, adding it to
bfd_default_compatible seems like the logical step.  For instance, I
don't think MIPS-ELF32 and MIPS-ELF64 could really be linked together.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer



More information about the Binutils mailing list