Absolute expression for .if
DeanS <[email protected]> Tue, 8 Dec 2009 16:09:06 -0800 (PST)
| Newsgroups | gmane.comp.gnu.utils |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <6d1bffd5-1382-437e-849d-ab9a93654429@u18g2000pro.googlegroups.com> |
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.