From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KdfuODffy2lf2AAAWB0awg (envelope-from ) for ; Tue, 31 Mar 2026 10:50:31 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=RsdUrVGp; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=cxccLqmy; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=RsdUrVGp; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=cxccLqmy; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D2F841E04F; Tue, 31 Mar 2026 10:50:31 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.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,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 0DA8E1E04F for ; Tue, 31 Mar 2026 10:50:30 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 8179E4B7A1E3 for ; Tue, 31 Mar 2026 14:50:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8179E4B7A1E3 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=RsdUrVGp; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=cxccLqmy; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=RsdUrVGp; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=cxccLqmy Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id B87524BB58EF for ; Tue, 31 Mar 2026 14:49:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B87524BB58EF Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B87524BB58EF Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774968560; cv=none; b=GUhTvVPje6kzFjHsTtc9+Q4fxpGILH3D2L+cWYkObzoWGIejxkny5p3pwmfviLvFGCPMQG2XgYOdNQv3WRIQPteVcK6XuwU8ZzVb1EN9ggFIIRe1VGvGZ84ckVX+eqin0mFLVFv9W0LTyJhtzTJqi77DDAgW26qXmuOGfHQKFQw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774968560; c=relaxed/simple; bh=kpTGaXPOBKEdr4hf/MCI1JWrLLFv9km3JXv8A6BAcZI=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=WDMq46cDaZkSH4LXycYhsEEH6DVY9Hom+7Qa2iacSio+mH4Yq7wgSv5K1+CDJnT/bSKQf58gZC2s/FnZyNRSIyDKXOJwPUQAzweNCiPQfjKP7hBvuS8TVcq8+7gSpbOKO3HOhlp2de6ZPV8CMBRSTU6GwoBRC/fcT1H6JDUL1Hk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B87524BB58EF Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 441745BDCF; Tue, 31 Mar 2026 14:49:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1774968554; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LOoGd9zXpodc2ILD8yvmfW8i0cco/FbxrD8d0CXQk0I=; b=RsdUrVGpPE4ZWSWi10uOhtnATrd29vorOU4/2WDThljDwi5fyoTvphTWEE6qat8/DT88Bi Nkm1ivLwDM/n2Bjvko47J7X7kUwENtBLNrhAiWxMj4OkUdTPtsAxviYZGc0FIsM4WqeTpv uCf56Mr8sn+i5vdSp41gYf344+5KQRc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1774968554; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LOoGd9zXpodc2ILD8yvmfW8i0cco/FbxrD8d0CXQk0I=; b=cxccLqmyIvLhKFCrUb4f0DjJ4IeT5LYvSEEDt4wX93FRL1n3SIbgJyKEcCfhyKPyUKnGrL T6+XhFgEVUnafzCg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1774968554; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LOoGd9zXpodc2ILD8yvmfW8i0cco/FbxrD8d0CXQk0I=; b=RsdUrVGpPE4ZWSWi10uOhtnATrd29vorOU4/2WDThljDwi5fyoTvphTWEE6qat8/DT88Bi Nkm1ivLwDM/n2Bjvko47J7X7kUwENtBLNrhAiWxMj4OkUdTPtsAxviYZGc0FIsM4WqeTpv uCf56Mr8sn+i5vdSp41gYf344+5KQRc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1774968554; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LOoGd9zXpodc2ILD8yvmfW8i0cco/FbxrD8d0CXQk0I=; b=cxccLqmyIvLhKFCrUb4f0DjJ4IeT5LYvSEEDt4wX93FRL1n3SIbgJyKEcCfhyKPyUKnGrL T6+XhFgEVUnafzCg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2A3304A0A2; Tue, 31 Mar 2026 14:49:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id BBERCerey2kIMAAAD6G6ig (envelope-from ); Tue, 31 Mar 2026 14:49:14 +0000 Message-ID: <662d00dd-c026-4af1-a293-b0247f22fae5@suse.de> Date: Tue, 31 Mar 2026 16:49:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb/testsuite: skip ada-valprint-error with clang To: Bratislav Filipovic , gdb-patches@sourceware.org Cc: simon.marchi@efficios.com References: <20260331142934.3978473-1-bfilipov@amd.com> Content-Language: en-US From: Tom de Vries In-Reply-To: <20260331142934.3978473-1-bfilipov@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid] 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 On 3/31/26 4:29 PM, Bratislav Filipovic wrote: > The ada-valprint-error.exp test fails when compiled with clang due > to a linker relocation issue in the test infrastructure, not a GDB > bug. > > The test compiles ada-valprint-error.c with nodebug flags, then > links it with a separate DWARF .o file generated by lib/dwarf.exp. > The C source defines: > > int buffer[] = {0, 0}; > void *fd__global = &buffer; > > This requires the linker to apply an R_X86_64_64 relocation to > store buffer's address into fd__global. With GCC, the linker > correctly applies this relocation. With clang, the linker fails > to apply it, leaving fd__global as NULL. > > Binary evidence: > - GCC binary: fd__global = 0x4020 (correct address of buffer) > - Clang binary: fd__global = 0x0 (NULL) > > Both .o files contain the R_X86_64_64 relocation entry, but the > final linked binary differs: > - GCC emits fd__global in .data.rel.local section -> relocation works > - Clang emits fd__global in .data section -> relocation fails > > This appears to be a toolchain/testsuite compatibility issue when > linking nodebug object files with separate DWARF objects. Skip > the test for clang to avoid false failures. > > Tested on x86_64-linux-gnu with both GCC and clang. > > --- > gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp > index f3d61e91..c23d58a8 100644 > --- a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp > +++ b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp > @@ -14,6 +14,14 @@ > # along with this program. If not, see . > load_lib dwarf.exp > > +# Clang's linker fails to apply relocations when linking nodebug .o > +# with separate DWARF .o, resulting in fd__global being NULL instead > +# of pointing to buffer. > +if {[test_compiler_info "clang-*"]} { > + unsupported "clang linker relocation issue with nodebug+DWARF linking" > + return > +} Hi, I think it would be useful if you'd document what version of clang you're having this problem with. And since it's not clear to me from your explanation whether it's a compiler or linker bug, perhaps linker version as well? Also, this test-case passes for me with clang (17.0.6, 19.1.7, with ld 2.45.0), so disabling it entirely for clang seems too intrusive. How about printing the value of fd__global, and declaring the test-case unsupported if the value is nullptr? Thanks, - Tom > + > # This test can only be run on targets which support DWARF-2 and use gas. > require dwarf2_support >