libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/2] AIX: Stop exporting any _GLOBAL__ symbol.


From: Michael Haubenwallner
Subject: [PATCH 2/2] AIX: Stop exporting any _GLOBAL__ symbol.
Date: Wed, 2 Mar 2016 17:19:23 +0100

* m4/libtool.m4 (_LT_LINKER_SHLIBS): On AIX, GNU g++ generates
_GLOBAL__* symbols as, amongst others, landing pads for C++ exceptions.
These symbols must not be exported from shared libraries, or exception
handling may break for applications with runtime linking enabled.
---
 m4/libtool.m4 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 6134522..c8a878f 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -5042,6 +5042,7 @@ m4_if([$1], [CXX], [
   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
   case $host_os in
   aix[[4-9]]*)
+    _LT_TAGVAR(exclude_expsyms, $1)='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | 
$global_symbol_pipe | $EGREP -v " ($exclude_expsyms)$" | awk '\''{ kw = "" } 
/^[[VWZ]] / { kw = " weak" } { print $ 3 kw }'\'' | sort -u > $export_symbols'
     ;;
   pw32*)
@@ -5485,6 +5486,7 @@ _LT_EOF
        exp_sym_flag='-Bexport'
        no_entry_flag=
       else
+       _LT_TAGVAR(exclude_expsyms, $1)='_GLOBAL_OFFSET_TABLE_|_GLOBAL__.*'
        _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | 
$global_symbol_pipe | $EGREP -v " ($exclude_expsyms)$" | awk '\''{ kw = "" } 
/^[[VWZ]] / { kw = " weak" } { print $ 3 kw }'\'' | sort -u > $export_symbols'
        aix_use_runtimelinking=no
 
-- 
2.4.6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]