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

Unified Diff: src/PNaClTranslator.cpp

Issue 1774383002: PNaCl Dynamic Linking: Force __pnacl_pso_root to be an external declaration. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@fixes
Patch Set: 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
« src/IceGlobalInits.h ('K') | « src/IceGlobalInits.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/PNaClTranslator.cpp
diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp
index 595b2340eb515b1ed3878e3596ebecc26e2bded0..7aca4949724b2b0396959b33b60754db168947b5 100644
--- a/src/PNaClTranslator.cpp
+++ b/src/PNaClTranslator.cpp
@@ -476,6 +476,12 @@ private:
const char *DeclType,
NaClBcIndexSize_t &NameIndex) {
if (Decl->hasName()) {
+ if (Decl->isPNaClABIExternalName()) {
Mark Seaborn 2016/03/09 03:37:15 As I commented on https://codereview.chromium.org/
Sean Klein 2016/03/10 23:45:23 Changed so that setLinkage is only considered for
+ // Force linkage to be external for the PNaCl ABI. PNaCl bitcode has a
+ // linkage field for Functions, but not for GlobalVariables (because the
+ // latter is not needed for pexes, so it has been removed).
+ Decl->setLinkage(llvm::GlobalValue::ExternalLinkage);
Karl 2016/03/09 17:06:50 This code is somewhat fragile. The name was earli
Sean Klein 2016/03/10 23:45:23 Code moved to "ModuleValueSymtabParser::setValueNa
+ }
Translator.checkIfUnnamedNameSafe(Decl->getName(), DeclType, Prefix);
} else {
Decl->setName(Translator.createUnnamedName(Prefix, NameIndex));
« src/IceGlobalInits.h ('K') | « src/IceGlobalInits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698