如何在Ubuntu上查看Binutils的哪个版本?

the*_*oon 12 ubuntu binutils

我搜索过,但没找到一个选项告诉我我的Ubuntu上有什么版本的binutils.或者至少我不知道如何解释它.

gcc -v - 什么都不说binutils

ld -v - 告诉我GNU ld (GNU Binutils for Ubuntu) 2.24.这是否意味着我有binutils 2.24?

小智 14

是的,ld -v您可以查看binutils的版本(在您的情况下是2.24)


PAD*_*MKO 5

我只使用Debian 8测试它,但我认为它必须与其他基于Debian的操作系统(Ubuntu,Mint,其他)一起使用.


dpkg -l | grep binutils

$ dpkg -l | grep binutils
ii  binutils                                     2.25-5+deb8u1                        amd64        GNU assembler, linker and binary utilities
Run Code Online (Sandbox Code Playgroud)

apt-cache策略binutils

$ apt-cache policy binutils
binutils:
  Installed: 2.25-5+deb8u1
  Candidate: 2.25-5+deb8u1
  Version table:
 *** 2.25-5+deb8u1 0
        500 http://ftp.ru.debian.org/debian/ jessie-proposed-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.25-5 0
        500 http://ftp.ru.debian.org/debian/ jessie/main amd64 Packages
        500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages
Run Code Online (Sandbox Code Playgroud)

apt-cache show binutils(stripped)

$ apt-cache show binutils
Package: binutils
Version: 2.25-5+deb8u1
Installed-Size: 20566
Maintainer: Matthias Klose <doko@debian.org>
Architecture: amd64
Replaces: binutils-gold (<< 2.20.51.20100415), binutils-mingw-w64-i686 (<< 2.23.52.20130612-1+3), binutils-mingw-w64-x86-64 (<< 2.23.52.20130612-1+3)
Provides: binutils-gold, elf-binutils
Depends: libc6 (>= 2.14), zlib1g (>= 1:1.2.0)
Suggests: binutils-doc (>= 2.25-5+deb8u1)
..............................
Run Code Online (Sandbox Code Playgroud)

ld --version

$ ld --version
GNU ld (GNU Binutils for Debian) 2.25
Run Code Online (Sandbox Code Playgroud)

ar --version

$ ar --version
GNU ar (GNU Binutils for Debian) 2.25
Run Code Online (Sandbox Code Playgroud)