• 6605阅读
  • 4回复

[提问]qt-embedded-linux-opensource-src-4.5.1移植到NIOS2 链接错误 [复制链接]

上一主题 下一主题
离线bill_hong
 
只看楼主 倒序阅读 楼主  发表于: 2011-01-03
将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::staticMetaObject'
.obj/release-shared-emb-generic/qsoundqss_qws.o: In function `QWSSoundServerClient::setMute(int, int, bool)':
qsoundqss_qws.cpp:(.text+0x2b0): relocation truncated to fit: R_NIOS2_GOT16 against `QWSSoundServerClient::staticMetaObject'
.obj/release-shared-emb-generic/qsoundqss_qws.o: In function `QWSSoundServerClient::setVolume(int, int, int, int)':
qsoundqss_qws.cpp:(.text+0x320): relocation truncated to fit: R_NIOS2_GOT16 against `QWSSoundServerClient::staticMetaObject'
.obj/release-shared-emb-generic/qsoundqss_qws.o: In function `QWSSoundServerClient::resume(int, int)':
qsoundqss_qws.cpp:(.text+0x37c): additional relocation overflows omitted from the output
/home/Bill/altera10.0sp1/nios2-linux/toolchain-mmu/x86-linux2/bin/../lib/gcc/nios2-linux-gnu/4.1.2/../../../../nios2-linux-gnu/bin/ld: BFD (GNU Binutils) 2.17.50.20070427 assertion fail /opt/nios2gcc4/obj/binutils-src-4.1-176-nios2-linux-gnu-i686-pc-linux-gnu/bfd/elf32-nios2.c:3782
/home/Bill/altera10.0sp1/nios2-linux/toolchain-mmu/x86-linux2/bin/../lib/gcc/nios2-linux-gnu/4.1.2/../../../../nios2-linux-gnu/bin/ld: BFD (GNU Binutils) 2.17.50.20070427 assertion fail /opt/nios2gcc4/obj/binutils-src-4.1-176-nios2-linux-gnu-i686-pc-linux-gnu/bfd/elf32-nios2.c:3782
/home/Bill/altera10.0sp1/nios2-linux/toolchain-mmu/x86-linux2/bin/../lib/gcc/nios2-linux-gnu/4.1.2/../../../../nios2-linux-gnu/bin/ld: BFD (GNU Binutils) 2.17.50.20070427 assertion fail /opt/nios2gcc4/obj/binutils-src-4.1-176-nios2-linux-gnu-i686-pc-linux-gnu/bfd/elf32-nios2.c:3782
collect2: ld returned 1 exit status
make[5]: *** [../../lib/libQtGui.so.4.5.1] 错误 1
make[5]: Leaving directory `/home/Bill/altera10.0sp1/nios2-linux/uClinux-dist/lib/qt-embedded/build-qt-embedded-linux-opensource-src-4.5.1/src/gui'
make[4]: *** [sub-gui-install_subtargets-ordered] 错误 2
make[4]: Leaving directory `/home/Bill/altera10.0sp1/nios2-linux/uClinux-dist/lib/qt-embedded/build-qt-embedded-linux-opensource-src-4.5.1'
make[3]: *** [all] 错误 2
make[3]: Leaving directory `/home/Bill/altera10.0sp1/nios2-linux/uClinux-dist/lib/qt-embedded'
make[2]: *** [qt-embedded] 错误 2
make[2]: Leaving directory `/home/Bill/altera10.0sp1/nios2-linux/uClinux-dist/lib'
make[1]: *** [all] 错误 2
make[1]: Leaving directory `/home/Bill/altera10.0sp1/nios2-linux/uClinux-dist/lib'
make: *** [subdirs] 错误 1




在此请教大家帮忙看看,希望大家帮忙出出主意,有没有什么办法解决,在此多谢大家了.












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