summaryrefslogtreecommitdiff
path: root/core/musl/ldd
diff options
context:
space:
mode:
authorrawnix ports <ports@rawnix.org>2026-09-26 18:19:05 +0000
committerrawnix ports <ports@rawnix.org>2026-09-26 18:19:05 +0000
commitc82e88dd00d1b0b7fcfb4e5628d99611388cef6f (patch)
tree56d864b5a5c6c145edd96178ae219a8f90e191a6 /core/musl/ldd
downloadports-c82e88dd00d1b0b7fcfb4e5628d99611388cef6f.tar.gz
sync 2026-09-26 18:19 UTC
1672 files changed, 151396 insertions(+)
Diffstat (limited to 'core/musl/ldd')
-rw-r--r--core/musl/ldd19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/musl/ldd b/core/musl/ldd
new file mode 100644
index 0000000..f522968
--- /dev/null
+++ b/core/musl/ldd
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+if [ $# -gt 1 ] && [ "$1" = "--" ]; then
+ shift
+elif [ $# -eq 0 ] || [ "${1#-}" != "$1" ]; then
+ echo "Usage: ${0##*/} [--] FILE..." >&2
+ exit 64
+fi
+
+ERRORS=0
+for PROGRAM in "$@"; do
+ LIBRARIES=$(/lib/ld-musl-x86_64.so.1 --list "$PROGRAM")
+ if [ -n "$LIBRARIES" ]; then
+ printf '%s:\n%s\n' "$PROGRAM" "$LIBRARIES"
+ else
+ ERRORS=1
+ fi
+done
+exit $ERRORS