summaryrefslogtreecommitdiffstats
path: root/sys/sys
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2017-05-27 01:35:59 +0000
committeremaste <emaste@FreeBSD.org>2017-05-27 01:35:59 +0000
commitb9167d33a12b8a6c279be9cd1005874728e808c9 (patch)
tree0eeb5c505b12363d7c4a34b93603dfd18ca2ec31 /sys/sys
parent9feb41f34ce7341a50fdacbac96c13c663e76a9a (diff)
downloadFreeBSD-src-b9167d33a12b8a6c279be9cd1005874728e808c9.zip
FreeBSD-src-b9167d33a12b8a6c279be9cd1005874728e808c9.tar.gz
MFC r312599 (cem): Add remaining ELF compression definitions and structs
PR: 219417
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/elf32.h6
-rw-r--r--sys/sys/elf64.h7
-rw-r--r--sys/sys/elf_common.h7
3 files changed, 20 insertions, 0 deletions
diff --git a/sys/sys/elf32.h b/sys/sys/elf32.h
index 03a546c..0aa3142 100644
--- a/sys/sys/elf32.h
+++ b/sys/sys/elf32.h
@@ -254,4 +254,10 @@ typedef struct {
Elf32_Half si_flags; /* per symbol flags */
} Elf32_Syminfo;
+typedef struct {
+ Elf32_Word ch_type;
+ Elf32_Word ch_size;
+ Elf32_Word ch_addralign;
+} Elf32_Chdr;
+
#endif /* !_SYS_ELF32_H_ */
diff --git a/sys/sys/elf64.h b/sys/sys/elf64.h
index f069619..a309dfc 100644
--- a/sys/sys/elf64.h
+++ b/sys/sys/elf64.h
@@ -257,4 +257,11 @@ typedef struct {
Elf64_Half si_flags; /* per symbol flags */
} Elf64_Syminfo;
+typedef struct {
+ Elf64_Word ch_type;
+ Elf64_Word ch_reserved;
+ Elf64_Xword ch_size;
+ Elf64_Xword ch_addralign;
+} Elf64_Chdr;
+
#endif /* !_SYS_ELF64_H_ */
diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h
index ede4b13..e8a8709 100644
--- a/sys/sys/elf_common.h
+++ b/sys/sys/elf_common.h
@@ -849,6 +849,13 @@ typedef struct {
#define SYMINFO_CURRENT 1
#define SYMINFO_NUM 2
+/* Values for ch_type (compressed section headers). */
+#define ELFCOMPRESS_ZLIB 1 /* ZLIB/DEFLATE */
+#define ELFCOMPRESS_LOOS 0x60000000 /* OS-specific */
+#define ELFCOMPRESS_HIOS 0x6fffffff
+#define ELFCOMPRESS_LOPROC 0x70000000 /* Processor-specific */
+#define ELFCOMPRESS_HIPROC 0x7fffffff
+
/*
* Relocation types.
*
OpenPOWER on IntegriCloud