1
编译netcat的为MIPS我是新本,我有点与它搞乱:问题在Ubuntu
我试图编译MIPS netcat的源代码,以便在我的路由器部署,是什么我做的是:
下载MIPS工具链:MIPS-Linux的GCC
下载netcat的来源,它扩展到一个文件夹
cd path/to/netcatsource
Execute:
CC=path/to/compiler/mips-linux-gcc ./configure --host=mips-linux
make
make命令工作正常,并tryi在编译netcat的文件显示纳克文件命令:
file netcat
OUTPUT: ELF 32-bit MSB executable, MIPS, MIPS-I version 1 (SYSV), dynamically linked (uses shared libs), not stripped
对我来说,似乎一切都很好,但如果我在我的Ubuntu框中执行./netcat它的工作原理,一旦我把它上传到路由器它显示了以下错误:
# ./netcat
Segmentation fault
这是从我的路由器在/ proc/cpuinfo中:
# cat /proc/cpuinfo
system type : 963281T_TEF
processor : 0
cpu model : Broadcom4350 V7.5
BogoMIPS : 319.48
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : no
hardware watchpoint : no
ASEs implemented :
shadow register sets : 1
core : 0
VCED exceptions : not available
VCEI exceptions : not available
unaligned exceptions : 1395
谁能帮助我? 问候
你有一个'gdb'你的路由器上?如果是这样,尝试调试另一方面,你可以尝试'strace'系统调用实际发生的事情。 – KiaMorot 2013-03-14 14:44:47
嗨@KiaMorot,我没有这些工具。我还安装了busybox-mips以获得更多工具,但不包括在内。 – Nucklear 2013-03-14 14:48:19
然后很难说出发生了什么。你可以尝试一些其他工具链:http://ubuntuforums.org/showthread.php?t=637454 – KiaMorot 2013-03-14 14:55:33