ARM linker will allow linking with non-arm object files

Nick Clifton nickc@cambridge.redhat.com
Fri Mar 1 03:19:00 GMT 2002


Hi Faisal,

> The problem I'm encountering is that the linker will link in objects
> that have been compiled for other targets.
> 
> Is this correct?

Essentially yes.  The linker has been designed to be able to read in
input files in multiple different formats and convert them into a
single output format whilst it links them.  Of course it is up to the
programmer to ensure that the input files can be linked together.  So
for example this feature might be used to link in files in the
"binary" or "ihex" formats into an executable.

In this particular case, of course, it does not make a lot of sense to
link an x86 object file and an ARM object file together since the ARM
cannot execute x86 instructions.  (Well unless someone has written an
emulator...).  But then why would anyone even try to link together
these two different styles of input file ?

Cheers
        Nick



More information about the Binutils mailing list