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]

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


Hi H.J.

> > I think that his point was that he did not want it to work.  it was
> > supposed to have triggered an error response from the linker and it
> > did not.
> 
> Compiler accepts any valid source codes. But it doesn't mean the code
> passed compiler is exactly the user wants.  If the user doesn't want
> it to work, should a flag be used in this case, instead the other way
> around?

I guess this is the real question.  The patch gives the linker the
ability to complain about input files in a format it does not
recognise (and which it has not been told is the "binary" format).
The question is - should the linker complain about such files by
default or only if told to do so by a command line switch ?

I believe that the linker should complain by default, since it will
catch the case where the user has mistakenly given the linker the
wrong kind of input files.  It does mean however that if the user does
know what they are doing they now have to add a command line switch.
I do not believe that this will any current users of the linker, or
that if it does, the disruption will be minor.  Do you know of any
projects that might be affected by this change ?  [Note - the linker
will now accept "binary" format input files without issuing a warning
message].

Cheers
        Nick


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