Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Recent Chamber Activity

2020-09-10
2020-09-09
2020-09-08

Recent Wiki Changes

2020-09-09

Wiki Guide

Side Bar

mingw-ldd

DLL dependency listing utility for MinGW applications

Synopsis

ldd { exename | dllname } ...

mingw32-ldd { exename | dllname } ...

Description

mingw-ldd is a Bourne shell utility script, which may be used to display the DLL dependencies of one or more MS-Windows executable programs, or other MS-Windows DLLs. Suitable for use on MS-Windows itself, (running within MinGW.org's MSYS environment), or as a component of a cross-compiler tool suite, running on a non-Windows platform, it utilizes the objdump -x utility, in conjunction with awk, to extract any DLL Name headers from the named executables, or DLLs, then recursively processes each DLL, identified as a dependency by such headers, presenting all recursively identified DLLs in the form of a dependency tree.

Typically, when deployed on MS-Windows, in the MSYS environment, this utility is simply called ldd, and is invoked using the first form of the command, as shown in the synopsis; when deployed on any non-Windows platform, to avoid conflict with the native utility of the same name, this utility is called mingw32­-ldd, (possibly with the "mingw32" prefix adjusted to match that of the mingw32-objdump command, within the associated cross-compiler suite), and is invoked using the second form of the command.

Installation

To install mingw-ldd, for use in MinGW.org's MSYS environment, simply copy the mingw32-ldd.sh file, saving it to the MSYS /bin directory, as /bin/ldd; it may then be invoked, (provided that the MinGW.org binutils tools, and the MSYS awk package, are also installed), using the first form shown in the synopsis.

To install on a non-Windows platform, to accompany a cross-compiler tool suite, copy the mingw32-ldd.sh file to any convenient directory in $PATH, (typically the same directory as the mingw32-objdump program), saving it without the .sh suffix, and make it executable, (e.g. by running chmod a+x mingw32-ldd in the appropriate directory); it may then be invoked using the second form of the command, as shown in the synopsis.

Note that, regardless of the platform on which mingw-ldd is installed, it requires both a POSIX.1 conforming awk utility, and an objdump utility which supports the MS-Windows PE-coff object format. It is assumed that any modern awk will satisfy the POSIX.1 requirement, and no provision is made, to accommodate a non-conforming implementation. On the other hand, on non-Windows platforms, the host's native objdump utility may, or may not, support the PE-coff object format; in case it does not, then a cross-objdump utility must be installed, and the "mingw32" host prefix part of the installed "mingw32-ldd" name should be adjusted to match the actual host prefix of the cross-objdump utility.

Configuration

mingw-ldd uses a small number of shell variables, to influence its configuration; these may be defined as environment variables, and passed through the shell environment when invoking mingw32-ldd; alternatively, they may be defined as script variables, in the user-specific $HOME/.mingw32rt configuration file, which will be sourced by mingw32-ldd, on start-up.

The influential variables are:—

  • DLLPATH
    Specifies an aggregate colon separated list of directories, in which mingw32-ldd will search for those DLLs which are to be recursively scanned for nested dependencies. DLLPATH is normally left unspecified, and defaults to the aggregate of "DLLPATH=$PROGRAM_FILES:/mingw/bin:$SYSTEM_DLLPATH", as defined below; if DLLPATH is specified, it is interpreted as specified, and the following SYSTEM_DRIVE, SYSTEM_DLLPATH, and PROGRAM_FILES variables are ignored.
  • SYSTEM_DRIVE
    Specifies a representation of the path to the root of the primary system disk drive. Under MS-Windows, this would typically be "C:", (or the effective value of Windows' own "%SYSTEMDRIVE%" variable), but should be expressed in MSYS path name syntax, (e.g. "SYSTEM_DRIVE=/c"). On non-Windows hosts, this may be used to specify, for example, the root drive of an emulated Windows installation, under Wine, (e.g. "SYSTEM_DRIVE=$HOME/.wine/drive_c"). It is generally safe to leave the SYSTEM_DRIVE variable unspecified, (which is its default).
  • SYSTEM_DLLPATH
    Specifies a colon separated list of directory paths, (in addition to /mingw/bin, which is always searched unless overridden by an explicit DLLPATH assignment), in which mingw32-ldd will search for those DLLs which are identified as dependencies; when an identified dependency matches a DLL found in any directory in this path list, (with the search terminating at the first match), that DLL will be processed recursively, to identify further nested dependencies. If SYSTEM_DLLPATH is unspecified, a default of "SYSTEM_DLLPATH=$SYSTEM_DRIVE/windows/system32" is assumed.
  • PROGRAM_FILES
    Specifies an additional colon separated list of directory paths, which will be searched before /mingw/bin, for DLLs which are identified as dependencies; if unspecified, it is assigned a default of "PROGRAM_FILES="$SYSTEM_DRIVE/program files".

Note that the directories within "$PATH" are not automatically included within "$DLLPATH", but may be explicitly added to either PROGRAM_FILES, or SYSTEM_DLLPATH, (or to an explicit definition of DLLPATH itself), if desired.

Release Files

No download files.

Recent Commits

  • R/O
  • R/O (HTTP)
  • R/W (SSH)
  • R/W (HTTPS)
Fork
Rev.TimeAuthorMessage RSS
2b4c7d122020-09-10 04:37:28Keith MarshallAvoid the use of GNU-specific awk extensions. * mingw32-...
66b696662020-09-08 19:08:30Keith MarshallSupport a configurable command name host prefix. * mingw...
a9475f382020-09-08 03:13:38Keith MarshallAdopt a consistent style for shell function definitions. ...
6c62748f2020-09-07 02:38:10Keith MarshallSupport persistent user-specific run-time initialization....
4438871e2019-10-12 20:36:38Keith MarshallUse mingw32-specific objdump command, if available. * mi...
a80f93b32020-09-06 18:43:32Keith MarshallDiagnose missing files at top level. * mingw32-ldd.sh (s...
61e5b0612017-07-22 06:14:52Keith MarshallNew repository; initial commit. * mingw32-ldd.sh: New fi...

Most Recently Updated Tickets

No tickets