diff options
author | Ulf Samuelsson <ulf@emagii.com> | 2023-02-14 10:13:28 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-02-14 10:13:28 +0000 |
commit | 0d79a2a8e2d91fc258ac795c19c13e3ab505a6c2 (patch) | |
tree | 6d366ae54f94ded995f08e3f2ea8ac47aa542de5 /ld/ldgram.y | |
parent | 12ef68305572ed139825be827b2bb1d1aef3ca25 (diff) | |
download | gdb-0d79a2a8e2d91fc258ac795c19c13e3ab505a6c2.zip gdb-0d79a2a8e2d91fc258ac795c19c13e3ab505a6c2.tar.gz gdb-0d79a2a8e2d91fc258ac795c19c13e3ab505a6c2.tar.bz2 |
ASCIZ Command for output section
Adds a new directive to the linker script syntax: ASCIZ.
This inserts a zero-terminated string into the output at the place where it is used.
Diffstat (limited to 'ld/ldgram.y')
-rw-r--r-- | ld/ldgram.y | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y index fa5f01f..8240cf9 100644 --- a/ld/ldgram.y +++ b/ld/ldgram.y @@ -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_string ($2); + } | FILL '(' fill_exp ')' { lang_add_fill ($3); |