OLD | NEW |
1 //===- subzero/src/IceELFObjectWriter.h - ELF object writer -----*- C++ -*-===// | 1 //===- subzero/src/IceELFObjectWriter.h - ELF object writer -----*- C++ -*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // Abstraction for a writer that is responsible for writing an ELF file. | 10 // Abstraction for a writer that is responsible for writing an ELF file. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // Finally, patch up the initial ELF header with the final info. | 82 // Finally, patch up the initial ELF header with the final info. |
83 void writeNonUserSections(); | 83 void writeNonUserSections(); |
84 | 84 |
85 // Which type of ELF section a global variable initializer belongs to. | 85 // Which type of ELF section a global variable initializer belongs to. |
86 // This is used as an array index so should start at 0 and be contiguous. | 86 // This is used as an array index so should start at 0 and be contiguous. |
87 enum SectionType { ROData = 0, Data, BSS, NumSectionTypes }; | 87 enum SectionType { ROData = 0, Data, BSS, NumSectionTypes }; |
88 | 88 |
89 private: | 89 private: |
90 GlobalContext &Ctx; | 90 GlobalContext &Ctx; |
91 ELFStreamer &Str; | 91 ELFStreamer &Str; |
92 bool SectionNumbersAssigned; | 92 bool SectionNumbersAssigned = false; |
93 bool ELF64; | 93 bool ELF64; |
94 | 94 |
95 // All created sections, separated into different pools. | 95 // All created sections, separated into different pools. |
96 typedef std::vector<ELFSection *> SectionList; | 96 typedef std::vector<ELFSection *> SectionList; |
97 typedef std::vector<ELFTextSection *> TextSectionList; | 97 typedef std::vector<ELFTextSection *> TextSectionList; |
98 typedef std::vector<ELFDataSection *> DataSectionList; | 98 typedef std::vector<ELFDataSection *> DataSectionList; |
99 typedef std::vector<ELFRelocationSection *> RelSectionList; | 99 typedef std::vector<ELFRelocationSection *> RelSectionList; |
100 TextSectionList TextSections; | 100 TextSectionList TextSections; |
101 RelSectionList RelTextSections; | 101 RelSectionList RelTextSections; |
102 DataSectionList DataSections; | 102 DataSectionList DataSections; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 159 |
160 // Write the ELF file header with the given information about sections. | 160 // Write the ELF file header with the given information about sections. |
161 template <bool IsELF64> | 161 template <bool IsELF64> |
162 void writeELFHeaderInternal(Elf64_Off SectionHeaderOffset, | 162 void writeELFHeaderInternal(Elf64_Off SectionHeaderOffset, |
163 SizeT SectHeaderStrIndex, SizeT NumSections); | 163 SizeT SectHeaderStrIndex, SizeT NumSections); |
164 }; | 164 }; |
165 | 165 |
166 } // end of namespace Ice | 166 } // end of namespace Ice |
167 | 167 |
168 #endif // SUBZERO_SRC_ICEELFOBJECTWRITER_H | 168 #endif // SUBZERO_SRC_ICEELFOBJECTWRITER_H |
OLD | NEW |