aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2025-02-20 10:13:38 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2025-02-20 10:17:03 -0500
commit1961e699340fc042ff2e5cbdb250694575679afe (patch)
treee3d065e35a0744417fc7a7c221ad46484b58653a
parentbe6adf5b7597cb2eb1e7f07fbfd766a9d6ac42bb (diff)
downloadbinutils-1961e699340fc042ff2e5cbdb250694575679afe.zip
binutils-1961e699340fc042ff2e5cbdb250694575679afe.tar.gz
binutils-1961e699340fc042ff2e5cbdb250694575679afe.tar.bz2
gdb/compile: add missing entry in bfd_link_callbacks array
clang 19 fails to build gdb with this error: /home/simark/src/binutils-gdb/gdb/compile/compile-object-load.c:302:3: error: cannot initialize a member subobject of type 'void (*)(const char *, ...) __attribute__((noreturn))' with an lvalue of type 'void (const char *, ...)' 302 | link_callbacks_einfo, /* einfo */ | ^~~~~~~~~~~~~~~~~~~~ This illustrates that the bfd_link_callbacks array is missing an entry for the "fatal" callback, add it. The fatal field was added very recently, in d26161914 ("PR 32603, more ld -w misbehaviour"). We're lucky that the new callback was marked with the noreturn attribute and that clang checks that, otherwise this would have gone unnoticed. Change-Id: I68b63d89f2707359e6254da23bdc0776b0e03ba2
-rw-r--r--gdb/compile/compile-object-load.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c
index 8b1556e..ef77ee3 100644
--- a/gdb/compile/compile-object-load.c
+++ b/gdb/compile/compile-object-load.c
@@ -299,6 +299,7 @@ static const struct bfd_link_callbacks link_callbacks =
link_callbacks_reloc_dangerous, /* reloc_dangerous */
link_callbacks_unattached_reloc, /* unattached_reloc */
NULL, /* notice */
+ NULL, /* fatal */
link_callbacks_einfo, /* einfo */
NULL, /* info */
NULL, /* minfo */