Add Elf_Internal_Chdr and ElfXX_External_Chdr
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 3 Apr 2015 19:49:45 +0000 (12:49 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 3 Apr 2015 19:50:10 +0000 (12:50 -0700)
* external.h (Elf32_External_Chdr): New.
(Elf64_External_Chdr): Likewise.
* internal.h (Elf_Internal_Chdr): Likewise.

include/elf/ChangeLog
include/elf/external.h
include/elf/internal.h

index 2c7139d921505403427fe94b035b14f7b6fcd925..55bc60c64e0af1930c473f39876bcd03a7746a1d 100644 (file)
@@ -1,3 +1,9 @@
+2015-04-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * external.h (Elf32_External_Chdr): New.
+       (Elf64_External_Chdr): Likewise.
+       * internal.h (Elf_Internal_Chdr): Likewise.
+
 2015-03-26  H.J. Lu  <hongjiu.lu@intel.com>
 
        * common.h (ELFOSABI_CLOUDABI): New.
index cd93c3cfddbdb7b2a35fdfb77570beb8ddfc9782..b6057b5ac45af89686c70088ddb748bd6277508b 100644 (file)
@@ -135,6 +135,20 @@ typedef struct {
   unsigned char        sh_entsize[8];          /* Entry size if section holds table */
 } Elf64_External_Shdr;
 
+/* Compression header */
+
+typedef struct {
+  unsigned char        ch_type[4];             /* Type of compression */
+  unsigned char        ch_size[4];             /* Size of uncompressed data in bytes */
+  unsigned char        ch_addralign[4];        /* Alignment of uncompressed data  */
+} Elf32_External_Chdr;
+
+typedef struct {
+  unsigned char        ch_type[8];             /* Type of compression */
+  unsigned char        ch_size[8];             /* Size of uncompressed data in bytes */
+  unsigned char        ch_addralign[8];        /* Alignment of uncompressed data  */
+} Elf64_External_Chdr;
+
 /* Symbol table entry */
 
 typedef struct {
index 04e0582ab50561a6b17938f48b42c5a64d6fcfa5..b2492f55a2fbd9955a118ab9c0e8d1194e0dba0a 100644 (file)
@@ -115,6 +115,14 @@ typedef struct elf_internal_shdr {
   unsigned char *contents;             /* Section contents.  */
 } Elf_Internal_Shdr;
 
+/* Compression header */
+
+typedef struct elf_internal_chdr {
+  unsigned int ch_type;                /* Type of compression */
+  bfd_size_type        ch_size;                /* Size of uncompressed data in bytes */
+  bfd_vma      ch_addralign;           /* Alignment of uncompressed data */
+} Elf_Internal_Chdr;
+
 /* Symbol table entry */
 
 struct elf_internal_sym {