aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-06-28 20:47:42 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-06-28 20:47:42 -0700
commitd476e649c3fa794c88a4d30a58ac4bd33848fe92 (patch)
tree3e7b5d6d19de19fefff87ffb9783864c916c6d53
parent8f008c81e3e26ccdddbe0948ef09b22190259944 (diff)
do not include externals in BSS
-rw-r--r--src/parseTools.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index babb2692..6bc0b7ea 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -472,10 +472,11 @@ function isBSS(item) {
return false;
}
+ if (item.external) return false; // externals are typically implemented in a JS library, and must be accessed by name, explicitly
+
// return true if a global is uninitialized or initialized to 0
- return item.external ||
- (item.value && item.value.intertype === 'emptystruct') ||
- (item.value && item.value.value !== undefined && item.value.value === '0');
+ return (item.value && item.value.intertype === 'emptystruct') ||
+ (item.value && item.value.value !== undefined && item.value.value === '0');
}
function makeGlobalDef(ident) {