readelf.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. /*
  2. * Copyright (c) Christos Zoulas 2003.
  3. * All Rights Reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice immediately at the beginning of the file, without modification,
  10. * this list of conditions, and the following disclaimer.
  11. * 2. Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the distribution.
  14. *
  15. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  16. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  17. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  18. * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
  19. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  20. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  21. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  22. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  23. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  24. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  25. * SUCH DAMAGE.
  26. */
  27. /*
  28. * @(#)Id: readelf.h,v 1.9 2002/05/16 18:45:56 christos Exp
  29. *
  30. * Provide elf data structures for non-elf machines, allowing file
  31. * non-elf hosts to determine if an elf binary is stripped.
  32. * Note: cobbled from the linux header file, with modifications
  33. */
  34. #ifndef __fake_elf_h__
  35. #define __fake_elf_h__
  36. #if HAVE_STDINT_H
  37. #include <stdint.h>
  38. #endif
  39. typedef uint32_t Elf32_Addr;
  40. typedef uint32_t Elf32_Off;
  41. typedef uint16_t Elf32_Half;
  42. typedef uint32_t Elf32_Word;
  43. typedef uint8_t Elf32_Char;
  44. typedef uint64_t Elf64_Addr;
  45. typedef uint64_t Elf64_Off;
  46. typedef uint64_t Elf64_Xword;
  47. typedef uint16_t Elf64_Half;
  48. typedef uint32_t Elf64_Word;
  49. typedef uint8_t Elf64_Char;
  50. #define EI_NIDENT 16
  51. typedef struct {
  52. Elf32_Word a_type; /* 32-bit id */
  53. Elf32_Word a_v; /* 32-bit id */
  54. } Aux32Info;
  55. typedef struct {
  56. Elf64_Xword a_type; /* 64-bit id */
  57. Elf64_Xword a_v; /* 64-bit id */
  58. } Aux64Info;
  59. #define AT_NULL 0 /* end of vector */
  60. #define AT_IGNORE 1 /* entry should be ignored */
  61. #define AT_EXECFD 2 /* file descriptor of program */
  62. #define AT_PHDR 3 /* program headers for program */
  63. #define AT_PHENT 4 /* size of program header entry */
  64. #define AT_PHNUM 5 /* number of program headers */
  65. #define AT_PAGESZ 6 /* system page size */
  66. #define AT_BASE 7 /* base address of interpreter */
  67. #define AT_FLAGS 8 /* flags */
  68. #define AT_ENTRY 9 /* entry point of program */
  69. #define AT_LINUX_NOTELF 10 /* program is not ELF */
  70. #define AT_LINUX_UID 11 /* real uid */
  71. #define AT_LINUX_EUID 12 /* effective uid */
  72. #define AT_LINUX_GID 13 /* real gid */
  73. #define AT_LINUX_EGID 14 /* effective gid */
  74. #define AT_LINUX_PLATFORM 15 /* string identifying CPU for optimizations */
  75. #define AT_LINUX_HWCAP 16 /* arch dependent hints at CPU capabilities */
  76. #define AT_LINUX_CLKTCK 17 /* frequency at which times() increments */
  77. /* AT_* values 18 through 22 are reserved */
  78. #define AT_LINUX_SECURE 23 /* secure mode boolean */
  79. #define AT_LINUX_BASE_PLATFORM 24 /* string identifying real platform, may
  80. * differ from AT_PLATFORM. */
  81. #define AT_LINUX_RANDOM 25 /* address of 16 random bytes */
  82. #define AT_LINUX_HWCAP2 26 /* extension of AT_HWCAP */
  83. #define AT_LINUX_EXECFN 31 /* filename of program */
  84. typedef struct {
  85. Elf32_Char e_ident[EI_NIDENT];
  86. Elf32_Half e_type;
  87. Elf32_Half e_machine;
  88. Elf32_Word e_version;
  89. Elf32_Addr e_entry; /* Entry point */
  90. Elf32_Off e_phoff;
  91. Elf32_Off e_shoff;
  92. Elf32_Word e_flags;
  93. Elf32_Half e_ehsize;
  94. Elf32_Half e_phentsize;
  95. Elf32_Half e_phnum;
  96. Elf32_Half e_shentsize;
  97. Elf32_Half e_shnum;
  98. Elf32_Half e_shstrndx;
  99. } Elf32_Ehdr;
  100. typedef struct {
  101. Elf64_Char e_ident[EI_NIDENT];
  102. Elf64_Half e_type;
  103. Elf64_Half e_machine;
  104. Elf64_Word e_version;
  105. Elf64_Addr e_entry; /* Entry point */
  106. Elf64_Off e_phoff;
  107. Elf64_Off e_shoff;
  108. Elf64_Word e_flags;
  109. Elf64_Half e_ehsize;
  110. Elf64_Half e_phentsize;
  111. Elf64_Half e_phnum;
  112. Elf64_Half e_shentsize;
  113. Elf64_Half e_shnum;
  114. Elf64_Half e_shstrndx;
  115. } Elf64_Ehdr;
  116. /* e_type */
  117. #define ET_REL 1
  118. #define ET_EXEC 2
  119. #define ET_DYN 3
  120. #define ET_CORE 4
  121. /* e_machine (used only for SunOS 5.x hardware capabilities) */
  122. #define EM_SPARC 2
  123. #define EM_386 3
  124. #define EM_SPARC32PLUS 18
  125. #define EM_SPARCV9 43
  126. #define EM_IA_64 50
  127. #define EM_AMD64 62
  128. /* sh_type */
  129. #define SHT_SYMTAB 2
  130. #define SHT_NOTE 7
  131. #define SHT_DYNSYM 11
  132. #define SHT_SUNW_cap 0x6ffffff5 /* SunOS 5.x hw/sw capabilities */
  133. /* elf type */
  134. #define ELFDATANONE 0 /* e_ident[EI_DATA] */
  135. #define ELFDATA2LSB 1
  136. #define ELFDATA2MSB 2
  137. /* elf class */
  138. #define ELFCLASSNONE 0
  139. #define ELFCLASS32 1
  140. #define ELFCLASS64 2
  141. /* magic number */
  142. #define EI_MAG0 0 /* e_ident[] indexes */
  143. #define EI_MAG1 1
  144. #define EI_MAG2 2
  145. #define EI_MAG3 3
  146. #define EI_CLASS 4
  147. #define EI_DATA 5
  148. #define EI_VERSION 6
  149. #define EI_PAD 7
  150. #define ELFMAG0 0x7f /* EI_MAG */
  151. #define ELFMAG1 'E'
  152. #define ELFMAG2 'L'
  153. #define ELFMAG3 'F'
  154. #define ELFMAG "\177ELF"
  155. #define OLFMAG1 'O'
  156. #define OLFMAG "\177OLF"
  157. typedef struct {
  158. Elf32_Word p_type;
  159. Elf32_Off p_offset;
  160. Elf32_Addr p_vaddr;
  161. Elf32_Addr p_paddr;
  162. Elf32_Word p_filesz;
  163. Elf32_Word p_memsz;
  164. Elf32_Word p_flags;
  165. Elf32_Word p_align;
  166. } Elf32_Phdr;
  167. typedef struct {
  168. Elf64_Word p_type;
  169. Elf64_Word p_flags;
  170. Elf64_Off p_offset;
  171. Elf64_Addr p_vaddr;
  172. Elf64_Addr p_paddr;
  173. Elf64_Xword p_filesz;
  174. Elf64_Xword p_memsz;
  175. Elf64_Xword p_align;
  176. } Elf64_Phdr;
  177. #define PT_NULL 0 /* p_type */
  178. #define PT_LOAD 1
  179. #define PT_DYNAMIC 2
  180. #define PT_INTERP 3
  181. #define PT_NOTE 4
  182. #define PT_SHLIB 5
  183. #define PT_PHDR 6
  184. #define PT_NUM 7
  185. typedef struct {
  186. Elf32_Word sh_name;
  187. Elf32_Word sh_type;
  188. Elf32_Word sh_flags;
  189. Elf32_Addr sh_addr;
  190. Elf32_Off sh_offset;
  191. Elf32_Word sh_size;
  192. Elf32_Word sh_link;
  193. Elf32_Word sh_info;
  194. Elf32_Word sh_addralign;
  195. Elf32_Word sh_entsize;
  196. } Elf32_Shdr;
  197. typedef struct {
  198. Elf64_Word sh_name;
  199. Elf64_Word sh_type;
  200. Elf64_Off sh_flags;
  201. Elf64_Addr sh_addr;
  202. Elf64_Off sh_offset;
  203. Elf64_Off sh_size;
  204. Elf64_Word sh_link;
  205. Elf64_Word sh_info;
  206. Elf64_Off sh_addralign;
  207. Elf64_Off sh_entsize;
  208. } Elf64_Shdr;
  209. #define NT_NETBSD_CORE_PROCINFO 1
  210. #define NT_NETBSD_CORE_AUXV 2
  211. struct NetBSD_elfcore_procinfo {
  212. /* Version 1 fields start here. */
  213. uint32_t cpi_version; /* our version */
  214. uint32_t cpi_cpisize; /* sizeof(this struct) */
  215. uint32_t cpi_signo; /* killing signal */
  216. uint32_t cpi_sigcode; /* signal code */
  217. uint32_t cpi_sigpend[4]; /* pending signals */
  218. uint32_t cpi_sigmask[4]; /* blocked signals */
  219. uint32_t cpi_sigignore[4]; /* ignored signals */
  220. uint32_t cpi_sigcatch[4]; /* caught signals */
  221. int32_t cpi_pid; /* process ID */
  222. int32_t cpi_ppid; /* parent process ID */
  223. int32_t cpi_pgrp; /* process group ID */
  224. int32_t cpi_sid; /* session ID */
  225. uint32_t cpi_ruid; /* real user ID */
  226. uint32_t cpi_euid; /* effective user ID */
  227. uint32_t cpi_svuid; /* saved user ID */
  228. uint32_t cpi_rgid; /* real group ID */
  229. uint32_t cpi_egid; /* effective group ID */
  230. uint32_t cpi_svgid; /* saved group ID */
  231. uint32_t cpi_nlwps; /* number of LWPs */
  232. int8_t cpi_name[32]; /* copy of p->p_comm */
  233. /* Add version 2 fields below here. */
  234. int32_t cpi_siglwp; /* LWP target of killing signal */
  235. };
  236. /* Note header in a PT_NOTE section */
  237. typedef struct elf_note {
  238. Elf32_Word n_namesz; /* Name size */
  239. Elf32_Word n_descsz; /* Content size */
  240. Elf32_Word n_type; /* Content type */
  241. } Elf32_Nhdr;
  242. typedef struct {
  243. Elf64_Word n_namesz;
  244. Elf64_Word n_descsz;
  245. Elf64_Word n_type;
  246. } Elf64_Nhdr;
  247. /* Notes used in ET_CORE */
  248. #define NT_PRSTATUS 1
  249. #define NT_PRFPREG 2
  250. #define NT_PRPSINFO 3
  251. #define NT_PRXREG 4
  252. #define NT_TASKSTRUCT 4
  253. #define NT_PLATFORM 5
  254. #define NT_AUXV 6
  255. /* Note types used in executables */
  256. /* NetBSD executables (name = "NetBSD") */
  257. #define NT_NETBSD_VERSION 1
  258. #define NT_NETBSD_EMULATION 2
  259. #define NT_FREEBSD_VERSION 1
  260. #define NT_OPENBSD_VERSION 1
  261. #define NT_DRAGONFLY_VERSION 1
  262. /*
  263. * GNU executables (name = "GNU")
  264. * word[0]: GNU OS tags
  265. * word[1]: major version
  266. * word[2]: minor version
  267. * word[3]: tiny version
  268. */
  269. #define NT_GNU_VERSION 1
  270. /* GNU OS tags */
  271. #define GNU_OS_LINUX 0
  272. #define GNU_OS_HURD 1
  273. #define GNU_OS_SOLARIS 2
  274. #define GNU_OS_KFREEBSD 3
  275. #define GNU_OS_KNETBSD 4
  276. /*
  277. * GNU Hardware capability information
  278. * word[0]: Number of entries
  279. * word[1]: Bitmask of enabled entries
  280. * Followed by a byte id, and a NUL terminated string per entry
  281. */
  282. #define NT_GNU_HWCAP 2
  283. /*
  284. * GNU Build ID generated by ld
  285. * 160 bit SHA1 [default]
  286. * 128 bit md5 or uuid
  287. */
  288. #define NT_GNU_BUILD_ID 3
  289. /*
  290. * NetBSD-specific note type: PaX.
  291. * There should be 1 NOTE per executable.
  292. * name: PaX\0
  293. * namesz: 4
  294. * desc:
  295. * word[0]: capability bitmask
  296. * descsz: 4
  297. */
  298. #define NT_NETBSD_PAX 3
  299. #define NT_NETBSD_PAX_MPROTECT 0x01 /* Force enable Mprotect */
  300. #define NT_NETBSD_PAX_NOMPROTECT 0x02 /* Force disable Mprotect */
  301. #define NT_NETBSD_PAX_GUARD 0x04 /* Force enable Segvguard */
  302. #define NT_NETBSD_PAX_NOGUARD 0x08 /* Force disable Servguard */
  303. #define NT_NETBSD_PAX_ASLR 0x10 /* Force enable ASLR */
  304. #define NT_NETBSD_PAX_NOASLR 0x20 /* Force disable ASLR */
  305. /*
  306. * NetBSD-specific note type: MACHINE_ARCH.
  307. * There should be 1 NOTE per executable.
  308. * name: NetBSD\0
  309. * namesz: 7
  310. * desc: string
  311. * descsz: variable
  312. */
  313. #define NT_NETBSD_MARCH 5
  314. /*
  315. * NetBSD-specific note type: COMPILER MODEL.
  316. * There should be 1 NOTE per executable.
  317. * name: NetBSD\0
  318. * namesz: 7
  319. * desc: string
  320. * descsz: variable
  321. */
  322. #define NT_NETBSD_CMODEL 6
  323. /*
  324. * Golang-specific note type
  325. * name: Go\0\0
  326. * namesz: 4
  327. * desc: base-64 build id.
  328. * descsz: < 128
  329. */
  330. #define NT_GO_BUILD_ID 4
  331. /*
  332. * FreeBSD specific notes
  333. */
  334. #define NT_FREEBSD_PROCSTAT_AUXV 16
  335. #if !defined(ELFSIZE) && defined(ARCH_ELFSIZE)
  336. #define ELFSIZE ARCH_ELFSIZE
  337. #endif
  338. /* SunOS 5.x hardware/software capabilities */
  339. typedef struct {
  340. Elf32_Word c_tag;
  341. union {
  342. Elf32_Word c_val;
  343. Elf32_Addr c_ptr;
  344. } c_un;
  345. } Elf32_Cap;
  346. typedef struct {
  347. Elf64_Xword c_tag;
  348. union {
  349. Elf64_Xword c_val;
  350. Elf64_Addr c_ptr;
  351. } c_un;
  352. } Elf64_Cap;
  353. /* SunOS 5.x hardware/software capability tags */
  354. #define CA_SUNW_NULL 0
  355. #define CA_SUNW_HW_1 1
  356. #define CA_SUNW_SF_1 2
  357. /* SunOS 5.x software capabilities */
  358. #define SF1_SUNW_FPKNWN 0x01
  359. #define SF1_SUNW_FPUSED 0x02
  360. #define SF1_SUNW_MASK 0x03
  361. /* SunOS 5.x hardware capabilities: sparc */
  362. #define AV_SPARC_MUL32 0x0001
  363. #define AV_SPARC_DIV32 0x0002
  364. #define AV_SPARC_FSMULD 0x0004
  365. #define AV_SPARC_V8PLUS 0x0008
  366. #define AV_SPARC_POPC 0x0010
  367. #define AV_SPARC_VIS 0x0020
  368. #define AV_SPARC_VIS2 0x0040
  369. #define AV_SPARC_ASI_BLK_INIT 0x0080
  370. #define AV_SPARC_FMAF 0x0100
  371. #define AV_SPARC_FJFMAU 0x4000
  372. #define AV_SPARC_IMA 0x8000
  373. /* SunOS 5.x hardware capabilities: 386 */
  374. #define AV_386_FPU 0x00000001
  375. #define AV_386_TSC 0x00000002
  376. #define AV_386_CX8 0x00000004
  377. #define AV_386_SEP 0x00000008
  378. #define AV_386_AMD_SYSC 0x00000010
  379. #define AV_386_CMOV 0x00000020
  380. #define AV_386_MMX 0x00000040
  381. #define AV_386_AMD_MMX 0x00000080
  382. #define AV_386_AMD_3DNow 0x00000100
  383. #define AV_386_AMD_3DNowx 0x00000200
  384. #define AV_386_FXSR 0x00000400
  385. #define AV_386_SSE 0x00000800
  386. #define AV_386_SSE2 0x00001000
  387. #define AV_386_PAUSE 0x00002000
  388. #define AV_386_SSE3 0x00004000
  389. #define AV_386_MON 0x00008000
  390. #define AV_386_CX16 0x00010000
  391. #define AV_386_AHF 0x00020000
  392. #define AV_386_TSCP 0x00040000
  393. #define AV_386_AMD_SSE4A 0x00080000
  394. #define AV_386_POPCNT 0x00100000
  395. #define AV_386_AMD_LZCNT 0x00200000
  396. #define AV_386_SSSE3 0x00400000
  397. #define AV_386_SSE4_1 0x00800000
  398. #define AV_386_SSE4_2 0x01000000
  399. /*
  400. * Dynamic Section structure array
  401. */
  402. typedef struct {
  403. Elf32_Word d_tag; /* entry tag value */
  404. union {
  405. Elf32_Addr d_ptr;
  406. Elf32_Word d_val;
  407. } d_un;
  408. } Elf32_Dyn;
  409. typedef struct {
  410. Elf64_Xword d_tag; /* entry tag value */
  411. union {
  412. Elf64_Addr d_ptr;
  413. Elf64_Xword d_val;
  414. } d_un;
  415. } Elf64_Dyn;
  416. /* d_tag */
  417. #define DT_NULL 0 /* Marks end of dynamic array */
  418. #define DT_NEEDED 1 /* Name of needed library (DT_STRTAB offset) */
  419. #define DT_PLTRELSZ 2 /* Size, in bytes, of relocations in PLT */
  420. #define DT_PLTGOT 3 /* Address of PLT and/or GOT */
  421. #define DT_HASH 4 /* Address of symbol hash table */
  422. #define DT_STRTAB 5 /* Address of string table */
  423. #define DT_SYMTAB 6 /* Address of symbol table */
  424. #define DT_RELA 7 /* Address of Rela relocation table */
  425. #define DT_RELASZ 8 /* Size, in bytes, of DT_RELA table */
  426. #define DT_RELAENT 9 /* Size, in bytes, of one DT_RELA entry */
  427. #define DT_STRSZ 10 /* Size, in bytes, of DT_STRTAB table */
  428. #define DT_SYMENT 11 /* Size, in bytes, of one DT_SYMTAB entry */
  429. #define DT_INIT 12 /* Address of initialization function */
  430. #define DT_FINI 13 /* Address of termination function */
  431. #define DT_SONAME 14 /* Shared object name (DT_STRTAB offset) */
  432. #define DT_RPATH 15 /* Library search path (DT_STRTAB offset) */
  433. #define DT_SYMBOLIC 16 /* Start symbol search within local object */
  434. #define DT_REL 17 /* Address of Rel relocation table */
  435. #define DT_RELSZ 18 /* Size, in bytes, of DT_REL table */
  436. #define DT_RELENT 19 /* Size, in bytes, of one DT_REL entry */
  437. #define DT_PLTREL 20 /* Type of PLT relocation entries */
  438. #define DT_DEBUG 21 /* Used for debugging; unspecified */
  439. #define DT_TEXTREL 22 /* Relocations might modify non-writable seg */
  440. #define DT_JMPREL 23 /* Address of relocations associated with PLT */
  441. #define DT_BIND_NOW 24 /* Process all relocations at load-time */
  442. #define DT_INIT_ARRAY 25 /* Address of initialization function array */
  443. #define DT_FINI_ARRAY 26 /* Size, in bytes, of DT_INIT_ARRAY array */
  444. #define DT_INIT_ARRAYSZ 27 /* Address of termination function array */
  445. #define DT_FINI_ARRAYSZ 28 /* Size, in bytes, of DT_FINI_ARRAY array*/
  446. #define DT_RUNPATH 29 /* overrides DT_RPATH */
  447. #define DT_FLAGS 30 /* Encodes ORIGIN, SYMBOLIC, TEXTREL, BIND_NOW, STATIC_TLS */
  448. #define DT_ENCODING 31 /* ??? */
  449. #define DT_PREINIT_ARRAY 32 /* Address of pre-init function array */
  450. #define DT_PREINIT_ARRAYSZ 33 /* Size, in bytes, of DT_PREINIT_ARRAY array */
  451. #define DT_NUM 34
  452. #define DT_LOOS 0x60000000 /* Operating system specific range */
  453. #define DT_VERSYM 0x6ffffff0 /* Symbol versions */
  454. #define DT_FLAGS_1 0x6ffffffb /* ELF dynamic flags */
  455. #define DT_VERDEF 0x6ffffffc /* Versions defined by file */
  456. #define DT_VERDEFNUM 0x6ffffffd /* Number of versions defined by file */
  457. #define DT_VERNEED 0x6ffffffe /* Versions needed by file */
  458. #define DT_VERNEEDNUM 0x6fffffff /* Number of versions needed by file */
  459. #define DT_HIOS 0x6fffffff
  460. #define DT_LOPROC 0x70000000 /* Processor-specific range */
  461. #define DT_HIPROC 0x7fffffff
  462. /* Flag values for DT_FLAGS */
  463. #define DF_ORIGIN 0x00000001 /* uses $ORIGIN */
  464. #define DF_SYMBOLIC 0x00000002 /* */
  465. #define DF_TEXTREL 0x00000004 /* */
  466. #define DF_BIND_NOW 0x00000008 /* */
  467. #define DF_STATIC_TLS 0x00000010 /* */
  468. /* Flag values for DT_FLAGS_1 */
  469. #define DF_1_NOW 0x00000001 /* Same as DF_BIND_NOW */
  470. #define DF_1_GLOBAL 0x00000002 /* Unused */
  471. #define DF_1_GROUP 0x00000004 /* Is member of group */
  472. #define DF_1_NODELETE 0x00000008 /* Cannot be deleted from process */
  473. #define DF_1_LOADFLTR 0x00000010 /* Immediate loading of filters */
  474. #define DF_1_INITFIRST 0x00000020 /* init/fini takes priority */
  475. #define DF_1_NOOPEN 0x00000040 /* Do not allow loading on dlopen() */
  476. #define DF_1_ORIGIN 0x00000080 /* Require $ORIGIN processing */
  477. #define DF_1_DIRECT 0x00000100 /* Enable direct bindings */
  478. #define DF_1_INTERPOSE 0x00000400 /* Is an interposer */
  479. #define DF_1_NODEFLIB 0x00000800 /* Ignore default library search path */
  480. #define DF_1_NODUMP 0x00001000 /* Cannot be dumped with dldump(3C) */
  481. #define DF_1_CONFALT 0x00002000 /* Configuration alternative */
  482. #define DF_1_ENDFILTEE 0x00004000 /* Filtee ends filter's search */
  483. #define DF_1_DISPRELDNE 0x00008000 /* Did displacement relocation */
  484. #define DF_1_DISPRELPND 0x00010000 /* Pending displacement relocation */
  485. #define DF_1_NODIRECT 0x00020000 /* Has non-direct bindings */
  486. #define DF_1_IGNMULDEF 0x00040000 /* Used internally */
  487. #define DF_1_NOKSYMS 0x00080000 /* Used internally */
  488. #define DF_1_NOHDR 0x00100000 /* Used internally */
  489. #define DF_1_EDITED 0x00200000 /* Has been modified since build */
  490. #define DF_1_NORELOC 0x00400000 /* Used internally */
  491. #define DF_1_SYMINTPOSE 0x00800000 /* Has individual symbol interposers */
  492. #define DF_1_GLOBAUDIT 0x01000000 /* Require global auditing */
  493. #define DF_1_SINGLETON 0x02000000 /* Has singleton symbols */
  494. #define DF_1_STUB 0x04000000 /* Stub */
  495. #define DF_1_PIE 0x08000000 /* Position Independent Executable */
  496. #endif