This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: `ldd' functionality
- Subject: Re: `ldd' functionality
- From: Eugene Kanter <eugene at bgs dot com>
- Date: Wed, 09 Dec 1998 10:33:12 -0500
- CC: gnu-win32 at cygnus dot com
- References: <366D66A2.ADE6272D@oranda.demon.co.uk>
Check ldd functionality from U/WIN toolkit. It works correctly the same way
UNIX does (e.g. tries to run application). Looking at DLL list is not enough,
since if older version is present your script won't tell the differentce but
application will fail.
Eugene.
"Gary V. Vaughan" wrote:
> I am in the process of patching libtool to play nicely on win32, and
> it turns out that as part of the port I need to do the equivalent to ldd
> on linux/solaris.
>
> Attached is a script which seems to give the right results -- is this
> the correct approach? Or is there a cleaner (or less kludgy) way to do
> it?
>
> Cheers,
> Gary V. Vaughan.
>
> ------------------------------------------------------------------------
> #! /bin/sh
>
> object=$1
> exeext=.exe
> re_dll='^ DLL Name: '
>
> test -f $object$exeext && object=$object$exeext
> test -f $object || { echo "$object: no such file"; exit 1; }
> test $# = 1 || { echo "USAGE: ldd <object>"; exit 1; }
>
> OBJDUMP=${OBJDUMP=objdump}
> OBJDUMP_FLAGS=${OBJDUMP_FLAGS='-p -j idata'}
>
> eval ${OBJDUMP} ${OBJDUMP_FLAGS} $object \
> | grep "$re_dll" | sed "s,$re_dll,,"
>
> exit 0
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".