Created
August 19, 2009 19:13
-
-
Save mheffner/170597 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make libab.so | |
gcc -Wall -fPIC -fvisibility=hidden -c -o filea.o filea.c | |
gcc -Wall -fPIC -fvisibility=hidden -c -o fileb.o fileb.c | |
gcc -Wall -fPIC -fvisibility=hidden -shared -o libab.so filea.o fileb.o | |
$ strip --strip-all --discard-all libab.so | |
$ objdump -T libab.so | grep get | |
0000000000000587 g DF .text 000000000000004a Base ab_get_string | |
$ LD_LIBRARY_PATH=. ./test | |
String: A val: 3, B val: 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment