[PATCH] D20209: [Support/ELF] - Added few constants and structs relative to compressed sections.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 03:26:15 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL269404: [Support/ELF] - Added few constants and structs relative to compressed sections. (authored by grimar).

Changed prior to commit:
  http://reviews.llvm.org/D20209?vs=57048&id=57153#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D20209

Files:
  llvm/trunk/include/llvm/Support/ELF.h

Index: llvm/trunk/include/llvm/Support/ELF.h
===================================================================
--- llvm/trunk/include/llvm/Support/ELF.h
+++ llvm/trunk/include/llvm/Support/ELF.h
@@ -740,6 +740,9 @@
   // 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 @@
   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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20209.57153.patch
Type: text/x-patch
Size: 1292 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160513/2b342c67/attachment.bin>


More information about the llvm-commits mailing list