This is the mail archive of the 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

On Thu, Dec 19, 2002 at 11:58:12AM +0000, Nick Clifton wrote:
> Hi H.J.
> > >
> > 
> > It doesn't say if the resulting binary is working or not.
> 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

> > > Besides I do not think that we can reply upon the presence of "alien"
> > > relocs or similar in order to trigger a warning/error message from the
> > > linker.  If the user is linking in an unknown format binary then they
> > 
> > Why not, if the linker does the right thing for the given input?
> But if the linker cannot recognise the input architecture, how can it
> be sure that it is doing the right thing ?

Why not? If the linker can't do the right thing, ld shouldn't take the
input. An error, not a warning, should be here. FYI, by "the right
thing", I mean the input, not what the user wants.

> > I don't think ld should second guess what the input should be.
> Agreed, but I do not think that the linker should accept unknown inputs
> without at least warning the user, and better yet, requiring that the
> user explicitly tell the linker that it is OK to accept these unknown
> input files.


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