【发布时间】:2015-08-01 14:16:38
【问题描述】:
基本上我有这个盒子:
# cat proc/cpuinfo
system type : RTL8672
processor : 0
cpu model : 56322
BogoMIPS : 619.31
tlb_entries : 64
mips16 implemented : yes
cat proc/version
Linux version 2.6.30.9 (xia@njzd) (gcc version 4.4.6 (Realtek RSDK-1.5.6p2) ) #2 Wed Apr 29 18:57:54 CST 2015
这是程序在盒子上的样子
$ readelf -a httpd
ELF Header:
Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, big endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: MIPS R3000
Version: 0x1
Entry point address: 0x4a1330
Start of program headers: 52 (bytes into file)
Start of section headers: 816092 (bytes into file)
Flags: 0x1007, noreorder, pic, cpic, o32, mips1
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 8
Size of section headers: 40 (bytes)
Number of section headers: 24
Section header string table index: 23
这是我的交叉编译后的
$ readelf -a File2
ELF Header:
Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, big endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: MIPS R3000
Version: 0x1
Entry point address: 0x400280
Start of program headers: 52 (bytes into file)
Start of section headers: 651896 (bytes into file)
Flags: 0x1007, noreorder, pic, cpic, o32, mips1
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 6
Size of section headers: 40 (bytes)
Number of section headers: 33
Section header string table index: 30
但是当我运行 File2 时,我仍然得到 illegal instruction,我怀疑使用 BLA 指令的交叉编译器和我的盒子不支持那个,我怎么能告诉我的 mips 交叉编译来替换BLA 有其他指令吗? In this 邮件列表他们谈论JAL/JALR 到BAL Linux (o32 ABI) 的转换,有什么提示吗?
【问题讨论】:
-
Duplicate with unix.stackexchange.com/questions/220894/… -- 您是否试图破解中兴 H298N 家庭网关?我在这个模型的同一点上卡住了:大多数外来可执行文件上的非法指令,即使手动调用动态加载程序
/lib/libdl.so.X。我已经尝试了针对 MIPSv1 MSB 32 位编译的 MIPS 的 debian 挤压和在线找到的 Huhawei HG526 的自定义固件:同样的问题。显然我手头也没有gdb,也无法交叉编译它。 -
我的是中兴ZXV10 H201L和V2同款设备
标签: compiler-construction cross-platform mips