This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
ld won't complain if asked to link obj files of different arches
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: 12 Dec 2002 04:29:38 -0200
- Subject: ld won't complain if asked to link obj files of different arches
- Organization: GCC Team, Red Hat
If I run something like:
mn10300-elf-gcc -c foo.c
gcc -c bar.c # native gcc
mn10300-elf-ld foo.o bar.o
ld foo.o bar.o
both links succeed!
I was expecting some kind of error message from the linker stating
that the object file was incompatible, but I don't get any, because
bfd_arch_get_compatible is too lax about bfds of unknown architecture,
so they end up considered to be compatible. Is this really desirable?
Should we really get different behavior depending on whether we
compile with or without --enable-targets=all?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer