delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/12/08/22:18:06

From: gvaughan AT oranda DOT demon DOT co DOT uk (Gary V. Vaughan)
Subject: `ldd' functionality
8 Dec 1998 22:18:06 -0800 :
Message-ID: <366D66A2.ADE6272D.cygnus.gnu-win32@oranda.demon.co.uk>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

This is a multi-part message in MIME format.
--------------D30C5AA3BD818E02A7E34275
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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.
--------------D30C5AA3BD818E02A7E34275
Content-Type: text/plain; charset=us-ascii;
 name="ldd"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="ldd"

#! /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

--------------D30C5AA3BD818E02A7E34275--

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019