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

David Edelsohn <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <CAGWvnymQHB-whOwUi4CmT9eJ0CAyxjD_Jehf8sQ=tF4_ZjE5mw@mail.gmail.com>
On Wed, Mar 2, 2016 at 11:19 AM, Michael Haubenwallner
<[email protected]> wrote:
> * 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.

Yes, another corner case that needs to be excluded.

Thanks, David

> ---
>  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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.