Index: src/IceFixups.cpp |
diff --git a/src/IceFixups.cpp b/src/IceFixups.cpp |
index 05559c56fe8462ccc877be426dd4bf3bfa1ccf12..b6adf8450282032cc94fab514f43139f6f4939b5 100644 |
--- a/src/IceFixups.cpp |
+++ b/src/IceFixups.cpp |
@@ -46,13 +46,15 @@ IceString AssemblerFixup::symbol(const GlobalContext *Ctx) const { |
return Str.str(); |
} |
-void AssemblerFixup::emit(GlobalContext *Ctx) const { |
+void AssemblerFixup::emit(GlobalContext *Ctx, RelocOffsetT BaseOffset) const { |
+ if (!ALLOW_DUMP) |
+ return; |
Ostream &Str = Ctx->getStrEmit(); |
- // TODO(jvoung): Not yet clear how to emit a relocation against |
- // the null symbol. |
- assert(!isNullSymbol()); |
- Str << symbol(Ctx); |
- RelocOffsetT Offset = offset(); |
+ if (isNullSymbol()) |
+ Str << "__Sz_AbsoluteZero"; |
+ else |
+ Str << symbol(Ctx); |
+ RelocOffsetT Offset = offset() + BaseOffset; |
if (Offset) |
Str << " + " << Offset; |
} |