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

Side by Side Diff: src/IceELFObjectWriter.h

Issue 952953002: Subzero: Improve class definition hygiene. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix typo Created 5 years, 9 months 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/IceConverter.cpp ('k') | src/IceELFSection.h » ('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 // 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 30 matching lines...) Expand all
41 // without -fdata-sections is so that variables that belong to each possible 41 // without -fdata-sections is so that variables that belong to each possible
42 // SectionType are contiguous in the file. With -fdata-sections, each global 42 // SectionType are contiguous in the file. With -fdata-sections, each global
43 // variable is in a separate section and therefore the sections will be 43 // variable is in a separate section and therefore the sections will be
44 // trivially contiguous. 44 // trivially contiguous.
45 // 45 //
46 // The motivation for requiring that writeFunctionCode happen after 46 // The motivation for requiring that writeFunctionCode happen after
47 // writeDataSection: to keep the .text and .data sections contiguous in the 47 // writeDataSection: to keep the .text and .data sections contiguous in the
48 // file. Having both -fdata-sections and -ffunction-sections does allow 48 // file. Having both -fdata-sections and -ffunction-sections does allow
49 // relaxing this requirement. 49 // relaxing this requirement.
50 class ELFObjectWriter { 50 class ELFObjectWriter {
51 ELFObjectWriter() = delete;
51 ELFObjectWriter(const ELFObjectWriter &) = delete; 52 ELFObjectWriter(const ELFObjectWriter &) = delete;
52 ELFObjectWriter &operator=(const ELFObjectWriter &) = delete; 53 ELFObjectWriter &operator=(const ELFObjectWriter &) = delete;
53 54
54 public: 55 public:
55 ELFObjectWriter(GlobalContext &Ctx, ELFStreamer &Out); 56 ELFObjectWriter(GlobalContext &Ctx, ELFStreamer &Out);
56 57
57 // Write the initial ELF header. This is just to reserve space in the ELF 58 // Write the initial ELF header. This is just to reserve space in the ELF
58 // file. Reserving space allows the other functions to write text 59 // file. Reserving space allows the other functions to write text
59 // and data directly to the file and get the right file offsets. 60 // and data directly to the file and get the right file offsets.
60 void writeInitialELFHeader(); 61 void writeInitialELFHeader();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 160
160 // Write the ELF file header with the given information about sections. 161 // Write the ELF file header with the given information about sections.
161 template <bool IsELF64> 162 template <bool IsELF64>
162 void writeELFHeaderInternal(Elf64_Off SectionHeaderOffset, 163 void writeELFHeaderInternal(Elf64_Off SectionHeaderOffset,
163 SizeT SectHeaderStrIndex, SizeT NumSections); 164 SizeT SectHeaderStrIndex, SizeT NumSections);
164 }; 165 };
165 166
166 } // end of namespace Ice 167 } // end of namespace Ice
167 168
168 #endif // SUBZERO_SRC_ICEELFOBJECTWRITER_H 169 #endif // SUBZERO_SRC_ICEELFOBJECTWRITER_H
OLDNEW
« no previous file with comments | « src/IceConverter.cpp ('k') | src/IceELFSection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698