summaryrefslogtreecommitdiff
path: root/emlink.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-11-15 08:14:08 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-11-15 08:14:08 -0800
commitdca9531043a4d6be43f63854eb27242bbdfe6d63 (patch)
treebc372877c430f28a7c2133fd6d3883532da5fb14 /emlink.py
parent0120a147fc15bd0247d37e2862bfda2fb242d73b (diff)
parentbeed9b6e8d3c149483127f4bf8329856b42985f6 (diff)
Merge pull request #1814 from juj/fix_test_static_link
Fix test static link
Diffstat (limited to 'emlink.py')
-rw-r--r--emlink.py29
1 files changed, 16 insertions, 13 deletions
diff --git a/emlink.py b/emlink.py
index 7311f84a..f767ce58 100644
--- a/emlink.py
+++ b/emlink.py
@@ -10,21 +10,24 @@ import sys
from tools import shared
from tools.asm_module import AsmModule
-try:
- me, main, side, out = sys.argv[:4]
-except:
- print >> sys.stderr, 'usage: emlink.py [main module] [side module] [output name]'
- sys.exit(1)
+def run():
+ try:
+ me, main, side, out = sys.argv[:4]
+ except:
+ print >> sys.stderr, 'usage: emlink.py [main module] [side module] [output name]'
+ sys.exit(1)
-print 'Main module:', main
-print 'Side module:', side
-print 'Output:', out
+ print 'Main module:', main
+ print 'Side module:', side
+ print 'Output:', out
-shared.try_delete(out)
+ shared.try_delete(out)
-main = AsmModule(main)
-side = AsmModule(side)
+ main = AsmModule(main)
+ side = AsmModule(side)
-side.relocate_into(main)
-main.write(out)
+ side.relocate_into(main)
+ main.write(out)
+if __name__ == '__main__':
+ run()