From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp4-g21.free.fr (smtp4-g21.free.fr [212.27.42.4]) by sourceware.org (Postfix) with ESMTPS id F003B3858D37 for ; Mon, 22 May 2023 19:40:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F003B3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=free.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=free.fr Received: from [192.168.2.42] (unknown [88.173.63.180]) (Authenticated sender: tgingold@free.fr) by smtp4-g21.free.fr (Postfix) with ESMTPSA id D682819F58A; Mon, 22 May 2023 21:40:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1684784455; bh=PDHW9KdJrZ9dRBejdP7cP7auUbXXdZMWu73hLxKNm1w=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=LdCyZ+vfNtd0lKD8SijqRnYTL1uy0QCTw/AnClayguHFFG1Ng8ukUtzbNVVmTvv9E kjzuGhaKyflPbQ+x+kDrvv4xFwgVNe4YahwRM8IhRbC3SHABiLqBKt0bxqrTi5ZmwY WtNByvop6j7anYzdZUelq3BHS4DG560bBYCH12rjU1ymY8kV31Z1WeTGk1+sQ6Ici8 3yJpCWdjPPRJd+Px4OH41HSypxGEFuxJxYQ2wJw/7A8Orh0Vc3Ay5TOosyhLuinit2 HjTmKScBxGhH89Ltv/VoP5IL/Stw2qMbrJl75nwT5CT0ivODM5tbRcMWjcHCA4yf+v JM9ybfZrnv1sA== Message-ID: Date: Mon, 22 May 2023 21:40:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] pe/coff - add support for base64 encoded long section names To: Jan Beulich Cc: Nick Clifton , binutils References: <243D0799-E3D0-4938-A438-DD8725593F67@free.fr> <040cfba6-009c-4e57-34b9-07469191aa88@free.fr> <2f283c17-ebda-442a-568e-5a2cfaeae0bc@suse.com> Content-Language: en-US From: Tristan Gingold In-Reply-To: <2f283c17-ebda-442a-568e-5a2cfaeae0bc@suse.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,JMQ_SPF_NEUTRAL,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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.