This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: getting gnu as to check the current location
- From: Alan Modra <amodra at gmail dot com>
- To: Harvey Chapman <hchapman-binutils at 3gfp dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 14 Apr 2010 11:27:50 +0930
- Subject: Re: getting gnu as to check the current location
- References: <CF9EEF44-E635-4103-AE7F-176A25A96DE7@3gfp.com>
On Tue, Apr 13, 2010 at 01:36:16PM -0400, Harvey Chapman wrote:
> Is it possible with gnu as to do something like this?
>
> .if (. - _start1) < 0x100 || (. - _start1) > 0x1ff
> .error "some_label must be between 0x100 and 0x1FF!"
> .endif
> some_label:
It depends on what is between . and _start. They must be in the same
section, and there can't be any .align or similar directives between.
--
Alan Modra
Australia Development Lab, IBM