public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v4 0/6] ASCIZ Command for output section
@ 2023-02-13 16:20 binutils
  2023-02-13 16:20 ` [PATCH v4 1/6] Document the ASCIZ command binutils
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: binutils @ 2023-02-13 16:20 UTC (permalink / raw)
  To: binutils; +Cc: nickc

Introduce an ASCIZ command for an output section
When generating a header for an embedded system
there is often a need to add text information.

There are arguments for generating the header in the linker
instead of compiling the header as part of the program.
The lack of support for strings makes this process a bit unwieldy.

The ASCIZ command allows you to specify a zero-terminated string as a parameter.

Example:

    ASCIZ "This is a string"

The string contains 16 characters, but a NUL character is added to the end,
so the areas reserved is 16+1 = 17 characters.

The string may contain '\n', '\r', '\t' and octals, but not hex characters.

Ideally, there should be a command which reserves a fixed size area.

I:E:

    ASCII 20, "This is a string"

but I have failed to get make this work in 'ld',
so this patch series is limited to ASCIZ.

[PATCH v4 1/6] Document the ASCIZ command
[PATCH v4 2/6] Add ASCIZ to NEWS
[PATCH v4 3/6] Add ASCIZ to testsuite
[PATCH v4 4/6] ldlex.l: Add ASCIZ token
[PATCH v4 5/6] ldgram.y: Add 'ASCIZ <string>' command
[PATCH v4 6/6] Parse ASCIZ command


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-02-14 16:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-13 16:20 [PATCH v4 0/6] ASCIZ Command for output section binutils
2023-02-13 16:20 ` [PATCH v4 1/6] Document the ASCIZ command binutils
2023-02-13 16:20 ` [PATCH v4 2/6] Add ASCIZ to NEWS binutils
2023-02-13 16:20 ` [PATCH v4 3/6] Add ASCIZ to testsuite binutils
2023-02-13 16:20 ` [PATCH v4 4/6] ldlex.l: Add ASCIZ token binutils
2023-02-13 16:20 ` [PATCH v4 5/6] ldgram.y: Add 'ASCIZ <string>' command binutils
2023-02-13 16:24 ` [PATCH v4 0/6] ASCIZ Command for output section Ulf Samuelsson
2023-02-14 10:16 ` Nick Clifton
2023-02-14 16:07   ` Ulf Samuelsson
2023-02-14 16:20     ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).