From cbd9a236fabf26dfb35dbe585572fa38b6f767c4 Mon Sep 17 00:00:00 2001 From: Josef 'Jeff' Sipek Date: Fri, 6 Jul 2018 12:54:03 -0400 Subject: [PATCH] libc: remove __threaded compatibility symbol --- FEATURES.txt | 2 +- usr/src/cmd/abi/appcert/etc/etc.alt.in | 2 +- usr/src/cmd/sgs/libelf/common/data.c | 9 +++------ usr/src/lib/libc/port/mapfile-vers | 1 - usr/src/lib/libc/port/threads/thr.c | 16 +--------------- 5 files changed, 6 insertions(+), 24 deletions(-) diff --git a/FEATURES.txt b/FEATURES.txt index 6e370c1be2..48290c50ae 100644 --- a/FEATURES.txt +++ b/FEATURES.txt @@ -10,7 +10,7 @@ was changed. release -------------- - hsfs-formatted boot archive support - - libc compat symbols: _nuname, __posix_readdir_r + - libc compat symbols: _nuname, __posix_readdir_r, __threaded 1.0 release ----------- diff --git a/usr/src/cmd/abi/appcert/etc/etc.alt.in b/usr/src/cmd/abi/appcert/etc/etc.alt.in index 50165f4635..6734dd7e73 100644 --- a/usr/src/cmd/abi/appcert/etc/etc.alt.in +++ b/usr/src/cmd/abi/appcert/etc/etc.alt.in @@ -42,7 +42,7 @@ ############################################################################### ALT_USAGE:libsocket_strong_symbols:libsocket.so weak/strong pairs:libsocket.so.1:_socket|_connect|_recv|_setsockopt|_getsockopt|_getsockname|_getpeername|_bind|_accept|_send|_socketpair|_shutdown|_sendto|_sendmsg|_recvmsg|_recvfrom|_listen|_setpeername|_socketpair_bsd|_socket_bsd: ############################################################################### -ALT_USAGE:inadvertant_static_linking:static linking inadevertantly brings in private symbols:*:__getcontext|__sigaction|__threaded|_bufsync|_cerror|_dgettext|_doprnt|_doscan|_ecvt|_fcvt|_findbuf|_findiop|_getsp|_memcmp|_memmove|_memset|_mutex_unlock|_psignal|_realbufend|_setbufend|_siguhandler|_smbuf|_thr_getspecific|_thr_keycreate|_thr_main|_thr_setspecific|_xflsbuf|gtty|stty: +ALT_USAGE:inadvertant_static_linking:static linking inadevertantly brings in private symbols:*:__getcontext|__sigaction|_bufsync|_cerror|_dgettext|_doprnt|_doscan|_ecvt|_fcvt|_findbuf|_findiop|_getsp|_memcmp|_memmove|_memset|_mutex_unlock|_psignal|_realbufend|_setbufend|_siguhandler|_smbuf|_thr_getspecific|_thr_keycreate|_thr_main|_thr_setspecific|_xflsbuf|gtty|stty: ############################################################################### ALT_USAGE:getdomainname:possible getdomainname() replacements:libnsl.so.1:getdomainname: ############################################################################### diff --git a/usr/src/cmd/sgs/libelf/common/data.c b/usr/src/cmd/sgs/libelf/common/data.c index ab57231401..c3efd97f87 100644 --- a/usr/src/cmd/sgs/libelf/common/data.c +++ b/usr/src/cmd/sgs/libelf/common/data.c @@ -48,12 +48,9 @@ */ /* - * __libc_threaded is a private symbol exported from libc in Solaris 10. - * It is used to tell if we are running in a threaded world or not. - * Between Solaris 2.5 and Solaris 9, this was named __threaded. - * The name had to be changed because the Sun Workshop 6 update 1 - * compilation system used it to mean "we are linked with libthread" - * rather than its true meaning in Solaris 10, "more than one thread exists". + * __libc_threaded is a private symbol exported from libc. It is used to + * tell if we are running in a threaded world or not. That is, "more than + * one thread exists". */ #pragma weak __libc_threaded extern int __libc_threaded; diff --git a/usr/src/lib/libc/port/mapfile-vers b/usr/src/lib/libc/port/mapfile-vers index f64180e15a..0e1e8dc6e1 100644 --- a/usr/src/lib/libc/port/mapfile-vers +++ b/usr/src/lib/libc/port/mapfile-vers @@ -2787,7 +2787,6 @@ SYMBOL_VERSION SUNWprivate_1.1 { __strdupa_str { FLAGS = NODIRECT }; __strdupa_len { FLAGS = NODIRECT }; _tdb_bootstrap; - __threaded; thr_probe_getfunc_addr; __trans_lower; __trans_upper; diff --git a/usr/src/lib/libc/port/threads/thr.c b/usr/src/lib/libc/port/threads/thr.c index d86d441532..602cf01c2e 100644 --- a/usr/src/lib/libc/port/threads/thr.c +++ b/usr/src/lib/libc/port/threads/thr.c @@ -51,15 +51,8 @@ extern int errno; /* - * Between Solaris 2.5 and Solaris 9, __threaded was used to indicate - * "we are linked with libthread". The Sun Workshop 6 update 1 compilation - * system used it illegally (it is a consolidation private symbol). - * To accommodate this and possibly other abusers of the symbol, - * we make it always equal to 1 now that libthread has been folded - * into libc. The new __libc_threaded symbol is used to indicate - * the new meaning, "more than one thread exists". + * __libc_threaded symbol indicates that "more than one thread exists". */ -int __threaded = 1; /* always equal to 1 */ int __libc_threaded = 0; /* zero until first thr_create() */ /* @@ -1502,13 +1495,6 @@ libc_init(void) init_sigev_thread(); init_aio(); - - /* - * We need to reset __threaded dynamically at runtime, so that - * __threaded can be bound to __threaded outside libc which may not - * have initial value of 1 (without a copy relocation in a.out). - */ - __threaded = 1; } #pragma fini(libc_fini) -- 2.11.4.GIT