6.48. Libelf 0.170

Libelf is a library for handling ELF (Executable and Linkable Format) files.

Approximate build time: 0.6 SBU
Required disk space: 74 MB

6.48.1. Installation of Libelf

Libelf is part of elfutils-0.170 package. Use the elfutils-0.170.tar.xz as the source tarball.

First, fix a file to be compatible with gcc-8"

sed -e '/ALIGN_PRSTATUS)/{ 
        s/__attribute/attribute_packed &/
        s/packed, //}' \
    -i backends/linux-core-note.c

Prepare Libelf for compilation:

./configure --prefix=/usr

Compile the package:

make

To test the results, issue make check.

Install only Libelf:

make -C libelf install
install -vm644 config/libelf.pc /usr/lib/pkgconfig

6.48.2. Contents of Libelf

Installed Library: libelf.so