From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id uVEzO/ARYmqmWykAWB0awg (envelope-from ) for ; Thu, 23 Jul 2026 09:06:56 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=WrS+K2cs; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E7D671E09E; Thu, 23 Jul 2026 09:06:56 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 39A661E099 for ; Thu, 23 Jul 2026 09:06:56 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D07074BA79A8 for ; Thu, 23 Jul 2026 13:06:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D07074BA79A8 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=WrS+K2cs Received: from limegreen.cherry.relay.mailchannels.net (limegreen.cherry.relay.mailchannels.net [23.83.223.109]) by sourceware.org (Postfix) with ESMTPS id 1CC1C4BA7993 for ; Thu, 23 Jul 2026 13:06:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1CC1C4BA7993 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=palves.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1CC1C4BA7993 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=23.83.223.109 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784811985; cv=none; b=fVwiKpEWHloSoBn4QvV2oc+jfekZexn8XCF4W0y41xbdHSovSMdsRwIYUZthTHT3f8VZOPiInI+HFbKbMqR89ajUbMTQpFjPIr04Fgm4e/3FRfHXvIfGeLdO6drol7NUFScW32HZ1CuTLU1ec9/tk/UtkaoVeDFQXbCiu4PHoh4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784811985; c=relaxed/simple; bh=4hG4AU42LtiGpq2LIumBbk1qUM5D3ezhDYq4wBqDeoU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=cM4oOsNmA6M94mxeh9+tHmRLPQq4kciHW8HPWYMEFsn2CugyL/wYq+EJ/UR+/bAo/r+wBG7JWt/PVqTu/dFqonEAVPpzJqKu8iAlRO4k/YUhDDMjkjDtilV6Yhx2OgjAMRHvJS7O2mcb6MVBNFTI5xgwUG5f4kSRt+Mf28KYitg= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=WrS+K2cs DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1CC1C4BA7993 X-Sender-Id: dreamhost|x-authsender|pedro@palves.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 23307721552 for ; Thu, 23 Jul 2026 13:06:24 +0000 (UTC) Received: from pdx1-sub0-mail-a249.dreamhost.com (100-104-12-45.trex-nlb.outbound.svc.cluster.local [100.104.12.45]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B0BD87226B9 for ; Thu, 23 Jul 2026 13:06:23 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|pedro@palves.net X-MC-Relay: Good X-MailChannels-SenderId: dreamhost|x-authsender|pedro@palves.net X-MailChannels-Auth-Id: dreamhost X-Absorbed-Madly: 53b0d44d02407d7b_1784811983968_1882568798 X-MC-Loop-Signature: 1784811983968:3924236540 X-MC-Ingress-Time: 1784811983967 Received: from pdx1-sub0-mail-a249.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.104.12.45 (trex/8.0.2); Thu, 23 Jul 2026 13:06:23 +0000 Received: from localhost (bl20-181-64.dsl.telepac.pt [2.81.181.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pedro@palves.net) by pdx1-sub0-mail-a249.dreamhost.com (Postfix) with ESMTPSA id 4h5WbM1PZBz1049 for ; Thu, 23 Jul 2026 06:06:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=palves.net; s=dreamhost; t=1784811983; bh=Y2dZIN0fYvHNAK+zzpSHeGlg8PVHbQYeV8x3Lze/Qa8=; h=From:To:Subject:Date:Content-Transfer-Encoding; b=WrS+K2csLYc5mS+0+88VgXuHv1FKUrEjNZQFZtP5VC5Hp+JNAnGcXlkKYrm64WBhz 7W/IbgpMl/zIT8TBLfN+4UpA+TcYJ0XWn6EmHY8i2EOlXAYCd+u9Z7O+J89p98secm KtlyERukVkFv2q5oNr2SrWWqFbzmyWWgZoi++xJ2mVulrNWs061VdVwbi0k8lwZ7ht 9ouQKAjpjNRHm/AbdkzRXtXimoI8sicItzr5VRe1PSLdKJh7pS0gdUUFtIi6BqCXS+ zAZLzZ9ht74V5t9ne5IrcJ3KQtsPluuHtzagrd1GHPP5CdMIZ76xS0iyQ/lxduVgHJ Fj6A8N7/COEZA== From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 24/27] gdb.base/solib-weak.exp: Skip on all PE/COFF targets Date: Thu, 23 Jul 2026 14:01:15 +0100 Message-ID: <20260723130118.206735-25-pedro@palves.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260723130118.206735-1-pedro@palves.net> References: <20260723130118.206735-1-pedro@palves.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org The gdb.base/solib-weak.exp testcase sets a breakpoint on a function that two shared libraries both provide, where one library defines it as a weak symbol and the other as a strong symbol, and checks that GDB picks the right copy. This relies on a weak symbol in one shared library being overridden by a strong symbol of the same name in another, resolved at load time, which is an ELF dynamic-linking behavior. The test was already skipped on mingw, cygwin and pe, since that override does not happen on Windows: PE/COFF resolves symbols at link time, per module, so a weak symbol in one DLL is not overridden by a strong one in another DLL. GCC on mingw does accept __attribute__((weak)) and binutils does emit PE weak externals, but those are a link-time, single-module alias-with-fallback mechanism, not the cross-DLL runtime override the test exercises, so the test fails there. The existing early return open-codes mingw/cygwin/pe and so did not cover windows-msvc, whose triplet is {x86_64,aarch64,i686}-pc-windows-msvc. Use is_pecoff_target instead, which covers windows-msvc too, and reword the comment to say why the test does not apply rather than just that "weak symbols are not meaningful". Confirmed the test still fails on windows-msvc before this change. Tested on: x86_64-pc-linux-gnu x86_64-pc-cygwin x86_64-w64-mingw32 x86_64-pc-windows-msvc Change-Id: I5b12784d32ecd6b0595d721e28bd10a61a9f1901 --- gdb/testsuite/gdb.base/solib-weak.exp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gdb/testsuite/gdb.base/solib-weak.exp b/gdb/testsuite/gdb.base/solib-weak.exp index 319100e4a55..21449061e14 100644 --- a/gdb/testsuite/gdb.base/solib-weak.exp +++ b/gdb/testsuite/gdb.base/solib-weak.exp @@ -19,12 +19,13 @@ require allow_shlib_tests -# These targets have shared libraries, but weak symbols are not meaningful. -if {([istarget *-*-mingw*] - || [istarget *-*-cygwin*] - || [istarget *-*-pe*])} { - return -} +# This test relies on a weak symbol in one shared library being +# overridden by a strong symbol of the same name in another, resolved +# at load time. That is an ELF dynamic-linking behavior. PE/COFF +# resolves symbols at link time, per module, so a weak symbol in one +# DLL is not overridden by a strong one in another DLL -- the scenario +# this test exercises does not exist there. +require !is_pecoff_target # This test uses GCC-specific syntax. if {![test_compiler_info "gcc-*"]} { -- 2.54.0