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: Reloc BUG in as


"H . J . Lu" <hjl@gnu.org> writes:

> I haven't looked at the problem very closely. The problem seems to be
> how expressions like a - b are evaluated. When a and b are known
> when a - b is evaluated, it is not a problem. But for
> 
> --1.s-
> call a-b
> ------
> 
> --2.s-
> call a-b
> a:
> ------
> 
> --3.s-
> call a-b
> b:
> ------
> 
> --a.s-
> call a-b
> a:
> b:
> ------
> 
> a and b are unknown at the end. My question is if a and b have to
> be defined locally for experessions like a - b. If not, I am kind of
> curious how they can be used.

Yes, if you are using ELF, they have to be defined locally.

In an object file format such as IEEE, which gas does not support, you
can describe an expression to compute the results of any particular
relocation.  This is not very efficient, but it is flexible.

Ian


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