This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ld won't complain if asked to link obj files of different arches
On Dec 28, 2002, Doug Evans <dje@transmeta.com> wrote:
> Depending on which host the "real" program is run on, the other
> architecture's object file may be treated as data.
'cept the relocations in it are probably not going to be applied
correctly. If you want it to be treated as data, I suppose we can
require you to make it binary first.
Anyway, your argument doesn't really hold much. Configure
--enable-targets=all and you suddenly can no longer link with your
`data' because then ld recognizes it as being an incompatible
architecture. The silent acceptance only happened when ld couldn't
recognize the architecture, because support for it hadn't been built
into the linker. That was badly inconsistent behavior.
--
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