How to compile elfutils for x86 ?

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 ? ]

Download the stable release code as below,

 wget -c ftp://sourceware.org/pub/elfutils/0.169/elfutils-0.169.tar.bz2 
 tar xvf elfutils-0.169.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/
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
├── include
│   ├── dwarf.h
│   ├── elfutils
│   │   ├── elf-knowledge.h
│   │   ├── known-dwarf.h
│   │   ├── libasm.h
│   │   ├── libdwelf.h
│   │   ├── libdwfl.h
│   │   ├── libdw.h
│   │   ├── libebl.h
│   │   └── version.h
│   ├── gelf.h
│   ├── libelf.h
│   └── nlist.h
├── lib
│   ├── elfutils
│   │   ├── libebl_aarch64-0.169.so
│   │   ├── libebl_aarch64.so -> libebl_aarch64-0.169.so
│   │   ├── libebl_alpha-0.169.so
│   │   ├── libebl_alpha.so -> libebl_alpha-0.169.so
│   │   ├── libebl_arm-0.169.so
│   │   ├── libebl_arm.so -> libebl_arm-0.169.so
│   │   ├── libebl_bpf-0.169.so
│   │   ├── libebl_bpf.so -> libebl_bpf-0.169.so
│   │   ├── libebl_i386-0.169.so
│   │   ├── libebl_i386.so -> libebl_i386-0.169.so
│   │   ├── libebl_ia64-0.169.so
│   │   ├── libebl_ia64.so -> libebl_ia64-0.169.so
│   │   ├── libebl_m68k-0.169.so
│   │   ├── libebl_m68k.so -> libebl_m68k-0.169.so
│   │   ├── libebl_ppc-0.169.so
│   │   ├── libebl_ppc64-0.169.so
│   │   ├── libebl_ppc64.so -> libebl_ppc64-0.169.so
│   │   ├── libebl_ppc.so -> libebl_ppc-0.169.so
│   │   ├── libebl_s390-0.169.so
│   │   ├── libebl_s390.so -> libebl_s390-0.169.so
│   │   ├── libebl_sh-0.169.so
│   │   ├── libebl_sh.so -> libebl_sh-0.169.so
│   │   ├── libebl_sparc-0.169.so
│   │   ├── libebl_sparc.so -> libebl_sparc-0.169.so
│   │   ├── libebl_tilegx-0.169.so
│   │   ├── libebl_tilegx.so -> libebl_tilegx-0.169.so
│   │   ├── libebl_x86_64-0.169.so
│   │   └── libebl_x86_64.so -> libebl_x86_64-0.169.so
│   ├── libasm-0.169.so
│   ├── libasm.a
│   ├── libasm.so -> libasm.so.1
│   ├── libasm.so.1 -> libasm-0.169.so
│   ├── libdw-0.169.so
│   ├── libdw.a
│   ├── libdw.so -> libdw.so.1
│   ├── libdw.so.1 -> libdw-0.169.so
│   ├── libebl.a
│   ├── libelf-0.169.so
│   ├── libelf.a
│   ├── libelf.so -> libelf.so.1
│   ├── libelf.so.1 -> libelf-0.169.so
│   └── pkgconfig
│       ├── libdw.pc
│       └── libelf.pc
└── share
    └── locale
        ├── de
        │   └── LC_MESSAGES
        │       └── elfutils.mo
        ├── en@boldquot
        │   └── LC_MESSAGES
        │       └── elfutils.mo
        ├── en@quot
        │   └── LC_MESSAGES
        │       └── elfutils.mo
        ├── es
        │   └── LC_MESSAGES
        │       └── elfutils.mo
        ├── ja
        │   └── LC_MESSAGES
        │       └── elfutils.mo
        ├── pl
        │   └── LC_MESSAGES
        │       └── elfutils.mo
        └── uk
            └── LC_MESSAGES
                └── elfutils.mo

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

SHUFFLED :   How to install perf in ubuntu Linux ?

The current elfutils source code can be checked out with:

 git clone git://sourceware.org/git/elfutils.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.

Android Android Commands Android Java Applications Application Libraries Bash / Shell Scripts Bluetooth driver Build Frameworks Commands and Packages Core Kernel C Programs Development Environment Setup Documents / Books Errors & Failures File Systems Framebuffer / Display Driver git Go Language Programs Hardware Platforms Home Kernel & Device Drivers Kernel Booting and Porting Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL NDK / Middleware / HAL Network Driver OS Concepts PHP Procfs Filesystem Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded
Tags:

Leave a Reply