This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Problem with gas macros
- From: "Arun Vishwanathan" <arun dot vishwanathan at nevisnetworks dot com>
- To: <binutils at sources dot redhat dot com>
- Date: Wed, 25 Feb 2004 19:59:45 +0530
- Subject: Problem with gas macros
I have written a gas macro as follows :
.macro j label
.short (0xA000 | \label)
.endm
The above macro is supposed to generate the bytes directly for the "j"
instruction.
The label can be 11 bits maximum.
I am using the following gas version
bash# mips-as --version
GNU assembler 2.13.1
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms
of
the GNU General Public License. This program has absolutely no
warranty.
This assembler was configured for a target of `mips16'.
I use the macro as follows in a file temp.S
--------------------------------------------
j label
instruction1
instruction2
-
label: instruction2
--------------------------------------------
I get the following error on assembly
bash-2.05b$ mips16-as -alhsm=temp.ls temp.S
temp.S: Assembler messages:
temp.S:275: Error: invalid section for operation
I am not able to understand what the error means. I dont understand what
invalid section for operation implies.
Under what conditions does this error arise ? Any help will be
appreciated.
Regards.
-------------------------------------------------------------
Arun Vishwanathan
Software Engineer
Nevis Networks Inc.
------------------------------------------------------------
Good design always comes from bad design.