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: 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


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