Problem with gas macros
Ian Lance Taylor
ian@wasabisystems.com
Wed Feb 25 14:44:00 GMT 2004
"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
More information about the Binutils
mailing list