The contents of ctf.h have diverged between GCC's version and binutils'
version, which means that "combined tree" builds are currently broken.
This patch copies the definition of CTF_F_ARRNELEMS from binutils to
restore combined-tree builds, using GCC's ctf.h with the libctf
in binutils.

This patch has been tested with a combined-tree build targeting
aarch64-elf on a x86_64-pc-linux-gnu host.  Ok for mainline?


2026-02-25  Roger Sayle  <[email protected]>

include/ChangeLog
        * ctf.h (CTF_F_ARRNELEMS): Merge definition from binutils/libctf.


Roger
--

diff --git a/include/ctf.h b/include/ctf.h
index 02e10d7136ad..d1d6ebb9b054 100644
--- a/include/ctf.h
+++ b/include/ctf.h
@@ -213,8 +213,9 @@ typedef struct ctf_header
 #define CTF_F_NEWFUNCINFO 0x2          /* New v3 func info section format.  */
 #define CTF_F_IDXSORTED 0x4            /* Index sections already sorted.  */
 #define CTF_F_DYNSTR 0x8               /* Strings come from .dynstr.  */
+#define CTF_F_ARRNELEMS 0x10           /* Array elems no longer reversed.  */
 #define CTF_F_MAX (CTF_F_COMPRESS | CTF_F_NEWFUNCINFO | CTF_F_IDXSORTED        
\
-                  | CTF_F_DYNSTR)
+                  | CTF_F_DYNSTR | CTF_F_ARRNELEMS)
 
 typedef struct ctf_lblent
 {

Reply via email to