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 <marco.casaroli@gmail.com>
This commit is contained in:
Marco Casaroli 2026-07-23 13:26:25 +02:00
parent 8cec1d01db
commit 946b61ca5d

View file

@ -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 */