Linker & Loader - yszheda/wiki GitHub Wiki
// TODO
version
- Linking with multiple versions of a library
- Version numbers in shared object files
- 7.2 Libtool’s versioning system
PIC
)
Position Independent Code (
PIE
)
Address space layout randomization (ASLR) / Position-independent executable (- https://en.wikipedia.org/wiki/Address_space_layout_randomization
- What is the -fPIE option for position-independent executables in gcc and ld?
linker
gold
lld
Loader
prelink
LD_PRELOAD
- http://yurichev.com/mirrors/LD_PRELOAD/lca2009.pdf
- http://lilydjwg.is-programmer.com/2011/6/26/use-ld_preload-to-redirect-file-read-and-write.27558.html
- https://security.stackexchange.com/questions/63599/is-there-any-way-to-block-ld-preload-and-ld-library-path-on-linux
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
- How do i find out what all symbols are exported from a shared object?
- Find where is a shared library symbol defined on a live system / list all symbols exported on a system
nm -g /usr/lib/blah.a
readelf -Ws /usr/lib/blah.so
scanelf -l -s _ZN6Kopete6Global10PropertiesC2Ev | grep _ZN6Kopete6Global10PropertiesC2Ev
atexit
/ __run_exit_handlers
exit /
dlopen
/ dlclose
-
What exactly does
-rdynamic
do and when exactly is it needed? -
http://www.tldp.org/HOWTO/Program-Library-HOWTO/dl-libraries.html
-
A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux
ar
/ ranlib
Trouble shooting
failed to map segment from shared object: Operation not permitted
/lib64/ld-linux-x86-64.so
restore - CentOS 7 /lib64被重命名后的解决
- How to recover after deleting the symbolic link libc.so.6?
- What is /lib64/ld-linux-x86-64.so.2 and why can it be used to execute file?