Linker & Loader - yszheda/wiki GitHub Wiki



// TODO

version

Position Independent Code (PIC)

Address space layout randomization (ASLR) / Position-independent executable (PIE)

linker

gold

lld

Loader

prelink

LD_PRELOAD

ldconfig

ldd

static library

g++ -o main main.cpp -Wl,-Bstatic -lmath -Wl,-Bdynamic
g++ -o main main.cpp -l:libmath.a

glibc version

symbols in lib

nm -g /usr/lib/blah.a
readelf -Ws /usr/lib/blah.so
scanelf -l -s _ZN6Kopete6Global10PropertiesC2Ev | grep _ZN6Kopete6Global10PropertiesC2Ev

exit / atexit / __run_exit_handlers

dlopen / dlclose

ar / ranlib

Trouble shooting

failed to map segment from shared object: Operation not permitted

restore /lib64/ld-linux-x86-64.so

-l: