]> granicus.if.org Git - yasm/commit
Implement GAS syntax ".local" directive. This is used by GCC to generate
authorPeter Johnson <peter@tortall.net>
Mon, 23 Jan 2006 00:16:38 +0000 (00:16 -0000)
committerPeter Johnson <peter@tortall.net>
Mon, 23 Jan 2006 00:16:38 +0000 (00:16 -0000)
commite55c132a58cc339e397340594acc91692e64f594
treebae126c0282b904a2e52c10bc70827a76cbe8975
parent7a31b45af105d46dab1047878e6a8b55923761ff
Implement GAS syntax ".local" directive.  This is used by GCC to generate
.local sym; .comm sym; rather than directly using .lcomm sym.  Handle this
usage as well.  While we're here, also implement alignment for .lcomm and
refactor .lcomm handling and alignment handling.

* gas-token.re: Recognize .local.
* gas-bison.y (DIR_LOCAL): Implement .local.
(DIR_COMM): Recognize .local ; .comm case and call define_lcomm().
(DIR_LCOMM): Move functionality into..
(define_lcomm): Here, and implement alignment with..
(gas_parser_align): That now takes raw exprs.  The valparam part of that is
now implemented in..
(gas_parser_dir_align): Formerly gas_parser_align.
(DIR_ALIGN): Use gas_parser_dir_align() instead.

* symrec.c (yasm_symtab_get): New function to just get a symbol based on name
without actually "referencing" it.
* symrec.h (yasm_symtab_get): Prototype.

* coretype.h (yasm_sym_vis): Add YASM_SYM_DLOCAL for flagging that a symbol
is explicitly flagged as a local symbol (rather than just default that way).

svn path=/trunk/yasm/; revision=1340
libyasm/coretype.h
libyasm/symrec.c
libyasm/symrec.h
modules/parsers/gas/gas-bison.y
modules/parsers/gas/gas-token.re
modules/parsers/gas/tests/Makefile.inc
modules/parsers/gas/tests/localcomm.asm [new file with mode: 0644]
modules/parsers/gas/tests/localcomm.errwarn [new file with mode: 0644]
modules/parsers/gas/tests/localcomm.hex [new file with mode: 0644]