aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authoriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>2018-12-23 20:44:29 +0000
committeriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>2018-12-23 20:44:29 +0000
commite3378dd274c8462fbb53b03a0f1ec2cafd9323be (patch)
tree0b55e1c5b64020554e9785c6b3a4885e11c6e18f /libstdc++-v3
parent3d998e7482fac43396dc49c162bd679ad367273a (diff)
darwin, libstdc++, don't try to export construction vtable symbols.
The symbols are marked hidden in the objects; for Darwin that makes them also external (“private_extern” is Darwin’s hidden) which means that they show up in the list of possible symbols for export from libstdc++, and there are sufficiently relaxed match conditions that they reach the exports list. When Darwin’s static linker encounters them it generates a warning that they cannot be exported. This patch prunes them from the list of symbols to be considered, thus eliminating the warnings. 2018-12-23 Iain Sandoe <iain@sandoe.co.uk> Backport from mainline 2018-12-06 Iain Sandoe <iain@sandoe.co.uk> * scripts/make_exports.pl (check names): Don’t try to export construction vtable symbols. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@267385 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog8
-rw-r--r--libstdc++-v3/scripts/make_exports.pl8
2 files changed, 16 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 9eee477d2b0..d198ad98313 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,11 @@
+2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
+
+ Backport from mainline
+ 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
+
+ * scripts/make_exports.pl (check names): Don’t try to export
+ construction vtable symbols.
+
2018-12-22 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
diff --git a/libstdc++-v3/scripts/make_exports.pl b/libstdc++-v3/scripts/make_exports.pl
index 7c9e4e31d4f..93100e17ddf 100644
--- a/libstdc++-v3/scripts/make_exports.pl
+++ b/libstdc++-v3/scripts/make_exports.pl
@@ -103,6 +103,14 @@ NAME: while (<NM>) {
# Ignore undefined and local symbols.
next if (/^([^ ]+) [Ua-z] /);
+ # GCC does not export construction vtables from shared libraries.
+ # However the symbols are marked hidden, for Darwin that makes them
+ # also external "private_extern", which means that they show up in
+ # this list. When ld64 encounters them it generates a warning that
+ # they cannot be exported, so trim them from the set now.
+ next if (/^construction vtable.*$/);
+ next if (/^__ZTC.*$/);
+
# $sym is the name of the symbol, $noeh_sym is the same thing with
# any '.eh' suffix removed.
die "unknown nm output $_" if (! /^([^ ]+) [A-Z] /);