Update util script.
@@ -17,9 +17,14 @@ if __name__ == "__main__":
print('objfind.py <sort key (text, bss or data)>')
sys.exit(1)
+ if len(sys.argv) == 3:
+ cwd = sys.argv[2]
+ else:
+ cwd = '.'
+
objfiles = []
sortkey = sys.argv[1]
- for root, dirs, files in os.walk("."):
+ for root, dirs, files in os.walk(cwd):
for file in files:
if file.endswith(".o"):
objfiles.append({'path':os.path.join(root, file)})
