diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-07-01 13:09:59 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-03 15:31:05 -0700 |
commit | cde6b80d99c6e4fd9eb0b67db929e51f93518b56 (patch) | |
tree | 6cc026a7e5bd5adcec8397f2d347b9249ca9113b /emlink.py | |
parent | f4adccef1ae92a6da54d9c29a84fe64758f76201 (diff) |
warn on undefined global variables after linking
Diffstat (limited to 'emlink.py')
-rw-r--r-- | emlink.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -144,6 +144,14 @@ class AsmModule(): sendings_end = main.post_js.find(' }, buffer);') main.post_js = main.post_js[:sendings_start] + sendings_js + main.post_js[sendings_end:] + # check for undefined references to global variables + def check_import(key, value): + if value.startswith('+') or value.endswith('|0'): # ignore functions + if key not in all_sendings: + print >> sys.stderr, 'external variable %s is still not defined after linking' % key + for key, value in self.imports.iteritems(): check_import(key, value) + for key, value in main.imports.iteritems(): check_import(key, value) + # tables f_bases = {} f_sizes = {} |