帮助链接器failer:.gnu.linkonce.t [英] Help with linker failer: .gnu.linkonce.t

查看:470
本文介绍了帮助链接器failer:.gnu.linkonce.t的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法将使用gcc 3.2.3的共享库链接到binutils 2.18。当我尝试链接库时,出现以下错误:



.gnu.linkonce.t _...在章节中引用.rodata:在放弃的.gnu节中定义。 linkonce.t ...

我已经做了相当多的谷歌搜索,大多数地方似乎表明它是一个回归引入binutils 2.17和更高版本固定在2.18.50,但我很好奇,如果有人知道是否有任何特殊的解决方法,而不必碰到binutils和gcc。



谢谢。

解决方案

原来这是一个奇怪的结果,其中系统与不同binutils的gcc不匹配。 / usr / bin / gcc被使用(3.2.3),并且/ usr / local / bin / ld与/ usr / local / bin / ld一起使用,因为路径中的/ usr / local / bin位于/ usr / bin前面。当我们切换到/ usr / bin位于路径的前端时,相应的/ usr / bin / ld被调用(binutils 2.14),这似乎解决了问题。


I'm having trouble linking a shared library using gcc 3.2.3 with binutils 2.18. When I try to link the library I get the following error:

.gnu.linkonce.t_... referenced in section .rodata: defined in discarded section .gnu.linkonce.t...

I've done a fair amount of googling on this and most places seem to indicate it is a regression introduce in binutils 2.17 and later fixed in 2.18.50, but I was curious if anybody knew if there were any particular workarounds for the issue without having to touch binutils and gcc.

Thanks.

解决方案

This turned out to be a strange result where the system was mismatching gcc with a different binutils. /usr/bin/gcc was being used (3.2.3) and /usr/local/bin/ld was being used with it due to /usr/local/bin being in front of /usr/bin in the path. When we switched so that /usr/bin was at the front of the path, the appropriate /usr/bin/ld was called (binutils 2.14) and this seems to have resolved the problem.

这篇关于帮助链接器failer:.gnu.linkonce.t的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆