diff options
author | Jez Ng <me@jezng.com> | 2013-07-11 19:34:01 -0700 |
---|---|---|
committer | Jez Ng <me@jezng.com> | 2013-07-11 20:37:58 -0700 |
commit | 470b7da45616f7c72794cf3ced71f21db2ebdc2c (patch) | |
tree | 66ea2d5aea7699a4b444e093ed666fc0b9ff71aa /emscripten.py | |
parent | c1e1d87bc3b9e249795543e44a1224c2f03154ce (diff) |
Filter out unnamed_addr globals from symbol table.
Diffstat (limited to 'emscripten.py')
-rwxr-xr-x | emscripten.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/emscripten.py b/emscripten.py index 921ab879..30c7a5ae 100755 --- a/emscripten.py +++ b/emscripten.py @@ -622,9 +622,11 @@ Runtime.stackRestore = function(top) { asm['stackRestore'](top) }; # Create symbol table for self-dlopen if settings.get('LINKABLE'): - GLOBAL_BASE = forwarded_json['Runtime']['GLOBAL_BASE'] - symbol_table = {k:v+8 for k,v in forwarded_json['Variables']['indexedGlobals'].iteritems()} + symbol_table = {k:v+forwarded_json['Runtime']['GLOBAL_BASE'] + for k,v in forwarded_json['Variables']['indexedGlobals'].iteritems() + if forwarded_json['Variables']['globals'][k]['named']} for raw in last_forwarded_json['Functions']['tables'].itervalues(): + if raw == '': continue table = raw[raw.find('[')+1:raw.find(']')].split(",") symbol_table.update(map(lambda x: (x[1], x[0]), filter(lambda x: x[1] != '0', enumerate(table)))) |