This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [gandalf@winds.org: Trying to figure out a change in latest binutils for linux]
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 23 Oct 2002 09:44:25 +0930
- Subject: Re: [gandalf@winds.org: Trying to figure out a change in latest binutils for linux]
- References: <20021022144258.A4174@lucon.org>
On Tue, Oct 22, 2002 at 02:42:58PM -0700, H. J. Lu wrote:
> Alan, Any ideas?
Yeah. The expression "err_not386 - _start" is not resolving because
err_not386 is in a different section and _start is global. Since
global ELF syms can be overridden, this sort of expression isn't
really proper; You'd need to emit a reloc against _two_ symbol for
this to work assuming ELF semantics. If the subtrahend were a local
label gas would happily turn this into a pcrel reloc against
err_not386.
Versions of gas prior to my write.c changes ignored the global
characteristics of ELF symbols used as subtrahends, treating them as
local syms. I guess I may need to return to this behaviour for the
sake of assembly code, since that seems to be the generally expected
thing. Opinions anyone?
--
Alan Modra
IBM OzLabs - Linux Technology Centre