This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Aligning to an odd boundary
- From: Daniel Jacobowitz <drow at false dot org>
- To: Shaun Jackman <sjackman at gmail dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 16 Nov 2005 17:22:54 -0500
- Subject: Re: Aligning to an odd boundary
- References: <7f45d9390511161404l3fa0bfdeq@mail.gmail.com>
On Wed, Nov 16, 2005 at 03:04:02PM -0700, Shaun Jackman wrote:
> I'd like to align the location counter to an *odd* boundary, such that
> (. & 2) == 2
> I tried...
> .if (. & 2) == 0
> nop
> .endif
> ... but gas complains...
> Error: non-constant expression in ".if" statement
>
> I know of .balignw, which would help me align to an even boundary, but
> of course I'm trying to do the opposite.
>
> My target architecture is ARM/Thumb and nop is a two byte instruction.
You can't readily do this; you may have to align to an even boundary
and insert padding manually.
--
Daniel Jacobowitz
CodeSourcery, LLC