From 7f7a1bce250bc286d23a4b895d684748bec03a71 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 21 Sep 2015 10:19:25 -0700 Subject: [PATCH] Change ch_type in Elf64_External_Chdr to 4 bytes The ch_type field in Elf64_External_Chdr is 4 bytes, followed by a 4-byte padding. This change doesn't introduce any functional change since only the lower 32 bits of the ch_type field are used. * external.h (Elf64_External_Chdr): Change ch_type to 4 bytes and add ch_reserved. --- include/elf/ChangeLog | 5 +++++ include/elf/external.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index 879daa0e064..47d6bad017e 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,8 @@ +2015-09-21 H.J. Lu + + * external.h (Elf64_External_Chdr): Change ch_type to 4 bytes + and add ch_reserved. + 2015-08-11 Jiong Wang * aarch64.h (R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12): Define. diff --git a/include/elf/external.h b/include/elf/external.h index b6057b5ac45..ffb00b86a51 100644 --- a/include/elf/external.h +++ b/include/elf/external.h @@ -144,7 +144,8 @@ typedef struct { } Elf32_External_Chdr; typedef struct { - unsigned char ch_type[8]; /* Type of compression */ + unsigned char ch_type[4]; /* Type of compression */ + unsigned char ch_reserved[4]; /* Padding */ unsigned char ch_size[8]; /* Size of uncompressed data in bytes */ unsigned char ch_addralign[8]; /* Alignment of uncompressed data */ } Elf64_External_Chdr; -- 2.30.2