mips linux 编译器,linux - MIPS的交叉编译器似乎无法创建有效的程序 - 堆栈内存溢出...
我已經(jīng)使用buildroot設(shè)置了一個(gè)交叉編譯器。
目標(biāo)設(shè)備正在運(yùn)行Linux,并且具有MIPS處理器(這是Dreambox dm500hd)。
Buildroot配置(僅更改的內(nèi)容):
目標(biāo)配置
體系結(jié)構(gòu):MIPS(小端)
體系結(jié)構(gòu)變體:通用MIPS32
工具鏈配置
[*]啟用C ++支持
[*]啟用編譯器鏈接時(shí)間優(yōu)化支持
我遵循了設(shè)置過程,并且buildroot使編譯器成功(mips-linux-gcc和g ++)。
Hello World文件(test-mips.cpp)
#include
using namespace std;
int main() {
cout << "hello world";
return 0;
}
我可以編譯Hello World,但是在目標(biāo)設(shè)備上運(yùn)行它時(shí)會(huì)引發(fā)錯(cuò)誤:
dm500hd:~$ ./test-mips
./test-mips: line 1: EL@4?�P4: not found
./test-mips: line 1: syntax error: unexpected word (expecting ")")
僅當(dāng)我為little-endian構(gòu)建編譯器時(shí),才會(huì)出現(xiàn)奇怪的字符:使用big-endian編譯的程序的錯(cuò)誤是相同的,但使用空格而不是? .。
我嘗試了小字節(jié)序和大字節(jié)序,但問題是相同的。 那么在配置buildroot時(shí)我做錯(cuò)了什么嗎?
注意 : cat /proc/cpuinfo游戲給我這個(gè)結(jié)果。 我應(yīng)該更改架構(gòu)變體嗎?
system type : BCM7413B1 STB platform
processor : 0
cpu model : Brcm4380 V4.4 FPU V0.1
BogoMIPS : 403.45
cpu MHz : 405.010
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : no
ASEs implemented : mips16
shadow register sets : 1
kscratch registers : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available
processor : 1
cpu model : Brcm4380 V4.4 FPU V0.1
BogoMIPS : 403.45
cpu MHz : 405.010
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : no
ASEs implemented : mips16
shadow register sets : 1
kscratch registers : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available
總結(jié)
以上是生活随笔為你收集整理的mips linux 编译器,linux - MIPS的交叉编译器似乎无法创建有效的程序 - 堆栈内存溢出...的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c语言贪心算法排课,*排课软件常用算法介
- 下一篇: linux拨号软件,Linux 下的宽带