From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id A70A33858D37 for ; Fri, 5 Aug 2022 08:54:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A70A33858D37 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id BD557300089; Fri, 5 Aug 2022 08:54:38 +0000 (UTC) Message-ID: <05c0b46c-9468-51e5-0a95-089390ebabf4@irq.a4lg.com> Date: Fri, 5 Aug 2022 17:54:37 +0900 Mime-Version: 1.0 Subject: Re: [PATCH v2] gas: Fix a testcase broken by new ZSTD support Content-Language: en-US To: Jan Beulich Cc: binutils@sourceware.org, Cary Coutant References: <88262e9dfc11097d08b552171f1af2e8e026f554.1659683506.git.research_trasio@irq.a4lg.com> <2b7fa463eb7c9a6b78c8d02fd61c2a243bc3a9ea.1659685511.git.research_trasio@irq.a4lg.com> <05632efb-f73e-ff0d-5414-d66dce90b8e8@suse.com> From: Tsukasa OI In-Reply-To: <05632efb-f73e-ff0d-5414-d66dce90b8e8@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2022 08:54:42 -0000 On 2022/08/05 17:24, Jan Beulich wrote: > On 05.08.2022 09:45, Tsukasa OI wrote: >> The commit 1369522f36eece1b37139a81f7f2139ba3915172 ("Recognize the new ELF >> compression type for ZSTD.") added the new ELF compression type but it >> accidentally broke a GAS testcase. Since testing for the section type >> "2048" (SHF_COMPRESSED) is not going to be portable in the long term, it >> now tests SHF_STRINGS ("32") instead. ".word 0" should be okay to >> represent no null-terminated strings. >> >> gas/ChangeLog: >> >> * testsuite/gas/elf/section10.s: Use SHF_STRINGS to test. Put an >> empty string in it. >> * testsuite/gas/elf/section10.d: Reflect the changes above. > > Hmm, but SHF_STRINGS requires sh_entsize to be set, so the resulting > object file is, strictly speaking, not valid. Perhaps use > SHF_LINK_ORDER then (where the spec leaves room for sh_link being zero), > or SHF_OS_NONCONFORMING (since we don't mean to actually link this > object file into anywhere), or SHF_TLS? > > Jan > Ah, that's a lot harder than I expected. Okay... SHF_LINK_ORDER should be fine, I looked into the BFD library and it seems SHF_LINK_ORDER should not result in a harmful result. Tsukasa