This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Binutuls is broken now.
On Mon, Jun 18, 2001 at 05:59:48PM -0700, Ian Lance Taylor wrote:
> Hans-Peter Nilsson <hans-peter.nilsson@axis.com> writes:
>
> > We know -r happens to work for a particular case of
> > one-single-binary-input-to-ELF in the Linux kernel. But I don't
> > know if linking -r from one or more binary input files to ELF,
> > alone or together with other ELF input files works *in general*.
> > (Do you?)
>
> Yes, we know that that works.
>
> > If we knew *that*, we still don't know if it works
> > with binary files and linking -r to *other* formats than ELF.
> > (Do you?)
>
> Yes, we know that that works too.
>
> The thing which fails when linking with -r is relocation processing
> for object file formats other than the output file format. Binary
> files have no relocations, by definition. Therefore nothing fails.
>
> > Since we don't know it works in the *general* case when
> > including one or more binary files with zero or more of the same
> > format as the output file, and we know it *doesn't* work (and it
> > is documented to *not* work) for other -r cases, I don't see it
> > as logical to allow -r in general for binary-to-anything. That
> > is the reason. I thought it be seen as inferred from my
> > previous reply.
>
> It's fine to allow binary input files for ld -r in all cases. In
> general it's fine to allow any input file which has no relocations for
> ld -r.
Given what we know, if my patch is not acceptable to everyone, may I
suggest we revert the patch:
2001-06-15 Hans-Peter Nilsson <hp@axis.com>
* ldlang.c (lang_check): Emit fatal error if relocatable link
between different object flavours.
We can find some better ways to deal with it later.
Thanks.
H.J.