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]

Re: Patch: Check input format against output


"H . J . Lu" <hjl@lucon.org> writes:

> > The native linker on SCO Unixware 7, different from GNU ld on GNU/Linux,
> > can detect this and issues an error message:
> > UX:ld: ERROR: libtask.a(tri_des.o): fatal error: libtask.a(tri_des.o): wrong machine type
> > 
> > Could GNU ld (or libbfd) do the same?
> 
> Here is a patch. Any comments?
> 
> 2001-03-23  H.J. Lu  <hjl@gnu.org>
> 
> 	* elflink.h (elf_link_input_bfd): Return false if the input
> 	format doesn't matches output.

I don't think this patch is correct as it stands.

This kind of check would normally be handled in the
merge_private_bfd_data routine of the output BFD.

See also lang_check in ld/ldlang.c.  Why is that check not being
triggered by this test case?

Ian


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