From 946b61ca5de9fb55f9129536288090aefe7c74d6 Mon Sep 17 00:00:00 2001 From: Marco Casaroli Date: Thu, 23 Jul 2026 13:26:25 +0200 Subject: [PATCH] include/elf.h: Add the DT_*_ARRAY dynamic tags. DT_INIT_ARRAY, DT_FINI_ARRAY and their size tags are in the base ELF specification (Figure 5-10) but were missing from the header, which stopped at DT_BINDNOW. A loader that wants to run an object's constructors has nothing to compare d_tag against. Assisted-by: Claude Code:claude-opus-4-8 Signed-off-by: Marco Casaroli --- include/elf.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/elf.h b/include/elf.h index a3d6dc8f927..922ba930155 100644 --- a/include/elf.h +++ b/include/elf.h @@ -278,6 +278,10 @@ #define DT_TEXTREL 22 /* d_un=ignored */ #define DT_JMPREL 23 /* d_un=d_ptr */ #define DT_BINDNOW 24 /* d_un=ignored */ +#define DT_INIT_ARRAY 25 /* d_un=d_ptr */ +#define DT_FINI_ARRAY 26 /* d_un=d_ptr */ +#define DT_INIT_ARRAYSZ 27 /* d_un=d_val */ +#define DT_FINI_ARRAYSZ 28 /* d_un=d_val */ #define DT_LOPROC 0x70000000 /* d_un=unspecified */ #define DT_HIPROC 0x7fffffff /* d_un= unspecified */