diff options
author | thegeorg <[email protected]> | 2022-08-19 15:00:44 +0300 |
---|---|---|
committer | thegeorg <[email protected]> | 2022-08-19 15:00:44 +0300 |
commit | ad2a1b622d2bf6cf025982846153d9c4c791af2c (patch) | |
tree | 8906addc18a494ece9dff28b2701a37ef4b52bf8 /build/scripts/rodata2asm.py | |
parent | 7b61b052f3baa7e43edca48c373f95b5e5f1c845 (diff) |
Let cmake export determine which build/scripts are mandatory
Diffstat (limited to 'build/scripts/rodata2asm.py')
-rw-r--r-- | build/scripts/rodata2asm.py | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/build/scripts/rodata2asm.py b/build/scripts/rodata2asm.py deleted file mode 100644 index 555639499f2..00000000000 --- a/build/scripts/rodata2asm.py +++ /dev/null @@ -1,31 +0,0 @@ -import os -import argparse - - -def main(): - parser = argparse.ArgumentParser(description='Convert rodata into asm source with embedded file content') - parser.add_argument('symbol', help='symvol name exported from generated filr') - parser.add_argument('rodata', help='input .rodata file path') - parser.add_argument('asm', type=argparse.FileType('w', encoding='UTF-8'), help='destination .asm file path') - parser.add_argument('--elf', action='store_true') - - args = parser.parse_args() - - file_size = os.path.getsize(args.rodata) - - args.asm.write('global ' + args.symbol + '\n') - args.asm.write('global ' + args.symbol + 'Size' + '\n') - args.asm.write('SECTION .rodata ALIGN=16\n') - args.asm.write(args.symbol + ':\nincbin "' + args.rodata + '"\n') - args.asm.write('align 4, db 0\n') - args.asm.write(args.symbol + 'Size:\ndd ' + str(file_size) + '\n') - - if args.elf: - args.asm.write('size ' + args.symbol + ' ' + str(file_size) + '\n') - args.asm.write('size ' + args.symbol + 'Size 4\n') - - args.asm.close() - - -if __name__ == '__main__': - main() |