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]
Other format: [Raw text]

Re: [gandalf@winds.org: Trying to figure out a change in latest binutils for linux]


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


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