aboutsummaryrefslogtreecommitdiff
path: root/emlink.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-06-29 10:28:15 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-07-03 15:31:04 -0700
commitfd7ca56909bf7a8816af5aaab50ccd9d9bf31280 (patch)
treea58903bf80961d90bfe1bbe087be65ed50bf363e /emlink.py
parent7596d284a0fd54be6ed9661d377dd7903a27f072 (diff)
finish function table merging and enable testing
Diffstat (limited to 'emlink.py')
-rw-r--r--emlink.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/emlink.py b/emlink.py
index de06e9d4..b73a24a6 100644
--- a/emlink.py
+++ b/emlink.py
@@ -45,6 +45,8 @@ print 'Main module:', main
print 'Side module:', side
print 'Output:', out
+shared.try_delete(out)
+
class AsmModule():
def __init__(self, filename):
self.filename = filename
@@ -165,6 +167,7 @@ class AsmModule():
def update_fts(what):
def fix(m):
table = 'FUNCTION_TABLE_' + m.group(1)
+ if table not in f_sizes: return m.group(0) # table was not modified
contents = m.group(2)
assert '[' not in contents # TODO handle nesting
return '%s[%s&%d]' % (table, contents, f_sizes[table]-1)