]> granicus.if.org Git - yasm/commit
Add ability for GAS input to set section alignment in the same way GAS does:
authorPeter Johnson <peter@tortall.net>
Mon, 7 Nov 2005 06:53:52 +0000 (06:53 -0000)
committerPeter Johnson <peter@tortall.net>
Mon, 7 Nov 2005 06:53:52 +0000 (06:53 -0000)
commit1b9b76cfe6729fd71057d8694f3bf71b7c3bfaa3
tree25dac4e9ccc2af730b62f331f78a171b7c46f41f
parentaa3e6ff9b9cd0c785e44490acab453eb3b3581c0
Add ability for GAS input to set section alignment in the same way GAS does:
if the first thing in the section is a .align, that specifies the section
alignment.

* objfmt.h (yasm_objfmt_module): Add section_align() function.
(yasm_objfmt_section_align): Add wrapper for module section_align().
* xdf-objfmt.c, elf-objfmt.c, bin-objfmt.c, dbg-objfmt.c, coff-objfmt.c:
Implement.

* gas-bison.y (gas_parser_align): Call new yasm_objfmt_section_align() rather
than creating an align bytecode if .align is the first bytecode in the
section.

* gassectalign.asm: New test for this.

svn path=/trunk/yasm/; revision=1315
libyasm/objfmt.h
modules/objfmts/bin/bin-objfmt.c
modules/objfmts/coff/coff-objfmt.c
modules/objfmts/dbg/dbg-objfmt.c
modules/objfmts/elf/elf-objfmt.c
modules/objfmts/xdf/xdf-objfmt.c
modules/parsers/gas/gas-bison.y
modules/parsers/gas/tests/Makefile.inc
modules/parsers/gas/tests/gassectalign.asm [new file with mode: 0644]
modules/parsers/gas/tests/gassectalign.errwarn [new file with mode: 0644]
modules/parsers/gas/tests/gassectalign.hex [new file with mode: 0644]