Skip to content

Instantly share code, notes, and snippets.

@mheffner
Created August 19, 2009 19:00
Show Gist options
  • Save mheffner/170584 to your computer and use it in GitHub Desktop.
Save mheffner/170584 to your computer and use it in GitHub Desktop.
$ 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
Exit 1
$ LD_LIBRARY_PATH=. ./test
./test: symbol lookup error: ./test: undefined symbol: ab_get_string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment