diff options
author | Juan J. Martinez <jjm@usebox.net> | 2021-11-02 09:47:14 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2021-11-02 09:47:14 +0000 |
commit | 4e7f4cac4bc088d8bccea146a5547de1fde453ec (patch) | |
tree | 4d6529748a4116d095ecfa018ef4a0afb3a05ad7 /tools/chksize | |
parent | 2156710d5dc7b27e5590a05833a8d7d6b4ec5520 (diff) | |
download | ubox-msx-lib-4e7f4cac4bc088d8bccea146a5547de1fde453ec.tar.gz ubox-msx-lib-4e7f4cac4bc088d8bccea146a5547de1fde453ec.zip |
Accurate sizes
This include the init code itself (GSINIT and GSFINAL sections), besides
the size of the initialized data.
Diffstat (limited to 'tools/chksize')
-rwxr-xr-x | tools/chksize | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/chksize b/tools/chksize index 0be40b4..8b88560 100755 --- a/tools/chksize +++ b/tools/chksize @@ -8,7 +8,8 @@ def main(): sys.exit("usage: %s code_limit_hex data_limit_hex filename.map" % sys.argv[0]) - sizes = {"CODE": 0, "DATA": 0, "INITIALIZED": 0} + sizes = {"CODE": 0, "DATA": 0, + "INITIALIZER": 0, "GSINIT": 0, "GSFINAL": 0} with open(sys.argv[3], "r") as fd: for line in fd.readlines(): @@ -16,10 +17,11 @@ def main(): if "l__%s" % seg in line: sizes[seg] = int(line.split()[0], base=16) - sizes["ROM"] = sizes["CODE"] + sizes["INITIALIZED"] + sizes["INIT"] = sizes["INITIALIZER"] + sizes["GSINIT"] + sizes["GSFINAL"] + sizes["ROM"] = sizes["CODE"] + sizes["INIT"] print("\nROM: CODE %(CODE)05d bytes\n" - " INIT %(INITIALIZED)05d bytes\n" + " INIT %(INIT)05d bytes\n" " Total %(ROM)05d bytes\n" "RAM: %(DATA)05d bytes\n" % sizes) |