[2/4] ldgram.y: Add 'ASCIZ <string>' command
Checks
Commit Message
From: Ulf Samuelsson <ulf@emagii.com>
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
---
ld/ldgram.y | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
@@ -125,7 +125,7 @@ static int error_index;
%right UNARY
%token END
%left <token> '('
-%token <token> ALIGN_K BLOCK BIND QUAD SQUAD LONG SHORT BYTE
+%token <token> ALIGN_K BLOCK BIND QUAD SQUAD LONG SHORT BYTE ASCIZ
%token SECTIONS PHDRS INSERT_K AFTER BEFORE
%token DATA_SEGMENT_ALIGN DATA_SEGMENT_RELRO_END DATA_SEGMENT_END
%token SORT_BY_NAME SORT_BY_ALIGNMENT SORT_NONE
@@ -668,7 +668,10 @@ statement:
{
lang_add_data ((int) $1, $3);
}
-
+ | ASCIZ NAME
+ {
+ lang_add_stringz($2);
+ }
| FILL '(' fill_exp ')'
{
lang_add_fill ($3);