| 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 /// \file | 10 /// \file |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 /// This is used as an array index so should start at 0 and be contiguous. | 90 /// This is used as an array index so should start at 0 and be contiguous. |
| 91 enum SectionType { ROData = 0, Data, BSS, NumSectionTypes }; | 91 enum SectionType { ROData = 0, Data, BSS, NumSectionTypes }; |
| 92 | 92 |
| 93 private: | 93 private: |
| 94 GlobalContext &Ctx; | 94 GlobalContext &Ctx; |
| 95 ELFStreamer &Str; | 95 ELFStreamer &Str; |
| 96 bool SectionNumbersAssigned = false; | 96 bool SectionNumbersAssigned = false; |
| 97 bool ELF64; | 97 bool ELF64; |
| 98 | 98 |
| 99 // All created sections, separated into different pools. | 99 // All created sections, separated into different pools. |
| 100 typedef std::vector<ELFSection *> SectionList; | 100 using SectionList = std::vector<ELFSection *>; |
| 101 typedef std::vector<ELFTextSection *> TextSectionList; | 101 using TextSectionList = std::vector<ELFTextSection *>; |
| 102 typedef std::vector<ELFDataSection *> DataSectionList; | 102 using DataSectionList = std::vector<ELFDataSection *>; |
| 103 typedef std::vector<ELFRelocationSection *> RelSectionList; | 103 using RelSectionList = std::vector<ELFRelocationSection *>; |
| 104 TextSectionList TextSections; | 104 TextSectionList TextSections; |
| 105 RelSectionList RelTextSections; | 105 RelSectionList RelTextSections; |
| 106 DataSectionList DataSections; | 106 DataSectionList DataSections; |
| 107 RelSectionList RelDataSections; | 107 RelSectionList RelDataSections; |
| 108 DataSectionList RODataSections; | 108 DataSectionList RODataSections; |
| 109 RelSectionList RelRODataSections; | 109 RelSectionList RelRODataSections; |
| 110 DataSectionList BSSSections; | 110 DataSectionList BSSSections; |
| 111 | 111 |
| 112 // Handles to special sections that need incremental bookkeeping. | 112 // Handles to special sections that need incremental bookkeeping. |
| 113 ELFSection *NullSection; | 113 ELFSection *NullSection; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 /// Write the ELF file header with the given information about sections. | 165 /// Write the ELF file header with the given information about sections. |
| 166 template <bool IsELF64> | 166 template <bool IsELF64> |
| 167 void writeELFHeaderInternal(Elf64_Off SectionHeaderOffset, | 167 void writeELFHeaderInternal(Elf64_Off SectionHeaderOffset, |
| 168 SizeT SectHeaderStrIndex, SizeT NumSections); | 168 SizeT SectHeaderStrIndex, SizeT NumSections); |
| 169 }; | 169 }; |
| 170 | 170 |
| 171 } // end of namespace Ice | 171 } // end of namespace Ice |
| 172 | 172 |
| 173 #endif // SUBZERO_SRC_ICEELFOBJECTWRITER_H | 173 #endif // SUBZERO_SRC_ICEELFOBJECTWRITER_H |
| OLD | NEW |