| Message ID | yddikhkj77n.fsf@CeBiTec.Uni-Bielefeld.DE |
|---|---|
| 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 server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A35713857C67 for <patchwork@sourceware.org>; Mon, 15 Sep 2025 11:18:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A35713857C67 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=QLyANUwC X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 177D83858D1E for <binutils@sourceware.org>; Mon, 15 Sep 2025 11:17:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 177D83858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 177D83858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=129.70.160.84 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757935038; cv=none; b=hGWDfj8shyeVpxcevuSosjduxXnbepDFkgykgaysg+EqZuFT6vg/0ml6iqPQoEIEY6AZqMqcQg4mPJ5Ymqa4YkKN+XFX1gG/6GHKaal9bq2ybkaIYPUh2aNMCwFmAfks1EuikDgnVfjITt+MQv1IacoK/qgOqEtvJnfJxiuYmgY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757935038; c=relaxed/simple; bh=A+JXAgLNDuZ+0SL7W3WQv/xGVYvdXHnqnyvFhVWfUao=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=kGREFDIOzrYhAhNTd8rQh+w9mos2CxHLev72ubCwb499yetocFeHTLBk9Chf+ToLGex9fK5+pk7kIffqAGMFSWNV0Hzy6RCisgn4wM8Boppquhybaxqcs54/67XefpjSG3wuucyfVcQizfzTsJPh9ei6cN55DASfbg6aJUTiTew= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 177D83858D1E Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 4458AE08FB; Mon, 15 Sep 2025 13:17:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= cebitec.uni-bielefeld.de; h=content-type:content-type :mime-version:user-agent:message-id:date:date:subject:subject :from:from:received:received; s=20200306; t=1757935037; bh=A+JXA gLNDuZ+0SL7W3WQv/xGVYvdXHnqnyvFhVWfUao=; b=QLyANUwCW/I4apf+06+B/ 28eAH+WudOIEvGr7wE+cN5q9XV9tcUhMXUlDAUamhaczJiOt9pkI3yZKQvq+8nZp fsc05TMY+ZE52V/C1uq9Nt90in/ogZoqKRZLWnXhGwuxsEZpnrIeT/VFYdJ8zazd fIqbWBtkMTzz24cgNpNQk6kXzTKiH2/9M6UzuQwDh2MmnYJ6KdpLLMA6EEseuP+9 8i18a9bcO0/blQLNEiftAzFf3Zi/tlNdfgJ5tQYL4tuA+v2ZL30gTPNCyUb4XGLN +1JjTvzUNSb8Zmr7K3Zr3qzT7cMR+5AM2+zpwLj/dGPKCwRPG/Khl1cAEsAoPcYy w== X-Virus-Scanned: amavisd-new at cebitec.uni-bielefeld.de Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id R9aDdF9cSTFL; Mon, 15 Sep 2025 13:17:17 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p50854244.dip0.t-ipconnect.de [80.133.66.68]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id D2CC6E0B9A; Mon, 15 Sep 2025 13:17:16 +0200 (CEST) From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> To: <binutils@sourceware.org> Cc: Nick Clifton <nickc@redhat.com> Subject: [PATCH] bfd: Fix build with -DDEBUG=2 Date: Mon, 15 Sep 2025 13:17:16 +0200 Message-ID: <yddikhkj77n.fsf@CeBiTec.Uni-Bielefeld.DE> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Status: No, score=-3783.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP 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.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 |
bfd: Fix build with -DDEBUG=2
|
|
Commit Message
Rainer Orth
Sept. 15, 2025, 11:17 a.m. UTC
When building with -DDEBUG=2, bfd doesn't compile:
In file included from bfd/elfcode.h:2051,
from bfd/elf32.c:23:
bfd/elfcore.h: In function ‘_bfd_elf32_core_find_build_id’:
bfd/elfcore.h:354:3: error: implicit declaration of function ‘elf_debug_file’; did you mean ‘elf_debug_section’? [-Wimplicit-function-declaration]
354 | elf_debug_file (&i_ehdr);
| ^~~~~~~~~~~~~~
| elf_debug_section
This happens because a guard in elfcore.h doesn't match the others.
This patch fixes this, allowing the build to complete.
Tested on amd64-pc-solaris2.11.
I guess that counts as obvious.
Rainer
Comments
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes: > When building with -DDEBUG=2, bfd doesn't compile: > > In file included from bfd/elfcode.h:2051, > from bfd/elf32.c:23: > bfd/elfcore.h: In function ‘_bfd_elf32_core_find_build_id’: > bfd/elfcore.h:354:3: error: implicit declaration of function ‘elf_debug_file’; did you mean ‘elf_debug_section’? [-Wimplicit-function-declaration] > 354 | elf_debug_file (&i_ehdr); > | ^~~~~~~~~~~~~~ > | elf_debug_section > > This happens because a guard in elfcore.h doesn't match the others. > > This patch fixes this, allowing the build to complete. > > Tested on amd64-pc-solaris2.11. > > I guess that counts as obvious. I haven't heard about this in two weeks. Unless someone objects, I'll commit it as obvious in a couple of days. Rainer
diff --git a/bfd/elfcore.h b/bfd/elfcore.h --- a/bfd/elfcore.h +++ b/bfd/elfcore.h @@ -350,7 +350,7 @@ NAME(_bfd_elf, core_find_build_id) } elf_swap_ehdr_in (abfd, &x_ehdr, &i_ehdr); -#if DEBUG +#if DEBUG & 1 elf_debug_file (&i_ehdr); #endif