Skip to content

Instantly share code, notes, and snippets.

@klaufir
Created May 7, 2015 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klaufir/2038a6471a8fc9eb1d17 to your computer and use it in GitHub Desktop.
Save klaufir/2038a6471a8fc9eb1d17 to your computer and use it in GitHub Desktop.
Find the owner .so file for a given symbol
#!/bin/bash
find /usr/lib -name '*.so' | xargs -n 1 -I QQQQQQ sh -c "readelf -Ws QQQQQQ 2>&1 | nl -s QQQQQQ | cut -c7-" | grep -v " UND " | grep $*
#example: find-symbol-owner.sh glLight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment