Skip to content

Instantly share code, notes, and snippets.

@anzz1
Created May 2, 2023 02:22
Show Gist options
  • Save anzz1/daa6efc0f7ed67fa1483d43d67c1fcb8 to your computer and use it in GitHub Desktop.
Save anzz1/daa6efc0f7ed67fa1483d43d67c1fcb8 to your computer and use it in GitHub Desktop.
xldd.sh
#!/bin/sh
xldd() { if [ -z "$1" ]; then echo 'xldd: usage: xldd <elf>'; else if [ -z "$CROSS_COMPILE" ]; then echo 'xldd: error: $CROSS_COMPILE not defined'; else if [ -x "$CROSS_COMPILE""readelf" ]; then echo "xldd: "$1""; "$CROSS_COMPILE""readelf" -d "$1" | grep "Shared library:"; else echo "xldd: error: "$CROSS_COMPILE""readelf" is not executable"; fi; fi; fi; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment