summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2016-05-13 10:20:12 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2016-05-13 10:20:12 +0000
commitcdb7dab06c93d76a39f710cf8926df35cc34dd9d (patch)
treedd05ea6c87b8303a2ed55e690733a7c01c0b7580
parenta3d823336a4953ee1f06a9a2dea17cdf69081640 (diff)
downloadbcm5719-llvm-cdb7dab06c93d76a39f710cf8926df35cc34dd9d.tar.gz
bcm5719-llvm-cdb7dab06c93d76a39f710cf8926df35cc34dd9d.zip
[Support/ELF] - Added few constants and structs relative to compressed sections.
Patch adds few constants and structs to support compressed sections. SHF_COMPRESSED intersects with platform specific XCORE_SHF_CP_SECTION, both has value of 0x800U. Reference link: http://www.sco.com/developers/gabi/latest/ch4.sheader.html Differential revision: http://reviews.llvm.org/D20209 llvm-svn: 269404
-rw-r--r--llvm/include/llvm/Support/ELF.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/ELF.h b/llvm/include/llvm/Support/ELF.h
index ef868ef075d..352fd8a5cde 100644
--- a/llvm/include/llvm/Support/ELF.h
+++ b/llvm/include/llvm/Support/ELF.h
@@ -740,6 +740,9 @@ enum : unsigned {
// This section holds Thread-Local Storage.
SHF_TLS = 0x400U,
+ // Identifies a section containing compressed data.
+ SHF_COMPRESSED = 0x800U,
+
// This section is excluded from the final executable or shared library.
SHF_EXCLUDE = 0x80000000U,
@@ -1315,6 +1318,30 @@ enum {
NT_GNU_BUILD_ID = 3
};
+// Compressed section header for ELF32.
+struct Elf32_Chdr {
+ Elf32_Word ch_type;
+ Elf32_Word ch_size;
+ Elf32_Word ch_addralign;
+};
+
+// Compressed section header for ELF64.
+struct Elf64_Chdr {
+ Elf64_Word ch_type;
+ Elf64_Word ch_reserved;
+ Elf64_Xword ch_size;
+ Elf64_Xword ch_addralign;
+};
+
+// Legal values for ch_type field of compressed section header.
+enum {
+ ELFCOMPRESS_ZLIB = 1, // ZLIB/DEFLATE algorithm.
+ ELFCOMPRESS_LOOS = 0x60000000, // Start of OS-specific.
+ ELFCOMPRESS_HIOS = 0x6fffffff, // End of OS-specific.
+ ELFCOMPRESS_LOPROC = 0x70000000, // Start of processor-specific.
+ ELFCOMPRESS_HIPROC = 0x7fffffff // End of processor-specific.
+};
+
} // end namespace ELF
} // end namespace llvm
OpenPOWER on IntegriCloud