This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Problem with gas macros
"Arun Vishwanathan" <arun.vishwanathan@nevisnetworks.com> writes:
> I have written a gas macro as follows :
>
> .macro j label
> .short (0xA000 | \label)
> .endm
In general this can not work. You can only apply the bitwise-or
operator to absolute values. A label is not an absolute value; it
will not become an absolute value until the linker assigns it a
value.
The wrong section error occurs because LABEL is not in the absolute
section. We might be able to give a better error message here; it's
an odd case that probably rarely arises.
Ian