#!/bin/sh # # =========================================================================== # FILE: makexp_aix # TYPE: standalone executable # SYSTEM: AIX 3.2.5 and AIX 4 # # DESCRIPTION: This script creates an export list of ALL global symbols # from a list of object or archive files. # # USAGE: makexp_aix <OutputFile> "<FirstLine>" <InputFile> ... # # where: # <OutputFile> is the target export list filename. # <FirstLine> is the path/file string to be appended # after the "#!" symbols in the first line of the # export file. Passing "" means deferred resolution. # <InputFile> is an object (.o) or an archive file (.a). # # HISTORY: # 3-Apr-1998 -- remove C++ entries of the form Class::method # Vladimir Marangozov # # 1-Jul-1996 -- added header information # Vladimir Marangozov # # 28-Jun-1996 -- initial code # Vladimir Marangozov (Vladimir.Marangozov@imag.fr) # ========================================================================== # Variables expFileName=$1 toAppendStr=$2 shift; shift; inputFiles=$* automsg="Generated automatically by makexp_aix" notemsg="NOTE: lists _all_ global symbols defined in the above file(s)." curwdir=`pwd` # Create the export file and setup the header info echo "#!"$toAppendStr > $expFileName echo "*" >> $expFileName echo "* $automsg (`date -u`)" >> $expFileName echo "*" >> $expFileName echo "* Base Directory: $curwdir" >> $expFileName echo "* Input File(s) : $inputFiles" >> $expFileName echo "*" >> $expFileName echo "* $notemsg" >> $expFileName echo "*" >> $expFileName # Extract the symbol list using 'nm' which produces quite # different output under AIX 4 than under AIX 3.2.5. # The following handles both versions by using a common flagset. # Here are some hidden tricks: # 1. Use /usr/ccs/bin/nm. Relevant to AIX 3.2.5 which has # another version under /usr/ucb/bin/nm. # 2. Use the -B flag to have a standard BSD representation # of the symbol list on both AIX 3.2.5 and AIX 4. The "-B" # flag is missing in the AIX 3.2.5 online usage help of 'nm'. # 3. Use the -x flag to have a hex representation of the symbol # values. This fills the leading whitespaces on AIX 4, # thus simplifying the sed statement. # 4. Eliminate all entries except those with either "B", "D" # or "T" key letters. We are interested only in the global # (extern) BSS, DATA and TEXT symbols. With the same statement # we eliminate object member lines relevant to AIX 4. # 5. Eliminate entries containing a dot. We can have a dot only # as a symbol prefix, but such symbols are undefined externs. # 6. Eliminate everything including the key letter, so that we're # left with just the symbol name. # 7. Eliminate all entries containing two colons, like Class::method # # Use -X32_64 if it appears to be implemented in this version of 'nm'. NM=/usr/ccs/bin/nm xopt=-X32_64 $NM -e $xopt $1 >/dev/null 2>&1 || xopt="" $NM -Bex $xopt $inputFiles \ | sed -e '/ [^BDT] /d' -e '/\./d' -e 's/.* [BDT] //' -e '/::/d' \ | sort | uniq >> $expFileName
Mode | Type | Size | Ref | File |
---|---|---|---|---|
100644 | blob | 582 | 58471109208922c9ee8c4b06135725f03ed16814 | .bzrignore |
100644 | blob | 545 | fcf9df6a7a698e4bd87ed0c1cc4ed70bad8b9887 | .codecov.yml |
100644 | blob | 255 | 82694d81f276b2c59a0a93a4f678e1852e625052 | .gitattributes |
040000 | tree | - | 7e849e161267e730810fbbe6a848b14d5d002788 | .github |
100644 | blob | 1397 | 8b54c2c4861389f6e8bbfbab5ae0c8b6bbbad041 | .gitignore |
100644 | blob | 1060 | eb19a6c88d28d05588db25d21525ee2e19c22666 | .hgeol |
100644 | blob | 1358 | 68c607f2e8d420c8dfd0748efcd3b3b5447def16 | .hgignore |
100644 | blob | 8917 | 8f51c2ced49aed46d8b480280b630ea4264c57c3 | .hgtags |
100644 | blob | 1328 | b9be0f11fdb829f16e9de1921257eb7ee45fac57 | .hgtouch |
100644 | blob | 248 | 0614a299b6221dc7faedaa9139ae8b034e618a85 | .mention-bot |
100644 | blob | 3512 | e7e8694530ca21a6d7a19da3fab687a3e9d79e9c | .travis.yml |
040000 | tree | - | ab6ef0c3da91d215c813859260aa9d0724504633 | Doc |
040000 | tree | - | 5dd6fc9dc09374506491247872c868eca111e256 | Grammar |
040000 | tree | - | df0de9d4359f11311c74fd0dbad471bb2613a2d4 | Include |
100644 | blob | 12773 | f5d0b39a0cdddb91a31a537052b7d8d31a4aa79f | LICENSE |
040000 | tree | - | ea7cab398bd4e195aeb7676549d8bc32cb6891ba | Lib |
040000 | tree | - | 1db7415d4375525eaf8d05ddd5b088de3321041c | Mac |
100644 | blob | 58983 | 4145634c032d543d02295bd2c28a0c6ce839fa86 | Makefile.pre.in |
040000 | tree | - | 6854ababa88443950a60516508b6994cfd8888db | Misc |
040000 | tree | - | d7a4524c5d06e5dac9a4b9ab07745d038af9a4b0 | Modules |
040000 | tree | - | cec92311ba9c836d7f68a2d6e24b27e8287ac690 | Objects |
040000 | tree | - | ed4f35810e9633502c16ae038c2ce697d3987201 | PC |
040000 | tree | - | 37a613ac0022a9cfefaf3f13913fec7debe59259 | PCbuild |
040000 | tree | - | 75771c7c20fe7a121d596299c5440aef10c6f884 | Parser |
040000 | tree | - | 3efbcc80237ab7c3d4eb5bf31c893ca6de88e747 | Programs |
040000 | tree | - | 8f832869b53d99ee02d78ea0cc8491d3882222da | Python |
100644 | blob | 9325 | 9c95815d9e9d91b8dae8e05d8bbc696fe19f796b | README.rst |
040000 | tree | - | 66b8a7e032e5538a9a2e08422da3716c50e91a4b | Tools |
100644 | blob | 10910 | 9a9cc557281571f0d46c506c0e9d1b9fb25e063c | aclocal.m4 |
100755 | blob | 42856 | 1f5c50c0d1529d50b94dc3533ca72a47f0fa5849 | config.guess |
100755 | blob | 35740 | d654d03cdcd2226a5d7584890717e674a8122f4f | config.sub |
100755 | blob | 485283 | 87504d206837baf5a5781b6e1cc44dcce7138af9 | configure |
100644 | blob | 160661 | f9bd92ce3da29ea7674a32bd5fe511b1fc4c4d0a | configure.ac |
100755 | blob | 7122 | 0ec27bcd488da5cad6ead13d70accbdbc40d31ef | install-sh |
100644 | blob | 41449 | 21354a5cb84fe5530dd0d460561ba95569abe1d4 | pyconfig.h.in |
100644 | blob | 98743 | 3b3d097454211c790c1602d759918bb65a622c97 | setup.py |