ELFinfo




What is it?

elfinfo is a small utility for showing information about ELF files


What can it do?

It can show information about which machine an ELF file has been compiled for, if it's stripped or not, if it's big or little endian and which compiler and version has been used to compile the file.
It can detect compiler version for files compiled with the Go, GCC, OCaml or FPC compilers.

Example

Running this command:

elfinfo /usr/bin/ls

Gives this output:

/usr/bin/ls: stripped=true, compiler=GCC 6.3.1, byteorder=LittleEndian, machine=Advanced Micro Devices x86-64

The details will be different for other platforms.

Why?

Which arguments are supported?




Source code and bug tracker

The source and issue tracker is available at github.

git clone git://github.com/xyproto/elfinfo.git


Installation

64-bit Linux

The following commands downloads the latest binary release from github and installs it:

        cd /tmp
        curl -LO https://github.com/xyproto/elfinfo/releases/download/0.7.6/elfinfo
        sudo install -Dm755 elfinfo /usr/bin/elfinfo
    

Commands will be slightly different or macOS or BSD.



As a Go script

This requires a working Go interpreter in /usr/bin/go:

        cd /tmp
        curl -LO https://raw.githubusercontent.com/xyproto/elfinfo/0.7.6/main.go
        sudo install -Dm755 main.go /usr/bin/elfinfo.go
        echo -e '#!/bin/sh\n/usr/bin/go run /usr/bin/elfinfo.go "$@"' > elfinfo.sh
        sudo install -Dm755 elfinfo.sh /usr/bin/elfinfo
    

Commands will be slightly different on macOS or BSD.



Using the latest development version

        go get -u github.com/xyproto/elfinfo
    

Downloads

elfinfo 0.7.6
Alexander F. Rødseth, 2019