Patch: Check input format against output
Ian Lance Taylor
ian@zembu.com
Sat Mar 24 12:14:00 GMT 2001
"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
More information about the Binutils
mailing list