svn commit: r1318 - in trunk/yasm: libyasm modules/dbgfmts/stabs modules/objfmts/bin modules/objfmts/coff modules/objfmts/dbg modules/objfmts/elf modules/objfmts/xdf modules/parsers/gas

peter at tortall.net peter at tortall.net
Thu Nov 10 20:31:29 PST 2005


Author: peter
Date: Thu Nov 10 20:31:20 2005
New Revision: 1318

Added:
   trunk/yasm/modules/parsers/gas/tests/execsect.asm
   trunk/yasm/modules/parsers/gas/tests/execsect.errwarn
   trunk/yasm/modules/parsers/gas/tests/execsect.hex
Modified:
   trunk/yasm/libyasm/section.c
   trunk/yasm/libyasm/section.h
   trunk/yasm/modules/dbgfmts/stabs/stabs-dbgfmt.c
   trunk/yasm/modules/objfmts/bin/bin-objfmt.c
   trunk/yasm/modules/objfmts/coff/coff-objfmt.c
   trunk/yasm/modules/objfmts/dbg/dbg-objfmt.c
   trunk/yasm/modules/objfmts/elf/elf-objfmt.c
   trunk/yasm/modules/objfmts/xdf/xdf-objfmt.c
   trunk/yasm/modules/parsers/gas/gas-bison.y
   trunk/yasm/modules/parsers/gas/gas-parser.c
   trunk/yasm/modules/parsers/gas/gas-parser.h
   trunk/yasm/modules/parsers/gas/tests/Makefile.inc
Changeset:
   http://www.tortall.net/projects/yasm/changeset/1318

Log:
In GAS mode, detect sections that are marked as contain code thanks to "x"
flag, not just sections named ".text".

* section.h (yasm_object_get_general): Add code flag parameter to indicate
if section is intended to contain code.
(yasm_section_is_code): New, to get value of code flag.
* section.c (yasm_section): Add flag to section structure.
(yasm_object_get_general, yasm_section_is_code): Implement flag.

* *-objfmt.c, stabs-dbgfmt.c: Update call to yasm_object_get_general,
setting code flag appropriately (only elf *really* handles this correctly,
coff still needs to handle GAS flags to work fully from GAS mode).

* gas-parser.h (yasm_parser_gas): Remove code_section flag.
* gas-bison.y (gas_switch_section): Don't set.
(gas_parser_align): Use yasm_section_is_code() instead of code_section flag.
* gas-parser.c: Don't initialize code_section flag.



More information about the yasm-cvs mailing list