File: dlls.sh

package info (click to toggle)
monotone 0.48-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 20,096 kB
  • ctags: 8,077
  • sloc: cpp: 81,000; sh: 6,402; perl: 1,241; lisp: 1,045; makefile: 655; python: 566; sql: 112; ansic: 52
file content (16 lines) | stat: -rw-r--r-- 337 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

get_dlls() {
  objdump --private-headers $1   | 
    awk '/DLL Name/ {print $3;}' |  # Format is "        DLL Name: KERNEL32.dll"
    xargs -n1 which              |  # search on path
    grep -iv "system32"             # no system libraries
}

(
  for DLL in $(get_dlls $1)
  do
    echo "$DLL"
    $0 $DLL
  done
) | sort -u