Created
September 12, 2020 05:40
-
-
Save akawashiro/5b1834a581bd050421e69fa4b6f726e9 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
#! /bin/bash | |
# This shellscript find all shared object which contains the specified symbol. | |
sym=$1 | |
sos=`ldconfig -p | awk -F '=>' '{print $2}' | grep so | sort | uniq` | |
for s in ${sos} | |
do | |
PRE_IFS=$IFS | |
IFS=$'\n' | |
for l in `readelf -s $s | grep -e ${sym} | grep -v UND` | |
do | |
echo ${l} in ${s} | |
done | |
IFS=$PRE_IFS | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment