This is an old revision of the document!
Alternatives:
GNU BFD Linker
gold
LLD
mold
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
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
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
Create a symlink of /usr/bin/ld
to the linker of choice
Use of LDFLAGS
environment variable and there -fuse-ld=
, but this depends on support for the specific linker in the used compiler (e.g. GCC, Clang, …)
Workaround: Create a directory e.g. tools
, create a symlink to the linker of choice in there and use the option -Btools
in the LDFLAGS
environment variable.
root@host:~$ readelf -Ws <LIBRARY_FILE>
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.
To trace the system calls (i.e. Linux kernel calls) of a program upon execution:
root@host:~$ strace -f <PROGRAMM>
To trace the calls to symbols exported by dynamically linked libraries of a program upon execution:
root@host:~$ ltrace -f <PROGRAM>
To check the status of :
root@host:~$