首页| 论坛| 消息

标题:qt-embedded-linux-opensource-src-4.5.1移植到NIOS2 链接错误
作者:bill_hong
日期:2011-01-03 18:49
内容:

将qt-embedded-linux-opensource-src-4.5.1 移植到Altera Nios2 MMU Linux,编译OK,在ld时出现如下错误:

/home/Bill/altera10.0sp1/nios2-linux/toolchain-mmu/x86-linux2/bin/../lib/gcc/nios2-linux-gnu/4.1.2/../../../../nios2-linux-gnu/bin/ld: fde encoding in .obj/release-shared-emb-generic/qrc_qmessagebox.o(.eh_frame) prevents .eh_frame_hdr table being created.
/home/Bill/altera10.0sp1/nios2-linux/toolchain-mmu/x86-linux2/bin/../lib/gcc/nios2-linux-gnu/4.1.2/crtbeginS.o: In function `__do_global_dtors_aux':
crtstuff.c:(.text+0x2c): relocation truncated to fit: R_NIOS2_GOT16 against `__cxa_finalize@@GLIBC_2.10'
crtstuff.c:(.text+0x34): relocation truncated to fit: R_NIOS2_GOT16 against `__dso_handle'
crtstuff.c:(.text+0x3c): relocation truncated to fit: R_NIOS2_CALL16 against `__cxa_finalize@@GLIBC_2.10'
/home/Bill/altera10.0sp1/nios2-linux/toolchain-mmu/x86-linux2/bin/../lib/gcc/nios2-linux-gnu/4.1.2/crtbeginS.o: In function `frame_dummy':
crtstuff.c:(.text+0xdc): relocation truncated to fit: R_NIOS2_GOT16 against `_Jv_RegisterClasses'
.obj/release-shared-emb-generic/qsoundqss_qws.o: In function `QWSSoundServerClient::metaObject() const':
qsoundqss_qws.cpp:(.text+0x18): relocation truncated to fit: R_NIOS2_GOT16 against `QWSSoundServerClient::staticMetaObject'
.obj/release-shared-emb-generic/qsoundqss_qws.o: In function `QWSSoundServerClient::setSilent(bool)':
qsoundqss_qws.cpp:(.text+0x1a0): relocation truncated to fit: R_NIOS2_GOT16 against `QWSSoundServerClient::staticMetaObject'
.obj/release-shared-emb-generic/qsoundqss_qws.o: In function `QWSSoundServerClient::playPriorityOnly(bool)':
qsoundqss_qws.cpp:(.text+0x1f4): relocation truncated to fit: R_NIOS2_GOT16 against `QWSSoundServerClient::staticMetaObject'
.obj/release-shared-emb-generic/qsoundqss_qws.o: In function `QWSSoundServerClient::stopAll(int)':
qsoundqss_qws.cpp:(.text+0x24c): relocation truncated to fit: R_NIOS2_GOT16 against `QWSSoundServerClient ..


#1 [bill_hong 01-06 08:59]
这么些天了,看的人还是有,顶的不多呀,冷。
看来使用这个的人还是比较少一些。
自己先顶一把。
谢谢!
#2 [bill_hong 02-26 15:15]
没有人回答,自己回答吧,去掉-fPIC选项就可以了
#3 [bill_hong 02-26 15:22]
但是,这样生成的共享库好像还是有问题,这个问题应该是作CPU的GOT有关系。
#4 [bill_hong 02-26 15:47]
-fpic 在共享库时生成位置独立的代码(PIC)。所有的内部寻址均通过全局偏移表(GOT)来实现。这就带来了一个问题,CPU的 GOT 基本都各不相同。为此设计了选项
-fPIC来克服那些CPU 的GOT有大小限制的CPU。
由于Altera MMU Nios2 linux os GOT操作没有做好存在问题,所以在生成共享库时,即使加上了-fPIC选项在一些大尺寸或地址不对齐时就要做调整,这样就出现了上面的错误。
要解决这个问题只有修改nios2 GCC工具。
目前,我还没有这个软件功力,难。
这就是软件 BUG。

回复 发表
主题 版块