Remove extension in cmd

Remove extension in command line so the script could work on Linux
pull/4665/head
Yuguo Zou 2017-08-24 11:26:40 +08:00
parent c530be0eeb
commit a0064ae47c
1 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ def parse_load_segment_armcc(image_elf):
(offset, addr, size) = (0, 0, 0) (offset, addr, size) = (0, 0, 0)
segment_list = [] segment_list = []
in_segment = False in_segment = False
cmd = 'fromelf.exe --text -v --only=none ' + image_elf cmd = 'fromelf --text -v --only=none ' + image_elf
for line in subprocess.check_output(cmd, shell=True, universal_newlines=True).split("\n"): for line in subprocess.check_output(cmd, shell=True, universal_newlines=True).split("\n"):
if line == "": if line == "":
pass pass
@ -201,7 +201,7 @@ def parse_load_segment_iar(image_elf):
segment_list = [] segment_list = []
in_segment = False in_segment = False
cmd = 'ielfdumparm.exe ' + image_elf cmd = 'ielfdumparm ' + image_elf
for line in subprocess.check_output(cmd, shell=True, universal_newlines=True).split("\n"): for line in subprocess.check_output(cmd, shell=True, universal_newlines=True).split("\n"):
if line.startswith(" SEGMENTS:"): if line.startswith(" SEGMENTS:"):
in_segment = True in_segment = True