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: Binutuls is broken now.


> Date: Mon, 18 Jun 2001 11:33:17 -0700
> From: "H . J . Lu" <hjl@lucon.org>

> On Mon, Jun 18, 2001 at 08:20:36PM +0200, Hans-Peter Nilsson wrote:
> 
> > > The Linux kernel has been using it for a long time. I believe it
> > > should just work with the proper linker script. Can you give me one
> > > reason why it won't work?
> > 
> > In general relocatable linking (-r) can't work between object
> > formats.  Bfd says -r can't happen between formats, and object
> > format backends assume in-bfd:s are of that format when -r.  The
> > binary format may be the exception; no relocs to handle, no
> > assumptions-giving-SEGV lurking between it and ELF.
> 
> I should make myself clear. Can you give me one good reason why the
> relocatable linking won't work on the input of the binary
> format?

I can't answer that question as it stands, but I can if it is
rephrased: "Can you give me one good reason why relocatable
linking should be disallowed on input of binary format to
another format?"

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?)  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?)

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.

brgds, H-P


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