How to compile elfutils for x86 based platforms ?

elfutils is a collection of utilities and libraries to read, create and modify ELF binary files, find and handle DWARF debug data, symbols, thread state and stacktraces for processes and core files on GNU/Linux. [ Also READ : What is the difference between elfutils and binutils ? ]

Note: During the compilation of elfutils, 0.176 was the the last known version. Almost all commands remains same for other versions as well.


If you are trying to compile elfutils on freshly installed ubuntu, you may need to install “m4” as,

$ sudo apt-get install m4

Download the stable release code as below,

$ wget -c
$ tar xvf elfutils-0.176.tar.bz2
$ cd elfutils-0.169
$ mkdir out
 $ ./configure --prefix=$PWD/out
 $ make 
 $ make install 

Above command will install all the required libraries and binaries at out folder in current directory. You can change the location as you want using –prefix as mentioned above.

$ tree out/
├── bin
│   ├── eu-addr2line
│   ├── eu-ar
│   ├── eu-elfcmp
│   ├── eu-elfcompress
│   ├── eu-elflint
│   ├── eu-findtextrel
│   ├── eu-make-debug-archive
│   ├── eu-nm
│   ├── eu-objdump
│   ├── eu-ranlib
│   ├── eu-readelf
│   ├── eu-size
│   ├── eu-stack
│   ├── eu-strings
│   ├── eu-strip
│   └── eu-unstrip

If you want to try the current under development code at git, you can try below procedure, but it may or may not work, since its development source

The current elfutils source code can be checked out with:

$ git clone git://
$ cd elfutils
$ aclocal
$ autoconf
$ automake -a

This will generate the “configure” script which we can use to configure and create makefiles as,

$ ./configure

In the next post we will describe the details of how to cross compile the elfutils for ARM.


Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )


3 thoughts on “How to compile elfutils for x86 based platforms ?”

    • Compiling for mips64el should also work, but for that you will need a cross toolchain, and after adding toolchain “bin” to PATH, you need to start “configure” as “$ ./configure –host=arm-linux-gnueabihf –prefix=$PWD/out” [Example is for ARM, just replace with correct mips toolchain string] But you also have to resolve the dependencies like cross compilation of zlib etc.


Leave a Comment

Android Android Applications Android Build system Android Commands Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded