This script list up missing libc function called from a shared library.
Usage:
./scripts/check-libcfunc-avail.sh release apps/memcached/memcached.so
Signed-off-by: Takuya ASADA <sy...@cloudius-systems.com>
---
scripts/check-libcfunc-avail.sh | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100755 scripts/check-libcfunc-avail.sh
diff --git a/scripts/check-libcfunc-avail.sh b/scripts/check-libcfunc-avail.sh
new file mode 100755
index 0000000..0a412ee
--- /dev/null
+++ b/scripts/check-libcfunc-avail.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+if [ "$1" == "" -o "$2" == "" ]; then
+ echo "usage: $0 [release | debug] [app.so]"
+ exit 1
+fi
+
+MODE=$1
+APP=$2
+
+FUNCS=`objdump -T $APP | grep GLIBC|sed -e "s/.*GLIBC_[0-9.]* //"`
+for i in $FUNCS; do
+ if [ ! -f build/$MODE/loader.elf ]; then
+ echo "build/$MODE/loader.elf not found"
+ exit 1
+ fi
+ FOUND=`objdump -t build/$MODE/loader.elf | grep -e " $i$" | wc -l`
+ if [ $FOUND == 0 ]; then
+ echo "$i not found"
+ fi
+done
--
1.8.5.3
--
You received this message because you are subscribed to the Google Groups "OSv Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This script list up missing libc function called from a shared library.scripts/check-libcfunc-avail.sh | 25 +++++++++++++++++++++++++
Usage:
./scripts/check-libcfunc-avail.sh release apps/memcached/memcached.so
Signed-off-by: Takuya ASADA <sy...@cloudius-systems.com>
---
1 file changed, 25 insertions(+)
create mode 100755 scripts/check-libcfunc-avail.shindex 0000000..0bca3aa
diff --git a/scripts/check-libcfunc-avail.sh b/scripts/check-libcfunc-avail.sh
new file mode 100755
--- /dev/null
+++ b/scripts/check-libcfunc-avail.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+if [ $# != 2 ]; then
+ echo "usage: $0 [release | debug] [app.so]"
+if [ ! -f build/$MODE/loader.elf ]; then
+ echo "build/$MODE/loader.elf not found"+DUMPFILE=`mktemp`
+ exit 1
+fi
+objdump -t build/$MODE/loader.elf > $DUMPFILE
+FUNCS=`objdump -T $APP | grep GLIBC|sed -e "s/.*GLIBC_[0-9.]* //"`+ grep -q " $i$" $DUMPFILE
+for i in $FUNCS; do
+ FOUND=$?
+ if [ $FOUND != 0 ]; then
+ echo "$i not found"+rm $DUMPFILE
+ fi
+done
--
1.8.5.3
--
You received this message because you are subscribed to the Google Groups "OSv Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
trap "rm $DUMPFILE" 1 2 3 15
--
You received this message because you are subscribed to the Google Groups "OSv Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.