• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révision9706b5e627dfae1ab0a2788dda8a2aa5a0e09af7 (tree)
l'heure2015-10-04 22:14:36
AuteurH.J. Lu <hjl.tools@gmai...>
CommiterH.J. Lu

Message de Log

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.

Change Summary

Modification

--- a/elfcpp/ChangeLog
+++ b/elfcpp/ChangeLog
@@ -1,3 +1,10 @@
1+2015-10-02 H.J. Lu <hongjiu.lu@intel.com>
2+
3+ PR gold/19060
4+ * elfcpp.h (Chdr::get_ch_type): Change return type to Elf_Word.
5+ * elfcpp_internal.h (Chdr_data<64>): Change ch_type to 4 bytes
6+ and add ch_reserved.
7+
18 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
29
310 * elfcpp.h (Elf_sizes): Add chdr_size.
--- a/elfcpp/elfcpp.h
+++ b/elfcpp/elfcpp.h
@@ -1302,7 +1302,7 @@ class Chdr
13021302 file->view(loc.file_offset, loc.data_size).data()))
13031303 { }
13041304
1305- typename Elf_types<size>::Elf_WXword
1305+ Elf_Word
13061306 get_ch_type() const
13071307 { return Convert<size, big_endian>::convert_host(this->p_->ch_type); }
13081308
--- a/elfcpp/elfcpp_internal.h
+++ b/elfcpp/elfcpp_internal.h
@@ -82,11 +82,23 @@ struct Shdr_data
8282 // An ELF compression header.
8383
8484 template<int size>
85-struct Chdr_data
85+struct Chdr_data;
86+
87+template<>
88+struct Chdr_data<32>
89+{
90+ Elf_Word ch_type;
91+ Elf_Word ch_size;
92+ Elf_Word ch_addralign;
93+};
94+
95+template<>
96+struct Chdr_data<64>
8697 {
87- typename Elf_types<size>::Elf_WXword ch_type;
88- typename Elf_types<size>::Elf_WXword ch_size;
89- typename Elf_types<size>::Elf_WXword ch_addralign;
98+ Elf_Word ch_type;
99+ Elf_Word ch_reserved;
100+ Elf_Xword ch_size;
101+ Elf_Xword ch_addralign;
90102 };
91103
92104 // An ELF segment header. We use template specialization for the