summaryrefslogtreecommitdiff
path: root/odk/pack/copying/addsym-macosx.sh
diff options
context:
space:
mode:
Diffstat (limited to 'odk/pack/copying/addsym-macosx.sh')
-rwxr-xr-xodk/pack/copying/addsym-macosx.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/odk/pack/copying/addsym-macosx.sh b/odk/pack/copying/addsym-macosx.sh
new file mode 100755
index 000000000000..d3bac6e5e878
--- /dev/null
+++ b/odk/pack/copying/addsym-macosx.sh
@@ -0,0 +1,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 }'
+