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

Unified Diff: src/IceELFSection.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceELFObjectWriter.cpp ('k') | src/IceELFSection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceELFSection.h
diff --git a/src/IceELFSection.h b/src/IceELFSection.h
index 28fb6b01aa220aed815561d0ee6bf0c410d35549..c57b8218d4a9ac0c72f7e936afa64bdf936dc901 100644
--- a/src/IceELFSection.h
+++ b/src/IceELFSection.h
@@ -232,7 +232,8 @@ public:
/// Track additional relocations which start out relative to offset 0, but
/// should be adjusted to be relative to BaseOff.
- void addRelocations(RelocOffsetT BaseOff, const FixupRefList &FixupRefs);
+ void addRelocations(RelocOffsetT BaseOff, const FixupRefList &FixupRefs,
+ ELFSymbolTableSection *SymTab);
/// Track a single additional relocation.
void addRelocation(const AssemblerFixup &Fixup) { Fixups.push_back(Fixup); }
@@ -353,9 +354,10 @@ void ELFRelocationSection::writeData(ELFStreamer &Str,
const ELFSym *Symbol;
if (Fixup.isNullSymbol()) {
Symbol = SymTab->getNullSymbol();
+ } else if (Fixup.valueIsSymbol()) {
+ Symbol = Fixup.getSymbolValue();
} else {
- constexpr Assembler *Asm = nullptr;
- const IceString Name = Fixup.symbol(Asm);
+ const IceString Name = Fixup.symbol();
Symbol = SymTab->findSymbol(Name);
if (!Symbol)
llvm::report_fatal_error(Name + ": Missing symbol mentioned in reloc");
« no previous file with comments | « src/IceELFObjectWriter.cpp ('k') | src/IceELFSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698