Table of Contents

Linker

Alternatives:

Links

General

FIXME

Docs

FIXME

Articles

iX 12/2022 - Page 112 - Ohne Linker kein Programm
iX 02/2023 - Page 136 - Mit dem richtigen Linker Zeit sparen
Linux-Magazin 08/2023 - Page 70 - Programmverhalten mit LD_PRELOAD ändern

Files and Directories

FIXME

General Files and Directories

FIXME

Configuration Files

FIXME

Getting Help

binutils Manual pages:

user@host:~$ man 1 ld
user@host:~$ man 1 nm
user@host:~$ man 1 objdump
user@host:~$ man 1 readelf
user@host:~$ man 1 strip

GNU C Library: Binaries Manual pages:

user@host:~$ man 1 ldd

Dynamically linked library call tracer Manual pages:

user@host:~$ man 1 ltrace

System call tracer Manual pages:

user@host:~$ man 1 strace

Install

To install the GNU assembler, linker and binary utilities on Debian:

root@host:~$ apt-get -y install binutils binutils-common

To install the documentation for the GNU assembler, linker and binary utilities on Debian:

root@host:~$ apt-get -y install binutils-doc

To install the Dynamically linked library call tracer on Debian:

root@host:~$ apt-get -y install ltrace

To install the System call tracer on Debian:

root@host:~$ apt-get -y install strace

Configuration

FIXME

Usage

Using an alternative Linker

Listing all exported symbols of a library

root@host:~$ readelf -Ws <LIBRARY_FILE>

Changing the loaded shared libraries

Setting the environment variables LD_LIBRARY_PATH or LD_PRELOAD in order to change the search order of the linked shared libraries to be loaded at start of a binary.

Tracing the system calls of a program

To trace the system calls (i.e. Linux kernel calls) of a program upon execution:

root@host:~$ strace -f <PROGRAMM>

Tracing the dynamically linked library calls of a program

To trace the calls to symbols exported by dynamically linked libraries of a program upon execution:

root@host:~$ ltrace -f <PROGRAM> 

Recipies

FIXME

this namespace doesn't exist: prog:c:recipies

Known Issues

FIXME