ld won't complain if asked to link obj files of different arches
Alexandre Oliva
aoliva@redhat.com
Sat Dec 21 19:06:00 GMT 2002
On Dec 18, 2002, Nick Clifton <nickc@redhat.com> wrote:
> Hi Guys,
>> Richard Henderson <rth@redhat.com> writes:
>>
>> On Tue, Dec 17, 2002 at 07:40:19PM +0000, Nick Clifton wrote:
>> > It is not desirable, but I suspect that if we change the behavior
>> > something will break. ie there are probably projects somewhere that
>> > need this behavior.
>>
>> Seems to me it would be best to default to not allowing this,
>> and to add a link switch that explicitly allows it, and to not
>> confuse the issue on a per-port basis.
> OK - well how about this (unapplied) patch ? It changes the default
> behavior to reject unknown formats and adds a new switch to allow
> them.
> With the patch applied, Alex's test case now gives:
> % ld-new foo.o bar.o
> ld-new: warning: unknown architecture of input file `bar.o' is incompatible with mn10300 output
> ld-new: warning: cannot find entry symbol _start; defaulting to 00000000
> and:
> % ld-new foo.o bar.o --accept-unknown-input-format
> ld-new: warning: cannot find entry symbol _start; defaulting to 00000000
I love it. Thanks for following up on this matter. I was probably
going to end up implementing it myself if you hadn't beat me to it! :-)
--
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
More information about the Binutils
mailing list