3 # $NetBSD: shlib-type,v 1.2 2007/08/02 15:46:33 jlam Exp $
5 # This code is derived from software contributed to The NetBSD Foundation
8 # This script returns the the library format for the platform. If
9 # the library format is "ELF/a.out", then we inspect the specified
10 # path to determine the correct object format (either ELF or a.out).
13 if [ -z "${FILE_CMD}" ]; then
18 echo 1>&2 "usage: shlib-type libformat binpath"
28 if [ -f "$binpath" ]; then
29 output=`${FILE_CMD} $binpath 2>/dev/null`
34 *ELF*dynamically*) sotype="ELF" ;;
35 *shared*library*) sotype="a.out" ;;
36 *dynamically*) sotype="a.out" ;;
37 *) sotype="ELF" ;; # guess "ELF"