This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Reloc BUG in as
- To: "H . J . Lu" <hjl at gnu dot org>
- Subject: Re: Reloc BUG in as
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 05 Mar 2001 16:32:13 -0800
- Cc: binutils at sources dot redhat dot com
- References: <20010305162302.A6240@gnu.org>
"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