Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Side by Side Diff: src/IceELFObjectWriter.h

Issue 2471883005: [SubZero] Generate MIPS.abiflags section (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addressed review comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceCompiler.cpp ('k') | src/IceELFObjectWriter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void setUndefinedSyms(const ConstantList &UndefSyms); 86 void setUndefinedSyms(const ConstantList &UndefSyms);
87 87
88 /// Do final layout and write out the rest of the object file. Finally, patch 88 /// Do final layout and write out the rest of the object file. Finally, patch
89 /// up the initial ELF header with the final info. 89 /// up the initial ELF header with the final info.
90 void writeNonUserSections(); 90 void writeNonUserSections();
91 91
92 /// Which type of ELF section a global variable initializer belongs to. This 92 /// Which type of ELF section a global variable initializer belongs to. This
93 /// is used as an array index so should start at 0 and be contiguous. 93 /// is used as an array index so should start at 0 and be contiguous.
94 enum SectionType { ROData = 0, Data, BSS, NumSectionTypes }; 94 enum SectionType { ROData = 0, Data, BSS, NumSectionTypes };
95 95
96 /// Create target specific section with the given information about section.
97 void writeTargetRODataSection(const std::string &Name, Elf64_Word ShType,
98 Elf64_Xword ShFlags, Elf64_Xword ShAddralign,
99 Elf64_Xword ShEntsize,
100 const llvm::StringRef &SecData);
101
96 private: 102 private:
97 GlobalContext &Ctx; 103 GlobalContext &Ctx;
98 ELFStreamer &Str; 104 ELFStreamer &Str;
99 bool SectionNumbersAssigned = false; 105 bool SectionNumbersAssigned = false;
100 bool ELF64; 106 bool ELF64;
101 107
102 // All created sections, separated into different pools. 108 // All created sections, separated into different pools.
103 using SectionList = std::vector<ELFSection *>; 109 using SectionList = std::vector<ELFSection *>;
104 using TextSectionList = std::vector<ELFTextSection *>; 110 using TextSectionList = std::vector<ELFTextSection *>;
105 using DataSectionList = std::vector<ELFDataSection *>; 111 using DataSectionList = std::vector<ELFDataSection *>;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 173
168 /// Write the ELF file header with the given information about sections. 174 /// Write the ELF file header with the given information about sections.
169 template <bool IsELF64> 175 template <bool IsELF64>
170 void writeELFHeaderInternal(Elf64_Off SectionHeaderOffset, 176 void writeELFHeaderInternal(Elf64_Off SectionHeaderOffset,
171 SizeT SectHeaderStrIndex, SizeT NumSections); 177 SizeT SectHeaderStrIndex, SizeT NumSections);
172 }; 178 };
173 179
174 } // end of namespace Ice 180 } // end of namespace Ice
175 181
176 #endif // SUBZERO_SRC_ICEELFOBJECTWRITER_H 182 #endif // SUBZERO_SRC_ICEELFOBJECTWRITER_H
OLDNEW
« no previous file with comments | « src/IceCompiler.cpp ('k') | src/IceELFObjectWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698