diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-11-15 08:14:08 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-11-15 08:14:08 -0800 |
commit | dca9531043a4d6be43f63854eb27242bbdfe6d63 (patch) | |
tree | bc372877c430f28a7c2133fd6d3883532da5fb14 /emlink.py | |
parent | 0120a147fc15bd0247d37e2862bfda2fb242d73b (diff) | |
parent | beed9b6e8d3c149483127f4bf8329856b42985f6 (diff) |
Merge pull request #1814 from juj/fix_test_static_link
Fix test static link
Diffstat (limited to 'emlink.py')
-rw-r--r-- | emlink.py | 29 |
1 files changed, 16 insertions, 13 deletions
@@ -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() |