summaryrefslogtreecommitdiffstats
path: root/build/scripts/rodata2asm.py
diff options
context:
space:
mode:
authoralexv-smirnov <[email protected]>2023-03-28 22:25:04 +0300
committeralexv-smirnov <[email protected]>2023-03-28 22:25:04 +0300
commitb8a17f9b1c166d2e9a26b99348a4c29d972caf55 (patch)
tree1a2d881f1a9452b9c6103dbf69d73da7624e98e5 /build/scripts/rodata2asm.py
parent25659221f18577ea38430a8ec3349836f5626b6a (diff)
Revert ymake build from ydb oss export
Diffstat (limited to 'build/scripts/rodata2asm.py')
-rw-r--r--build/scripts/rodata2asm.py31
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()