3 # Current Maintainer: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
4 # Original Author: Ralph Goers(rgoer@Candle.Com)
6 # This file is distributed under the terms of the GNU Public License
8 # find-requires is part of RPM, the RedHat Package Manager. find-requires
9 # reads a list of full pathnames (in a package) on stdin, and outputs all
10 # shared libraries the package requires to run correctly.
12 # On AIX, use `dump -H' to find the library dependencies for an executable
14 # Example dump output:
16 #$dump -H /usr/bin/dump
20 # ***Loader Section***
21 # Loader Header Information
22 #VERSION# #SYMtableENT #RELOCent LENidSTR
23 #0x00000001 0x00000021 0x0000006c 0x0000002f
25 ##IMPfilID OFFidSTR LENstrTBL OFFstrTBL
26 #0x00000002 0x00000848 0x00000049 0x00000877
29 # ***Import File Strings***
30 #INDEX PATH BASE MEMBER
31 #0 /usr/lib:/lib:/usr/lpp/xlC/lib
36 PATH=/usr/bin:/usr/ccs/bin
40 # TVM: Marc Stephenson (marc@austin.ibm.com) points out we run things
41 # like `file', et. al. and expect the output to be what we see in the
42 # C/POSIX locale. Make sure it is so.
47 filelist=`sed "s/['\"]/\\\&/g" | xargs file \
48 | grep -E '^.*:.*(executable |archive )' | cut -d: -f1`
52 dump -H $f 2>/dev/null | awk '
55 # Since this entire awk script is enclosed in single quotes,
56 # you need to be careful to not use single quotes, even in awk
57 # comments, if you modify this script.
67 in_shlib_list == 1 && /^$/ {
74 numfields = split($0, fields, " ")
82 if (namevar < numfields) {
83 printf("%s(%s)\n", fields[namevar], fields[namevar+1])
90 in_file_strings == 1 && $1 == "0" {
94 /\*Import File Strings\*/ {