This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ld won't complain if asked to link obj files of different arches


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]