Skip to content

Instantly share code, notes, and snippets.

Created October 22, 2019 16:45
What would you like to do?
Function for finding where missing symbol is defined
# Usage: find_symbol _ZN6icu_608ByteSinkD2Ev
# Output list of files on system where given symbol exists
# Symbol should be formatted as given by output of ldd -r
find_symbol() {
local symbol="$1"
while read -r filename ; do
readelf -Ws "$filename" 2>/dev/null | grep "$symbol" && echo "$filename" ;
done < <(find / -type f -name '*.so' -o -name '*.bc' -o -name '*.a')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment