|
3 | 3 | # =========================================================================== |
4 | 4 | # FILE: makexp_aix |
5 | 5 | # TYPE: standalone executable |
6 | | -# SYSTEM: AIX 3.2.5 and AIX 4 |
| 6 | +# SYSTEM: AIX |
7 | 7 | # |
8 | 8 | # DESCRIPTION: This script creates an export list of ALL global symbols |
9 | 9 | # from a list of object or archive files. |
@@ -48,34 +48,24 @@ echo "*" >> $expFileName |
48 | 48 | echo "* $notemsg" >> $expFileName |
49 | 49 | echo "*" >> $expFileName |
50 | 50 |
|
51 | | -# Extract the symbol list using 'nm' which produces quite |
52 | | -# different output under AIX 4 than under AIX 3.2.5. |
53 | | -# The following handles both versions by using a common flagset. |
| 51 | +# Extract the symbol list using 'nm' |
54 | 52 | # Here are some hidden tricks: |
55 | | -# 1. Use /usr/ccs/bin/nm. Relevant to AIX 3.2.5 which has |
56 | | -# another version under /usr/ucb/bin/nm. |
57 | | -# 2. Use the -B flag to have a standard BSD representation |
58 | | -# of the symbol list on both AIX 3.2.5 and AIX 4. The "-B" |
59 | | -# flag is missing in the AIX 3.2.5 online usage help of 'nm'. |
60 | | -# 3. Use the -x flag to have a hex representation of the symbol |
61 | | -# values. This fills the leading whitespaces on AIX 4, |
62 | | -# thus simplifying the sed statement. |
63 | | -# 4. Eliminate all entries except those with either "B", "D" |
64 | | -# or "T" key letters. We are interested only in the global |
65 | | -# (extern) BSS, DATA and TEXT symbols. With the same statement |
66 | | -# we eliminate object member lines relevant to AIX 4. |
67 | | -# 5. Eliminate entries containing a dot. We can have a dot only |
68 | | -# as a symbol prefix, but such symbols are undefined externs. |
69 | | -# 6. Eliminate everything including the key letter, so that we're |
70 | | -# left with just the symbol name. |
71 | | -# 7. Eliminate all entries containing two colons, like Class::method |
| 53 | +# - Use the -B flag to have a standard BSD representation |
| 54 | +# of the symbol list. |
| 55 | +# - Use the -x flag to have a hex representation of the symbol |
| 56 | +# values. This fills the leading whitespaces, thus simplifying |
| 57 | +# the sed statement. |
| 58 | +# - Eliminate all entries except those with either "B", "D" |
| 59 | +# or "T" key letters. We are interested only in the global |
| 60 | +# (extern) BSS, DATA and TEXT symbols. With the same statement |
| 61 | +# we eliminate object member lines relevant to AIX 4. |
| 62 | +# - Eliminate entries containing a dot. We can have a dot only |
| 63 | +# as a symbol prefix, but such symbols are undefined externs. |
| 64 | +# - Eliminate everything including the key letter, so that we're |
| 65 | +# left with just the symbol name. |
| 66 | +# - Eliminate all entries containing two colons, like Class::method |
72 | 67 | # |
73 | 68 |
|
74 | | -# Use -X32_64 if it appears to be implemented in this version of 'nm'. |
75 | | -NM=/usr/ccs/bin/nm |
76 | | -xopt=-X32_64 |
77 | | -$NM -e $xopt $1 >/dev/null 2>&1 || xopt="" |
78 | | - |
79 | | -$NM -Bex $xopt $inputFiles \ |
| 69 | +/usr/ccs/bin/nm -Bex -X32_64 $inputFiles \ |
80 | 70 | | sed -e '/ [^BDT] /d' -e '/\./d' -e 's/.* [BDT] //' -e '/::/d' \ |
81 | 71 | | sort | uniq >> $expFileName |
0 commit comments