diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-10-04 06:14:13 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-10-04 06:14:36 -0700 |
commit | 9706b5e627dfae1ab0a2788dda8a2aa5a0e09af7 (patch) | |
tree | 0bf334bb6c09b5cbc906252434c5649de8d98308 /elfcpp/elfcpp_internal.h | |
parent | 73e5465df5bdb240d632ed207677916d0fa9ad4c (diff) | |
download | binutils-gdb-9706b5e627dfae1ab0a2788dda8a2aa5a0e09af7.tar.gz |
Change ch_type to Elf_Word in struct Chdr_data<64>
The ch_type field in struct Chdr_data<64> 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.
PR gold/19060
* elfcpp.h (Chdr::get_ch_type): Change return type to Elf_Word.
* elfcpp_internal.h (Chdr_data<64>): Change ch_type to 4 bytes
and add ch_reserved.
Diffstat (limited to 'elfcpp/elfcpp_internal.h')
-rw-r--r-- | elfcpp/elfcpp_internal.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/elfcpp/elfcpp_internal.h b/elfcpp/elfcpp_internal.h index 424a1f6f713..6f9dd4887a2 100644 --- a/elfcpp/elfcpp_internal.h +++ b/elfcpp/elfcpp_internal.h @@ -82,11 +82,23 @@ struct Shdr_data // An ELF compression header. template<int size> -struct Chdr_data +struct Chdr_data; + +template<> +struct Chdr_data<32> +{ + Elf_Word ch_type; + Elf_Word ch_size; + Elf_Word ch_addralign; +}; + +template<> +struct Chdr_data<64> { - typename Elf_types<size>::Elf_WXword ch_type; - typename Elf_types<size>::Elf_WXword ch_size; - typename Elf_types<size>::Elf_WXword ch_addralign; + Elf_Word ch_type; + Elf_Word ch_reserved; + Elf_Xword ch_size; + Elf_Xword ch_addralign; }; // An ELF segment header. We use template specialization for the |