[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Export AIX TLS symbols
From: |
Eric Blake |
Subject: |
Re: Export AIX TLS symbols |
Date: |
Tue, 24 Nov 2015 09:22:48 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 11/05/2015 10:43 AM, David Edelsohn wrote:
> TLS symbols in AIX display a new, different symbol type in nm output.
> Libtool explicitly creates a list of exported symbols for AIX shared
> libraries using nm and does not recognize the new TLS symbols, so
> those symbols are not exported in AIX shared libraries.
>
> This is a regression for TLS support on AIX where TLS symbols or GCC
> "emultls" symbols were listed as global data and exported.
>
> This patch updates libtool.m4 export_symbols_cmds for AIX in two
> locations so that global symbols labeled with "L" for TLS are included
> in the export list.
>
> * m4/libtool.m4 (export_symbols_cmds) [AIX]: Add global TLS "L" symbols.
>
>
> From 71f77c5bd66f09a5bd28614971e8ace1a39da991 Mon Sep 17 00:00:00 2001
> From: David Edelsohn <address@hidden>
> Date: Thu, 5 Nov 2015 09:43:02 -0800
> Subject: [PATCH] Export AIX TLS symbols
>
> ---
> m4/libtool.m4 | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/m4/libtool.m4 b/m4/libtool.m4
> index 3335def..2e8c3cf 100644
> --- a/m4/libtool.m4
> +++ b/m4/libtool.m4
> @@ -4932,7 +4932,7 @@ m4_if([$1], [CXX], [
> if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
> _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk
> '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W"))
> && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" }
> else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
> else
> - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e
> '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if
> (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2
> == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W")
> || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 }
> } }'\'' | sort -u > $export_symbols'
> + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e
> '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if
> (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2
> == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) {
> if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" }
> else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
> fi
> ;;
> pw32*)
> @@ -5386,7 +5386,7 @@ _LT_EOF
> if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
> _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk
> '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W"))
> && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" }
> else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
> else
> - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e
> '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if
> (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2
> == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W")
> || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 }
> } }'\'' | sort -u > $export_symbols'
> + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e
> '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if
> (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2
> == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) {
> if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" }
> else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
> fi
> aix_use_runtimelinking=no
>
> --
> 2.4.3
>
I'm not an AIX expert, and have no way to test it, but the explanation
is reasonable and I don't see how it can hurt (particularly since the
two changes are under "aix[[4-9]]*)" case blocks).
I'll go ahead and push this patch (assuming my commit rights are still
active) in 24 hours if no one speaks up to the contrary.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature