summaryrefslogtreecommitdiff
path: root/odk/pack/copying/addsym-macosx.sh
blob: d3bac6e5e878017bbb33bdbff8cac22448396835 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

# This script is needed in the process of generating exported
# symbols list on Mac OS X

# Please note that the awk expression expects to get the output of 'nm -gx'!
# On Panther we have to filter out symbols with a value "1f" otherwise external
# symbols will erroneously be added to the generated export symbols list file.
awk -v SYMBOLSREGEXP="^__ZTI.*$|^__ZTS.*$" '
match ($6,SYMBOLSREGEXP) > 0 &&  $6 !~ /_GLOBAL_/ { if (($2 != 1) && ( $2 != "1f" ) ) print $6 }'