[PATCH,trunk+2.20.1] Extend COFF .section directive syntax to specify alignment.

Alan Modra amodra@gmail.com
Sun Jan 17 23:41:00 GMT 2010


On Sun, Jan 17, 2010 at 06:37:59PM +0000, Dave Korn wrote:
>   There's currently no way to specify the alignment of a section in the
> assembler;

Huh?

 .text
 nop

 .data
 .p2align 7
 .long 123

$ gas/as-new /src/tmp/align.s
$ binutils/objdump -h a.out 

a.out:     file format pe-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000004  00000000  00000000  0000008c  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         00000080  00000000  00000000  00000090  2**7
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          00000000  00000000  00000000  00000000  2**2
                  ALLOC

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list