This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Binutuls is broken now.
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Subject: Re: Binutuls is broken now.
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Mon, 18 Jun 2001 11:33:17 -0700
- Cc: binutils at sourceware dot cygnus dot com, nickc at cambridge dot redhat dot com
- References: <20010618105303.A28200@lucon.org> <200106181820.UAA12438@ignucius.axis.se>
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
know it doesn't work on other formats. I can even tell you that objcopy
won't work reliably between the different formats if the files are
relocatable. I tried to fix it myself, decided I didn't have the time.
Instead, I made the change:
http://sources.redhat.com/ml/binutils/2000-06/msg00271.html
> > Because your patch changes the linker behavior and breaks the existing
> > code which uses it. Unless the corrent behavior is broken, I don't
> > think we should change it.
>
> The existing behaviour (before my patch) was broken for reasons
> I explained when that patch was submitted, briefly as above.
>
> I do believe objcopy can be used in the Linux kernel example you
> gave. It seems cleaner than letting ld do the format
> conversion, but that might be a matter of taste.
>
> Nevertheless, changed behaviour is changed behaviour. I think
> we can afford to wait for head-maintainers opinions. Right?
I just want to strongly object such a change. I'd like to see it
fixed ASAP.
H.J.