[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Absolute expression for .if
From: |
DeanS |
Subject: |
Absolute expression for .if |
Date: |
Tue, 8 Dec 2009 16:09:06 -0800 (PST) |
User-agent: |
G2/1.0 |
I'm trying to add an assemble-time check on a section's size. The
basic approach is:
start_label:
...
end_label:
.ifgt (.-start_label)-256
.err
.endif
I'm using GNU assembler 2.14 20030612. The documentation for the -
operator says "If both arguments are in the same section, the result
is absolute." but the assembler says this is a non-constant
expression. (the documentation says .if requires an "absolute
expression")
I've tried a bunch of variations, but can't see to get passed the "non-
constant expression" error. Am I SOL here, or is there something else
I can do.
Thanks.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Absolute expression for .if,
DeanS <=