diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-06-01 21:42:23 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-06-01 21:42:23 +0100 |
commit | 60ca6e1b77f3e3e476250bded132c2a59103d4af (patch) | |
tree | 7e136c07cce9b5d81eccc025ffabf7872589a3ec /tools | |
parent | a21c6c696c96039a072d72d427b1692834d4765f (diff) | |
download | gold-mine-run-60ca6e1b77f3e3e476250bded132c2a59103d4af.tar.gz gold-mine-run-60ca6e1b77f3e3e476250bded132c2a59103d4af.zip |
Filter out any unwanted symbol
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/pngpal.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/pngpal.py b/tools/pngpal.py index 7db451d..195fc91 100755 --- a/tools/pngpal.py +++ b/tools/pngpal.py @@ -8,6 +8,7 @@ from PIL import Image __version__ = "1.0" ld = os.environ.get("LD", "i586-pc-msdosdjgpp-ld") +strip = os.environ.get("STRIP", "i586-pc-msdosdjgpp-strip") def main(): @@ -40,6 +41,8 @@ def main(): with open(tmp, "wb") as fd: fd.write(bytearray(palette)) fd.flush() + + # create an object file from the binary rc = subprocess.call( [ ld, @@ -55,6 +58,11 @@ def main(): if rc != 0: parser.error("Failed to run %s" % ld) + # strip unwanted symbols + rc = subprocess.call([strip, "-w", "-K", "*_%s_*" % tmp, args.output]) + if rc != 0: + parser.error("Failed to run %s" % ld) + if __name__ == "__main__": main() |