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]
On Wed, Oct 23, 2002 at 09:44:25AM +0930, Alan Modra wrote:
> 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?
Not a bad idea. When you do, please also add a testcae. Thanks.
H.J.