[PATCH] bfd: Fix build with -DDEBUG=2

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Mon Sep 15 11:17:16 GMT 2025


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

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2025-09-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	bfd:
	* elfcore.h [DEBUG]: Fix guard.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: elfcore.patch
Type: text/x-patch
Size: 258 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20250915/3a7de2de/attachment.bin>


More information about the Binutils mailing list