blob: 3a0aff91a001d42a676ece3c2ac2c94a48bd7299 [file] [log] [blame]
Elliott Hughes90f96b92019-05-09 15:56:39 -07001#!/system/bin/sh
2
3# Rather than have ldd and ldd64, this script does the right thing depending
4# on the argument.
5
6function error() {
7 echo "$1"
8 exit 1
9}
10
11[ $# -eq 1 ] || error "usage: ldd FILE"
12
13case `file -L "$1"` in
14 *32-bit*)
15 linker --list "$1"
16 ;;
17 *64-bit*)
18 linker64 --list "$1"
19 ;;
20 *)
21 error "$1: not an ELF file"
22 ;;
23esac