-
Notifications
You must be signed in to change notification settings - Fork 5
Linker & Loader
Shuai YUAN edited this page Oct 12, 2023
·
40 revisions
// TODO
- Linking with multiple versions of a library
- Version numbers in shared object files
- 7.2 Libtool’s versioning system
- https://en.wikipedia.org/wiki/Address_space_layout_randomization
- What is the -fPIE option for position-independent executables in gcc and ld?
- 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
g++ -o main main.cpp -Wl,-Bstatic -lmath -Wl,-Bdynamic
g++ -o main main.cpp -l:libmath.a
- 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
-
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