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

Unified Diff: src/IceTranslator.cpp

Issue 678533005: Subzero: Add basic ELFObjectWriter (text section, symtab, strtab, headers) (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: stuff Created 6 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 side-by-side diff with in-line comments
Download patch
Index: src/IceTranslator.cpp
diff --git a/src/IceTranslator.cpp b/src/IceTranslator.cpp
index 954da474018d51d3cac732fb5af66432f9b05430..9e92594265846b37f2e47588e1e69b43fc27d5f9 100644
--- a/src/IceTranslator.cpp
+++ b/src/IceTranslator.cpp
@@ -97,8 +97,13 @@ void Translator::translateFcn(Cfg *Fcn) {
}
void Translator::emitConstants() {
- if (!Ctx->getFlags().DisableTranslation && Func)
- Func->getTarget()->emitConstants();
+ if (!Ctx->getFlags().DisableTranslation && Func) {
+ if (!Ctx->getFlags().UseELFWriter) {
Jim Stichnoth 2014/11/21 21:32:22 Instead of "if (!C) A; else B;", how about "if (C)
jvoung (off chromium) 2014/11/24 21:35:46 Done.
+ Func->getTarget()->emitConstants();
+ } else {
+ // TODO(jvoung): create the rodata.cst.{4,8} sections for UseELFWriter.
+ }
+ }
}
void Translator::lowerGlobals(

Powered by Google App Engine
This is Rietveld 408576698