我终于成功地从这个站点安装了一个交叉工具链,以便在我的 x86-64 上运行和调试 mips elf。我只有精灵文件。我可以拆卸它,但是当我尝试使用以下命令运行它时:
mipsel-none-elf-run myelf
我收到以下错误:
mips-core: 4 byte read to unmapped address 0x400670 at 0x400670
program stopped with signal 10 (User defined signal 1).
(地址 0x400670 指向主函数的第一条指令。
指定工具的字节序会给我同样的错误。
我试图运行它
mipsel-none-elf-gdb myelf
GNU gdb (GDB) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=mipsel-none-elf".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB. Attempting to continue with the default mips:3000 settings.
Reading symbols from /home/ashkan/Crack/crackme200...(no debugging symbols found)...done.
(gdb) target sim
Connected to the simulator.
(gdb) load
Loading section .interp, size 0xd vma 0x400154
Loading section .note.ABI-tag, size 0x20 vma 0x400164
Loading section .reginfo, size 0x18 vma 0x400184
Loading section .note.gnu.build-id, size 0x24 vma 0x40019c
Loading section .dynamic, size 0xd8 vma 0x4001c0
Loading section .hash, size 0xa4 vma 0x400298
Loading section .dynsym, size 0x160 vma 0x40033c
Loading section .dynstr, size 0xdf vma 0x40049c
Loading section .gnu.version, size 0x2c vma 0x40057c
Loading section .gnu.version_r, size 0x30 vma 0x4005a8
Loading section .init, size 0x90 vma 0x4005d8
Loading section .text, size 0x490 vma 0x400670
Loading section .MIPS.stubs, size 0xa0 vma 0x400b00
Loading section .fini, size 0x4c vma 0x400ba0
Loading section .rodata, size 0x40 vma 0x400bec
Loading section .eh_frame, size 0x4 vma 0x400c2c
Loading section .ctors, size 0xc vma 0x410c30
Loading section .dtors, size 0x8 vma 0x410c3c
Loading section .jcr, size 0x4 vma 0x410c44
Loading section .data, size 0x1b0 vma 0x410c50
Loading section .rld_map, size 0x4 vma 0x410e00
Loading section .got, size 0x5c vma 0x410e10
Loading section .sdata, size 0x4 vma 0x410e6c
---Type <return> to continue, or q <return> to quit---
Start address 0x400670
Transfer rate: 26592 bits in <1 sec.
我使用目标 sim 和 load 来配置 gdb。但是当我想运行程序时。我得到:
(gdb) r 启动程序:/home/ashkan/Crack/crackme200 mips-core: 4 字节读取未映射地址 0x400670 at 0x400670
程序收到信号 SIGBUS,总线错误。0x00400670 在 ?? () (gdb)