public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ulf Samuelsson <binutils@emagii.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: nickc@redhat.com, Ulf Samuelsson <ulf@emagii.com>,
	binutils@sourceware.org
Subject: Re: [PATCH v2 4/7] ld.texi: Add ASCII to info file
Date: Mon, 8 Jul 2024 12:59:17 +0200	[thread overview]
Message-ID: <9e0dab13-dbb1-8567-6d65-4fc28d254131@emagii.com> (raw)
In-Reply-To: <32e2eca5-8494-4671-98eb-5e42df08743f@suse.com>


Den 2024-07-08 kl. 08:23, skrev Jan Beulich:
> On 05.07.2024 18:22, binutils@emagii.com wrote:
>> --- a/ld/ld.texi
>> +++ b/ld/ld.texi
>> @@ -5643,6 +5643,7 @@ C identifiers because they contain a @samp{.} character.
>>   @cindex section data
>>   @cindex output section data
>>   @kindex ASCIZ ``@var{string}''
>> +@kindex ASCII (@var{expression}) ``@var{string}''
> I couldn't really spot anywhere you would say what has changed from the
> earlier version, so I'm unsure: Are, as per above, parentheses still
> required here, or ...
>
>> @@ -5691,6 +5692,28 @@ For example, this string of 16 characters will create a 17 byte area
>>     ASCIZ "This is 16 bytes"
>>   @end smallexample
>>   
>> +You can include a fixed size string in an output section by using
>> +@code{ASCII}.  The keyword is followed by a size and a string
>> +separated by a comma.  The string is stored at the current
>> +value of the location counter. If the string is shorted than the allocated
>> +size, NUL character are added at the end to fill up to the specified size.
>> +Note the fill value is ignored for this padding.
>> +If the string includes spaces it must be enclosed in double
>> +quotes.  The string may contain '\n', '\r', '\t' and octal numbers.
>> +Hex numbers are not supported.
>> +
>> +If the string is too long, a warning is issued and the string is
>> +truncated.  The string will still be zero-terminated in this case.
>> +
>> +If the expression evaluates to zero then the directive will be treated
>> +as if it were @code{ASCIZ} instead.
>> +
>> +Example: This is string of 16 characters and will create a 16 byte
>> +area, not zero-terminated.
>> +@smallexample
>> +  ASCII 16, "This is 16 bytes"
>> +@end smallexample
> ... are they not anymore, as per this and the cover letter?
>
> Jan

I changed it from

ASCII '(' <size> ')' <string>

to

ASCII <size> ',' <string>


-- 
Best Regards
Ulf Samuelsson


  reply	other threads:[~2024-07-08 10:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-05 16:22 [PATCH v2 0/7] ASCII output section command binutils
2024-07-05 16:22 ` [PATCH v2 1/7] ldlex.l: Add ASCII token binutils
2024-07-05 16:22 ` [PATCH v2 2/7] ldgram.y: Add ASCII parsing binutils
2024-07-05 16:22 ` [PATCH v2 3/7] ldlang.*: process ASCII command binutils
2024-07-05 16:22 ` [PATCH v2 4/7] ld.texi: Add ASCII to info file binutils
2024-07-08  6:23   ` Jan Beulich
2024-07-08 10:59     ` Ulf Samuelsson [this message]
2024-07-05 16:22 ` [PATCH v2 5/7] Add testsuite for ASCII command binutils
2024-07-05 16:22 ` [PATCH v2 6/7] NEWS: Add " binutils
2024-07-05 16:22 ` [PATCH v2 7/7] ChangeLog: " binutils

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e0dab13-dbb1-8567-6d65-4fc28d254131@emagii.com \
    --to=binutils@emagii.com \
    --cc=binutils@sourceware.org \
    --cc=jbeulich@suse.com \
    --cc=nickc@redhat.com \
    --cc=ulf@emagii.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).