Skip to content

Commit

Permalink
add linker version script to hide internal syms
Browse files Browse the repository at this point in the history
  • Loading branch information
bwalex committed Jul 10, 2011
1 parent c5460ca commit f7a33cd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Expand Up @@ -8,6 +8,8 @@ all:
gcc -O0 $(WARNFLAGS) -g main.c tcplay.c crc32.c safe_mem.c io.c crypto-dev.c hdr.c -o tc-play -lcrypto -ldevmapper -lprop -lutil
lib:
gcc $(WARNFLAGS) -c -fPIC -O0 -Wall -g tcplay_api.c tcplay.c crc32.c safe_mem.c io.c crypto-dev.c hdr.c
gcc -shared -Wl -o libtcplay.so tcplay_api.o tcplay.o crc32.o safe_mem.o io.o crypto-dev.o hdr.o
gcc -shared -Wl,-version-script=tcplay.map -o libtcplay.so tcplay_api.o tcplay.o crc32.o safe_mem.o io.o crypto-dev.o hdr.o
test:
gcc -O0 -g -L. -I. tcplay_api_test.c -ltcplay -lcrypto -ldevmapper -lprop -lutil
clean:
rm -f tc-play tc-play.core *.o ktrace.out
13 changes: 13 additions & 0 deletions tcplay.map
@@ -0,0 +1,13 @@
{
global:
tc_api_init;
tc_api_uninit;
tc_api_create_volume;
tc_api_map_volume;
tc_api_check_cipher;
tc_api_check_prf_hash;
tc_api_get_error_msg;
tc_api_get_summary;
local:
*;
};

0 comments on commit f7a33cd

Please sign in to comment.