How to convert default binutils into binutils-2.26?

不羁岁月 提交于 2019-12-24 08:05:04

问题


When I command "make", then I got an error like this:

/usr/bin/ld: ../../../lib//liblmi.a(LMInterface.o): unrecognized relocation (0x2a) in section `.text'

This error is caused by earlier version of binutils, and I have binutils like this:

GNU ld (GNU Binutils for Ubuntu) 2.24

I installed binutils-2.26 by following commands

$ sudo apt-get update
$ sudo apt-get install binutils-2.26

But I have a problem, I installed binutils-2.26, but the default binutils version is 2.24, so How can I convert binutils-2.26 into the default binutils?


回答1:


binutils-2.26 provides the individual programs under names such as /usr/bin/as-2.26 and /usr/bin/ld-2.26, so that the binutils and binutils-2.26 packages can be installed at the same time. However, unversioned names of the programs are available in the /usr/lib/binutils-2.26/bin directory, so you can activate them using this shell command:

PATH="/usr/lib/binutils-2.26/bin:$PATH"

As a result, gcc and g++ will use binutils 2.26 instead of the default binutils version.



来源:https://stackoverflow.com/questions/52754728/how-to-convert-default-binutils-into-binutils-2-26

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!