This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Patch: Check input format against output
- To: "H . J . Lu" <hjl at lucon dot org>
- Subject: Re: Patch: Check input format against output
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 24 Mar 2001 12:14:30 -0800
- Cc: Marco dot Franzen at Thyron dot com, binutils at sources dot redhat dot com
- References: <200103231040.KAA10476@maidavale.thyron-local><01032318504903.11087@maidavale> <20010323204044.A11945@lucon.org>
"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