I write them into case.c, and compile with cammand:
gcc case.c -g -pie -o case
Here is the execute file info:
:~/retrowrite$ file case
case: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=b912de4ace5d75a39fec09e0d6a7c9e917510d0f, for GNU/Linux 3.2.0, with debug_info, not stripped
Output from retrowrite:
~/retrowrite$ ./retrowrite --asan case case.s
Rewriting case into case.s
IDENTIFIED IMPORTS
{'name': 'frame_dummy', 'cache': [], 'start': 4416, 'sz': 0, 'bytes': b'', 'bbstarts': {4416}, 'bind': 'STB_LOCAL', 'except_table': None, 'cfi_map': None, 'nexts': defaultdict(<class 'list'>, {}), 'analysis': defaultdict(<function Function.init.. at 0x7ffff5ec3c10>, {}), 'instrumented': False, 'is_mangled': False, '_true_name': None}
.init_array frame_dummy pointer removed.
Traceback (most recent call last):
File "./retrowrite", line 307, in
loader.load_relocations(reloc_list)
File "/home/wen/retrowrite/librw_x64/loader.py", line 147, in load_relocations
debug("[*] Relocations for a section that's not loaded:" + str(reloc_section))
NameError: name 'debug' is not defined
Dear developers,
Could someone tell me if I misuse the retro-write to cause this issue or any other problem? Thank you for your help!
Platform: Ubuntu 20.04, x86_64. gcc version: 9.4.0
source code:
include
void main(){ printf("hello\n"); }
I write them into case.c, and compile with cammand: gcc case.c -g -pie -o case
Here is the execute file info: :~/retrowrite$ file case case: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=b912de4ace5d75a39fec09e0d6a7c9e917510d0f, for GNU/Linux 3.2.0, with debug_info, not stripped
Output from retrowrite: ~/retrowrite$ ./retrowrite --asan case case.s Rewriting case into case.s IDENTIFIED IMPORTS {'name': 'frame_dummy', 'cache': [], 'start': 4416, 'sz': 0, 'bytes': b'', 'bbstarts': {4416}, 'bind': 'STB_LOCAL', 'except_table': None, 'cfi_map': None, 'nexts': defaultdict(<class 'list'>, {}), 'analysis': defaultdict(<function Function.init.. at 0x7ffff5ec3c10>, {}), 'instrumented': False, 'is_mangled': False, '_true_name': None}
.init_array frame_dummy pointer removed.
Traceback (most recent call last):
File "./retrowrite", line 307, in
loader.load_relocations(reloc_list)
File "/home/wen/retrowrite/librw_x64/loader.py", line 147, in load_relocations
debug("[*] Relocations for a section that's not loaded:" + str(reloc_section))
NameError: name 'debug' is not defined