| Message ID | 20260529133254.1429717-1-chigot@adacore.com |
|---|---|
| State | New |
| Headers |
Return-Path: <binutils-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 86D694BA23CB for <patchwork@sourceware.org>; Fri, 29 May 2026 13:33:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86D694BA23CB Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=QLOQyG7c X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id 46CE74BA2E1A for <binutils@sourceware.org>; Fri, 29 May 2026 13:33:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 46CE74BA2E1A Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 46CE74BA2E1A Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::332 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780061588; cv=none; b=Kyq1tIBqO3Z32YXDEwbtVnvd8zfMvYuKOCL+B+6M4NGuuraJUTH69LBm0fymOucXsdhHnk0IWk9y4Q15UntFXeQ4dqVryPmpXOVohfAKqK/6G/TzMu8GcVA6CNKJynlcbus0il5Doy1TX1cqLIEkHbYXZ3btiBrV/MDlETQp5PY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780061588; c=relaxed/simple; bh=iFrF1Le8jA/2Asyp43XRbJWY3K18VBBFMCXZO7Cy+mg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=gl/ns6AtCEOJMELI6AAsa+P9lfzX/il6a1WB9t+eNfB2QgX07iMm6HHd8MO1K+I8KBaHKwQzr6dylx/e4E+Ges2jHuTmo4NEbeyvsgDVEInTRhx4OH2LmZOiH2M+MLJZzWBF3hfXyPk39o5QwUflbzILO7zFlXr5t54egFEnepk= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=QLOQyG7c DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46CE74BA2E1A Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-490426d72f7so70910035e9.3 for <binutils@sourceware.org>; Fri, 29 May 2026 06:33:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1780061587; x=1780666387; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MhM9Gu/MPvDtCHccKeu7WHg0zhFRK7TePUEJn9oWZ94=; b=QLOQyG7cNmC5K23ao1el2/0NO9aLPmZD2Yag7QJfmBltXEYIZQl+CT5Gmf0gwDYPpL BmiNbZBkvDmEPUnBxuRrDGToO1ppueB+IP8mRqnbTeVsMcIplJyc1YEEwC9L18iuTmA7 8hZdmC4w3doydHRqReZ2NADNA/n8370kKn2pd1TjZNCz5FCtAgDecEwNetTHgdRAUNDr b57sBDC3/fGQhuW5eNVZXPMq3tqwpWW/VygT1hCSG1VdHu7g5NArhCnDWkzU4LpJI7gi eFcjyVbcS6zHolBhNikjp98ifJaKVddAUk/3Y5W7lbwOHRO2ZxQ+t3GpXwoZUppuTRrf l4iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780061587; x=1780666387; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MhM9Gu/MPvDtCHccKeu7WHg0zhFRK7TePUEJn9oWZ94=; b=l5Who/x6Pdb2PZ2c8xy7ytrh4doQe9iQ4paUOd7mBkLmASFqry5Ouz/T8DK60ruGzZ 9FjzgQix3PjmRoaFMiBsC2bk22iCRkyxtIZ1BEAAh+76OOEf647kKafc0K6NuODBYDpq UbyXN0vN/M0r0VLUhOxjRTgWVhMPMf3rP9ZaQ/N1QV6vhJQ9USoizF9hdVphALW2l2cY 72ORScusaSxbtCGt9uw/LltvKtetJPO5M/jWAGxe60XWJwhrmAeI95u3hyiTYKtw/j2k gSoa6bnRviNCVLbhdTFr19sy0UAUOb3djtDwB38Ld5PXuc+R0qjgn2pyUw6ofIclsXKi UTJw== X-Gm-Message-State: AOJu0YwZqmurp3sZ4Q/jil/ZJCwMlXs0xrTTNen+GN2y9YMfy/Lsz8HP TxjaKIsXliWBC+T/xz2tFluYVVmUewj27ykUfFgBHXEP7TNUImTU0MX88QVagnL7Mv9Gl+RgXzt cc1c= X-Gm-Gg: Acq92OGAGcZ/HucrOq6zK6J+EhDSn4geL9lUnePZ9+wV8pEYUZuxkU5DouUemFDujau 56flo3T8V6isWuC9FYiTs/v8CedashT0U193e9mUXaPWHpGwLJWQe+55tDzwz6U7LoFU3wpYQWs 33b8MEXUvW/AQMQU3ImYcj3fZqyBGd/UyHTpa386HBe63TLFCqOUjPt52Qw1jnVsizi1hFpwwRI flMS8gKQ9vyvRN/sWZftcBoLn3v3l8A3BOxFCnYpauzGrgRyqAXufbbGO5r8VV4P2rmn9AkolvP ROJiM60OiLHcgU930UmbBCTRhrLpI4Kqg5Fa2gx+8K3fVehmH7SCV0v9tO77+bBp4K9KUS0RFLm GmIbVyEqIhw0ZEWi0Duf3/ZuyGjc+yPELgO6J6wpT6MiOCCN+PjMa0944DeQ6TuR0L6WX8Vhjcc bvppQiufwHY7W445p3HGTnw+6EsDlaO0+Cz9VZRWeMcmM= X-Received: by 2002:a05:600c:a40c:b0:48a:6fd4:d3d3 with SMTP id 5b1f17b1804b1-4909c0ba8bdmr32066745e9.20.1780061587107; Fri, 29 May 2026 06:33:07 -0700 (PDT) Received: from chigot-Dell.home ([2a01:cb15:80db:7c00:acc5:3ad0:efae:aaf5]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909cabfd6esm47373635e9.15.2026.05.29.06.33.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 06:33:06 -0700 (PDT) From: =?utf-8?q?Cl=C3=A9ment_Chigot?= <chigot@adacore.com> To: binutils@sourceware.org Cc: amodra@gmail.com, =?utf-8?q?Cl=C3=A9ment_Chigot?= <chigot@adacore.com> Subject: [PATCH] ld/testsuite: enable build-id for ELF platforms Date: Fri, 29 May 2026 15:32:54 +0200 Message-ID: <20260529133254.1429717-1-chigot@adacore.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLOCKED shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
ld/testsuite: enable build-id for ELF platforms
|
|
Checks
| Context | Check | Description |
|---|---|---|
| linaro-tcwg-bot/tcwg_binutils_build--master-arm | success | Build passed |
| linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | success | Build passed |
| linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 | success | Test passed |
| linaro-tcwg-bot/tcwg_binutils_check--master-arm | success | Test passed |
Commit Message
Clément Chigot
May 29, 2026, 1:32 p.m. UTC
--build-id is defined within elf.em and thus should be available for all platforms matching "is_elf_format". --- ld/testsuite/ld-elf/build-id.exp | 7 ------- 1 file changed, 7 deletions(-)
Comments
On Fri, May 29, 2026 at 3:33 PM Clément Chigot <chigot@adacore.com> wrote: > > --build-id is defined within elf.em and thus should be available for > all platforms matching "is_elf_format". @Alan Modra I've tested a couple of ELF platforms internally. But I don't know if there is a way to trigger this test for all ELF emulations ? `--enable-targets=all` doesn't seem to be enough. Otherwise, I'll adjust if some ELF targets don't support it. > --- > ld/testsuite/ld-elf/build-id.exp | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/ld/testsuite/ld-elf/build-id.exp b/ld/testsuite/ld-elf/build-id.exp > index cabbcbd289a..15f90d3205e 100644 > --- a/ld/testsuite/ld-elf/build-id.exp > +++ b/ld/testsuite/ld-elf/build-id.exp > @@ -29,13 +29,6 @@ if { [istarget frv-*-*] || [istarget lm32-*-*] } { > return > } > > -if { !([istarget *-*-linux*] > - || [istarget arm*-*-uclinuxfdpiceabi] > - || [istarget *-*-gnu*]) } then { > - return > -} > - > - > set stylelist {"" "--build-id" "--build-id=none" "--build-id=md5" > "--build-id=sha1" "--build-id=guid" "--build-id=0xdeadbeef"} > > -- > 2.43.0 >
On 29.05.2026 15:45, Clément Chigot wrote: > On Fri, May 29, 2026 at 3:33 PM Clément Chigot <chigot@adacore.com> wrote: >> >> --build-id is defined within elf.em and thus should be available for >> all platforms matching "is_elf_format". > > @Alan Modra I've tested a couple of ELF platforms internally. But I > don't know if there is a way to trigger this test for all ELF > emulations ? `--enable-targets=all` doesn't seem to be enough. While that's enough to make the linker capable of linking for such targets, it indeed isn't sufficient to have those cases covered by the testsuite. The way the testsuite presently is written, you won't get around testing a build for every one such target. Jan
On Fri, May 29, 2026 at 03:32:54PM +0200, Clément Chigot wrote: > --build-id is defined within elf.em and thus should be available for > all platforms matching "is_elf_format". No, there are ELF targets that don't use elf.em. See lib/ld-lib.exp uses_genelf. I think the test should be using if { ![is_elf_format] || [uses_genelf] } { return } and no other exclusions. I'll see if that is correct.
On Tue, Jun 02, 2026 at 06:38:01PM +0930, Alan Modra wrote: > On Fri, May 29, 2026 at 03:32:54PM +0200, Clément Chigot wrote: > > --build-id is defined within elf.em and thus should be available for > > all platforms matching "is_elf_format". > > No, there are ELF targets that don't use elf.em. See lib/ld-lib.exp > uses_genelf. I think the test should be using > > if { ![is_elf_format] || [uses_genelf] } { > return > } > > and no other exclusions. I'll see if that is correct. I'll apply the following. spu-elf fails the tests due to a readelf complaint: Displaying notes found in: .note.spu_name readelf: Warning: Corrupt note: alignment 16, expecting 4 or 8 diff --git a/ld/testsuite/ld-elf/build-id.exp b/ld/testsuite/ld-elf/build-id.exp index cabbcbd289a..6899cdbf2a2 100644 --- a/ld/testsuite/ld-elf/build-id.exp +++ b/ld/testsuite/ld-elf/build-id.exp @@ -19,23 +19,10 @@ # MA 02110-1301, USA. # -# Exclude non-ELF targets. - -if ![is_elf_format] { - return -} - -if { [istarget frv-*-*] || [istarget lm32-*-*] } { +if { ![is_elf_format] || [uses_genelf] } { return } -if { !([istarget *-*-linux*] - || [istarget arm*-*-uclinuxfdpiceabi] - || [istarget *-*-gnu*]) } then { - return -} - - set stylelist {"" "--build-id" "--build-id=none" "--build-id=md5" "--build-id=sha1" "--build-id=guid" "--build-id=0xdeadbeef"}
On Tue, Jun 2, 2026 at 12:45 PM Alan Modra <amodra@gmail.com> wrote: > > On Tue, Jun 02, 2026 at 06:38:01PM +0930, Alan Modra wrote: > > On Fri, May 29, 2026 at 03:32:54PM +0200, Clément Chigot wrote: > > > --build-id is defined within elf.em and thus should be available for > > > all platforms matching "is_elf_format". > > > > No, there are ELF targets that don't use elf.em. See lib/ld-lib.exp > > uses_genelf. I think the test should be using > > > > if { ![is_elf_format] || [uses_genelf] } { > > return > > } > > > > and no other exclusions. I'll see if that is correct. > > I'll apply the following. spu-elf fails the tests due to a readelf > complaint: > Displaying notes found in: .note.spu_name > readelf: Warning: Corrupt note: alignment 16, expecting 4 or 8 Perfect. Thanks a lot. Clément > diff --git a/ld/testsuite/ld-elf/build-id.exp b/ld/testsuite/ld-elf/build-id.exp > index cabbcbd289a..6899cdbf2a2 100644 > --- a/ld/testsuite/ld-elf/build-id.exp > +++ b/ld/testsuite/ld-elf/build-id.exp > @@ -19,23 +19,10 @@ > # MA 02110-1301, USA. > # > > -# Exclude non-ELF targets. > - > -if ![is_elf_format] { > - return > -} > - > -if { [istarget frv-*-*] || [istarget lm32-*-*] } { > +if { ![is_elf_format] || [uses_genelf] } { > return > } > > -if { !([istarget *-*-linux*] > - || [istarget arm*-*-uclinuxfdpiceabi] > - || [istarget *-*-gnu*]) } then { > - return > -} > - > - > set stylelist {"" "--build-id" "--build-id=none" "--build-id=md5" > "--build-id=sha1" "--build-id=guid" "--build-id=0xdeadbeef"} > > > > -- > Alan Modra
diff --git a/ld/testsuite/ld-elf/build-id.exp b/ld/testsuite/ld-elf/build-id.exp index cabbcbd289a..15f90d3205e 100644 --- a/ld/testsuite/ld-elf/build-id.exp +++ b/ld/testsuite/ld-elf/build-id.exp @@ -29,13 +29,6 @@ if { [istarget frv-*-*] || [istarget lm32-*-*] } { return } -if { !([istarget *-*-linux*] - || [istarget arm*-*-uclinuxfdpiceabi] - || [istarget *-*-gnu*]) } then { - return -} - - set stylelist {"" "--build-id" "--build-id=none" "--build-id=md5" "--build-id=sha1" "--build-id=guid" "--build-id=0xdeadbeef"}