#!/bin/sh
#
# Tiny ldd fake.
# Copyright (C) 2010-2017 SliTaz GNU/Linux.
#
echo
file="$@"
for file do
	file="$(which "$file")"
	[ ! -f "$file" ] && exit
	ld="$(sed '/\/lib.*\/ld/!dq' "$file")"
	echo "$file" | sed 's%^./%%;s%$%:%'
	LD_TRACE_LOADED_OBJECTS=1 "$(realpath ${ld:-/lib/ld-linux*})" "$file" 2>/dev/null
	echo
done
