xref: /trunk/main/odk/pack/copying/addsym-macosx.sh (revision cdf0e10c)
1*cdf0e10cSrcweir#!/bin/bash
2*cdf0e10cSrcweir
3*cdf0e10cSrcweir# This script is needed in the process of generating exported
4*cdf0e10cSrcweir# symbols list on Mac OS X
5*cdf0e10cSrcweir
6*cdf0e10cSrcweir# Please note that the awk expression expects to get the output of 'nm -gx'!
7*cdf0e10cSrcweir# On Panther we have to filter out symbols with a value "1f" otherwise external
8*cdf0e10cSrcweir# symbols will erroneously be added to the generated export symbols list file.
9*cdf0e10cSrcweirawk -v SYMBOLSREGEXP="^__ZTI.*$|^__ZTS.*$" '
10*cdf0e10cSrcweirmatch ($6,SYMBOLSREGEXP) > 0 &&  $6 !~ /_GLOBAL_/ { if (($2 != 1) && ( $2 != "1f" ) ) print $6 }'
11*cdf0e10cSrcweir
12