summaryrefslogtreecommitdiffstats
path: root/contrib/file/readelf.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/file/readelf.h')
-rw-r--r--contrib/file/readelf.h81
1 files changed, 51 insertions, 30 deletions
diff --git a/contrib/file/readelf.h b/contrib/file/readelf.h
index 6b3e806..c79e844 100644
--- a/contrib/file/readelf.h
+++ b/contrib/file/readelf.h
@@ -32,7 +32,7 @@
* Note: cobbled from the linux header file, with modifications
*/
#ifndef __fake_elf_h__
-#define __fake_elf_h__
+#define __fake_elf_h__
#if HAVE_STDINT_H
#include <stdint.h>
@@ -45,7 +45,7 @@ typedef uint32_t Elf32_Word;
typedef uint8_t Elf32_Char;
#if SIZEOF_LONG_LONG != 8
-#define USE_ARRAY_FOR_64BIT_TYPES
+#define USE_ARRAY_FOR_64BIT_TYPES
typedef uint32_t Elf64_Addr[2];
typedef uint32_t Elf64_Off[2];
typedef uint32_t Elf64_Xword[2];
@@ -59,7 +59,7 @@ typedef uint16_t Elf64_Half;
typedef uint32_t Elf64_Word;
typedef uint8_t Elf64_Char;
-#define EI_NIDENT 16
+#define EI_NIDENT 16
typedef struct {
Elf32_Char e_ident[EI_NIDENT];
@@ -96,10 +96,10 @@ typedef struct {
} Elf64_Ehdr;
/* e_type */
-#define ET_REL 1
-#define ET_EXEC 2
-#define ET_DYN 3
-#define ET_CORE 4
+#define ET_REL 1
+#define ET_EXEC 2
+#define ET_DYN 3
+#define ET_CORE 4
/* e_machine (used only for SunOS 5.x hardware capabilities) */
#define EM_SPARC 2
@@ -110,20 +110,20 @@ typedef struct {
#define EM_AMD64 62
/* sh_type */
-#define SHT_SYMTAB 2
-#define SHT_NOTE 7
-#define SHT_DYNSYM 11
-#define SHT_SUNW_cap 0x6ffffff5 /* SunOS 5.x hw/sw capabilites */
+#define SHT_SYMTAB 2
+#define SHT_NOTE 7
+#define SHT_DYNSYM 11
+#define SHT_SUNW_cap 0x6ffffff5 /* SunOS 5.x hw/sw capabilites */
/* elf type */
-#define ELFDATANONE 0 /* e_ident[EI_DATA] */
-#define ELFDATA2LSB 1
-#define ELFDATA2MSB 2
+#define ELFDATANONE 0 /* e_ident[EI_DATA] */
+#define ELFDATA2LSB 1
+#define ELFDATA2MSB 2
/* elf class */
-#define ELFCLASSNONE 0
-#define ELFCLASS32 1
-#define ELFCLASS64 2
+#define ELFCLASSNONE 0
+#define ELFCLASS32 1
+#define ELFCLASS64 2
/* magic number */
#define EI_MAG0 0 /* e_ident[] indexes */
@@ -221,27 +221,48 @@ typedef struct {
#define NT_PRFPREG 2
#define NT_PRPSINFO 3
#define NT_PRXREG 4
-#define NT_TASKSTRUCT 4
+#define NT_TASKSTRUCT 4
#define NT_PLATFORM 5
#define NT_AUXV 6
#define NT_THRMISC 7
/* Note types used in executables */
/* NetBSD executables (name = "NetBSD") */
-#define NT_NETBSD_VERSION 1
-#define NT_NETBSD_EMULATION 2
-#define NT_FREEBSD_VERSION 1
-#define NT_OPENBSD_VERSION 1
-#define NT_DRAGONFLY_VERSION 1
-/* GNU executables (name = "GNU") */
-#define NT_GNU_VERSION 1
+#define NT_NETBSD_VERSION 1
+#define NT_NETBSD_EMULATION 2
+#define NT_FREEBSD_VERSION 1
+#define NT_OPENBSD_VERSION 1
+#define NT_DRAGONFLY_VERSION 1
+/*
+ * GNU executables (name = "GNU")
+ * word[0]: GNU OS tags
+ * word[1]: major version
+ * word[2]: minor version
+ * word[3]: tiny version
+ */
+#define NT_GNU_VERSION 1
/* GNU OS tags */
-#define GNU_OS_LINUX 0
-#define GNU_OS_HURD 1
-#define GNU_OS_SOLARIS 2
-#define GNU_OS_KFREEBSD 3
-#define GNU_OS_KNETBSD 4
+#define GNU_OS_LINUX 0
+#define GNU_OS_HURD 1
+#define GNU_OS_SOLARIS 2
+#define GNU_OS_KFREEBSD 3
+#define GNU_OS_KNETBSD 4
+
+/*
+ * GNU Hardware capability information
+ * word[0]: Number of entries
+ * word[1]: Bitmask of enabled entries
+ * Followed by a byte id, and a NUL terminated string per entry
+ */
+#define NT_GNU_HWCAP 2
+
+/*
+ * GNU Build ID generated by ld
+ * 160 bit SHA1 [default]
+ * 128 bit md5 or uuid
+ */
+#define NT_GNU_BUILD_ID 3
/* SunOS 5.x hardware/software capabilities */
typedef struct {
OpenPOWER on IntegriCloud