public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* (no subject)
@ 2023-02-10 17:44 binutils
  2023-02-10 17:44 ` [PATCH 1/4] ldlex.l: Add ASCIZ token binutils
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: binutils @ 2023-02-10 17:44 UTC (permalink / raw)
  To: binutils

From binutils@emagii.com # This line is ignored.
From: binutils@emagii.com
Reply-To: 
Subject: ASCIZ Command for output section
In-Reply-To: 

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.

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.

Best Regards
Ulf Samuelsson

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


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

end of thread, other threads:[~2023-02-10 17:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-10 17:44 binutils
2023-02-10 17:44 ` [PATCH 1/4] ldlex.l: Add ASCIZ token binutils
2023-02-10 17:44 ` [PATCH 2/4] ldgram.y: Add 'ASCIZ <string>' command binutils
2023-02-10 17:44 ` [PATCH 3/4] Parse ASCIZ command binutils
2023-02-10 17:44 ` [PATCH 4/4] Document the " binutils
2023-02-10 17:55 ` <empty header to my ASCIZ patchset> Ulf Samuelsson

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).