sqlcipher/tool/symbols.sh

35 lines
1.4 KiB
Bash
Raw Normal View History

2011-08-17 17:17:32 +00:00
#!/bin/sh
#
# Run this script in a directory that contains a valid SQLite makefile in
# order to verify that unintentionally exported symbols.
#
make sqlite3.c
echo '****** Exported symbols from a build including RTREE, FTS4 & ICU ******'
gcc -c -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE \
2011-12-26 19:52:17 +00:00
-DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT3 \
2011-08-17 17:17:32 +00:00
-DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_ATOMIC_WRITE \
-DSQLITE_ENABLE_ICU \
sqlite3.c
2011-12-26 19:52:17 +00:00
nm sqlite3.o | grep ' [TD] ' | sort -k 3
2011-08-17 17:17:32 +00:00
echo '****** Surplus symbols from a build including RTREE, FTS4 & ICU ******'
2011-12-26 19:52:17 +00:00
nm sqlite3.o | grep ' [TD] ' | grep -v ' .*sqlite3_'
2011-08-17 17:17:32 +00:00
echo '****** Dependencies of the core. No extensions. No OS interface *******'
2011-12-26 19:52:17 +00:00
gcc -c -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT3 \
2011-08-17 17:17:32 +00:00
-DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_ATOMIC_WRITE \
-DSQLITE_OS_OTHER -DSQLITE_THREADSAFE=0 \
sqlite3.c
nm sqlite3.o | grep ' U ' | sort -k 3
echo '****** Dependencies including RTREE & FTS4 *******'
gcc -c -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE \
2011-12-26 19:52:17 +00:00
-DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT3 \
2011-08-17 17:17:32 +00:00
-DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_ATOMIC_WRITE \
sqlite3.c
nm sqlite3.o | grep ' U ' | sort -k 3