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

Side by Side Diff: src/IceELFObjectWriter.cpp

Issue 1773503003: Subzero: Control memory growth from local label fixups. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Attempt to fix -nonsfi -filetype=iasm -target=arm32 Created 4 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/IceAssemblerARM32.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.cpp - ELF object file writer --------===// 1 //===- subzero/src/IceELFObjectWriter.cpp - ELF object file writer --------===//
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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // object writer's memory, for writing later. 260 // object writer's memory, for writing later.
261 const auto &Fixups = Asm->fixups(); 261 const auto &Fixups = Asm->fixups();
262 if (!Fixups.empty()) { 262 if (!Fixups.empty()) {
263 if (!RelSection->isRela()) { 263 if (!RelSection->isRela()) {
264 // This is a non-rela section, so we need to update the instruction stream 264 // This is a non-rela section, so we need to update the instruction stream
265 // with the relocation addends. 265 // with the relocation addends.
266 for (const auto *Fixup : Fixups) { 266 for (const auto *Fixup : Fixups) {
267 Fixup->emitOffset(Asm); 267 Fixup->emitOffset(Asm);
268 } 268 }
269 } 269 }
270 RelSection->addRelocations(OffsetInSection, Asm->fixups()); 270 RelSection->addRelocations(OffsetInSection, Asm->fixups(), SymTab);
271 } 271 }
272 Section->appendData(Str, Asm->getBufferView()); 272 Section->appendData(Str, Asm->getBufferView());
273 } 273 }
274 274
275 namespace { 275 namespace {
276 276
277 ELFObjectWriter::SectionType 277 ELFObjectWriter::SectionType
278 classifyGlobalSection(const VariableDeclaration *Var) { 278 classifyGlobalSection(const VariableDeclaration *Var) {
279 if (Var->getIsConstant()) 279 if (Var->getIsConstant())
280 return ELFObjectWriter::ROData; 280 return ELFObjectWriter::ROData;
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 if (ELF64) { 684 if (ELF64) {
685 writeELFHeaderInternal<true>(ShOffset, ShStrTab->getNumber(), 685 writeELFHeaderInternal<true>(ShOffset, ShStrTab->getNumber(),
686 AllSections.size()); 686 AllSections.size());
687 } else { 687 } else {
688 writeELFHeaderInternal<false>(ShOffset, ShStrTab->getNumber(), 688 writeELFHeaderInternal<false>(ShOffset, ShStrTab->getNumber(),
689 AllSections.size()); 689 AllSections.size());
690 } 690 }
691 } 691 }
692 692
693 } // end of namespace Ice 693 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | src/IceELFSection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698