From 9fe129a4105bb59398f73ce96938a94f19265b79 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 16 Feb 2023 16:27:08 +0000 Subject: Add support for the ASCII directive inside linker scripts. * ldlex.l: Add ASCII token. * ldgram.y: Add parsing of the ASCII command. * ldlang.c (lang_add_string): Add maximum size parameter. Move escape character handling code into separate function. * ldlang.h (lang_add_string): Update prototype. * NEWS: Mention the new feature. * ld.texi (Output Section Data): Document the new directives. * testsuite/ld-scripts/asciz.t: Adjust to work on more architectures and to test more aspects of the ASCIZ directive. * testsuite/ld-scripts/asciz.d: Adjust to match the changes to the test linker script. * testsuite/ld-scripts/ascii.d: New test driver. * testsuite/ld-scripts/ascii.s: New test assembler source. * testsuite/ld-scripts/ascii.t: New test script. * testsuite/ld-scripts/script.exp: Run the new test. --- ld/NEWS | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ld/NEWS') diff --git a/ld/NEWS b/ld/NEWS index 4ce7e19..4b91f2c 100644 --- a/ld/NEWS +++ b/ld/NEWS @@ -1,6 +1,12 @@ -*- text -*- -* The linker script syntax has a new command for output sections: ASCIZ "string" +* The linker script syntax has two new commands for inserting text into output + sections: + ASCII () "string" + This will reserve a zero filled block of bytes at the current + location and insert "string" at the beginning of the block. If the string + is too long, it will be truncated. + ASCIZ "string" This will insert a zero-terminated string at the current location. Changes in 2.40: -- cgit v1.1