8.50. Libelf from Elfutils-0.195

#### Linux From Scratch - Version r13.0-174-systemd

### Chapter 8. Installing Basic System Software

- Prev

  OpenSSL-4.0.1

- Next

  Libffi-3.7.1

- Up
- Home

# 8.50. Libelf from Elfutils-0.195

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

Approximate build time: 0.1 SBU
Required disk space: 41 MB

## 8.50.1. Installation of Libelf

Libelf is part of the elfutils-0.195 package. Use the elfutils-0.195.tar.bz2 file as the source tarball.

Prepare Libelf for compilation:

    ./configure --prefix=/usr        \
                --disable-debuginfod \
                --enable-libdebuginfod=dummy

Compile only Libelf:

    make -C lib
    make -C libelf

To test the results, issue:

    make -k check

The above command builds the utilities that are part of the package as well as the unit tests.

Install only Libelf:

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

## 8.50.2. Contents of Libelf

Installed library: libelf.so
Installed directory: /usr/include/elfutils

### Short Descriptions

`libelf.so` | Contains API functions to handle ELF object files

- Prev

  OpenSSL-4.0.1

- Next

  Libffi-3.7.1

- Up
- Home