public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Tristan Gingold <tgingold@free.fr>
To: Jan Beulich <jbeulich@suse.com>
Cc: Nick Clifton <nickc@redhat.com>, binutils <binutils@sourceware.org>
Subject: Re: [PATCH] pe/coff - add support for base64 encoded long section names
Date: Mon, 22 May 2023 21:40:51 +0200	[thread overview]
Message-ID: <da672763-7a5f-d910-a8eb-b1065759d78d@free.fr> (raw)
In-Reply-To: <2f283c17-ebda-442a-568e-5a2cfaeae0bc@suse.com>



On 22/05/2023 08:36, Jan Beulich wrote:
[...]
> I wonder whether this wouldn't better be handled either by returning
> the full 36-bit value and then letting the caller decide (it wants to
> check against string table size anyway, not just 2³²), or by checking
> that the first digit is only 'A'...'D'. The latter would of course
> make the helper function less generic (if any further use appeared).

I prefer to keep the overflow check and also to keep the function generic.
Using a 64b type might be tricky as it is easy to have the value 
silently truncated due to the use of a 32b type.

> I further wonder what LLVM's motivation is to zero-pad (i.e.
> 'A'-prefix) the encoded values, rather than - like pre-existing
> section name representation - nul-padding at the end. At the very
> least I'm inclined to suggest that we also support that obvious (I
> think) alternative here.

I don't see the point. The nul-padding is not used by anyone, and 
therefore cannot even be tested.  Why creating dead code ?

I will submit a v2 of the patch.

Tristan.

  parent reply	other threads:[~2023-05-22 19:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11  5:28 Tristan Gingold
2023-05-17 13:30 ` Nick Clifton
2023-05-17 14:14   ` Jose E. Marchesi
2023-05-21 15:50     ` Tristan Gingold
2023-05-21 15:40   ` Tristan Gingold
2023-05-22  6:36     ` Jan Beulich
2023-05-22  8:53       ` Martin Storsjö
2023-05-22 19:40       ` Tristan Gingold [this message]
2023-05-23  6:31         ` Jan Beulich

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=da672763-7a5f-d910-a8eb-b1065759d78d@free.fr \
    --to=tgingold@free.fr \
    --cc=binutils@sourceware.org \
    --cc=jbeulich@suse.com \
    --cc=nickc@redhat.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).