]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
sunrpc: Remove hidden aliases for global data symbols (bug 26210)
authorFlorian Weimer <fweimer@redhat.com>
Wed, 8 Jul 2020 05:58:51 +0000 (07:58 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 8 Jul 2020 06:39:39 +0000 (08:39 +0200)
It is generally not possible to add hidden aliases for global data
symbols: If the main executable contains a copy relocation against
the symbol, the hidden aliases keep pointing to the glibc-internal
copy of the symbol, instead of the symbol actually used by the
application.

Fixes commit 89aacb513eb77549a29df2638913a0f8178cf3f5 ("sunrpc:
Remove stray exports without --enable-obsolete-rpc [BZ #23166]").

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
include/rpc/clnt.h
include/rpc/svc.h
sunrpc/rpc_common.c

index 80be0a9cecc6f80337f560ceed13a311ba7b1924..a397023a9312bf5105eb4d796eb8666888c8ee77 100644 (file)
@@ -28,7 +28,6 @@ libc_hidden_proto (clntudp_create)
 libc_hidden_proto (get_myaddress)
 libc_hidden_proto (clntunix_create)
 libc_hidden_proto (__libc_clntudp_bufcreate)
-libc_hidden_proto (rpc_createerr)
 
 # endif /* !_ISOMAC */
 #endif
index 40ba2546a9b6abebd2e282d020c294736b65ad37..465bf4427d3c7e493e23832ba3a11f7820c27fe8 100644 (file)
@@ -3,10 +3,6 @@
 
 # ifndef _ISOMAC
 
-libc_hidden_proto (svc_pollfd)
-libc_hidden_proto (svc_max_pollfd)
-libc_hidden_proto (svc_fdset)
-
 libc_hidden_proto (xprt_register)
 libc_hidden_proto (xprt_unregister)
 libc_hidden_proto (svc_register)
index 2a5d0dc1c78d432ea13810a2f446eb0f79195311..05abab2a1dd48c8cc133f4cafa02cc10cc6fe5b5 100644 (file)
@@ -48,10 +48,14 @@ libc_hidden_nolink_sunrpc (_null_auth, GLIBC_2_0)
 /* The variables need the nocommon attribute, so that it is possible
    to create aliases and specify symbol versions.  */
 fd_set svc_fdset  __attribute__ ((nocommon));
-libc_hidden_nolink_sunrpc (svc_fdset, GLIBC_2_0)
 struct rpc_createerr rpc_createerr  __attribute__ ((nocommon));
-libc_hidden_nolink_sunrpc (rpc_createerr, GLIBC_2_0)
 struct pollfd *svc_pollfd  __attribute__ ((nocommon));
-libc_hidden_nolink_sunrpc (svc_pollfd, GLIBC_2_2)
 int svc_max_pollfd  __attribute__ ((nocommon));
-libc_hidden_nolink_sunrpc (svc_max_pollfd, GLIBC_2_2)
+#ifdef SHARED
+# ifndef EXPORT_RPC_SYMBOLS
+compat_symbol (libc, svc_fdset, svc_fdset, GLIBC_2_0);
+compat_symbol (libc, rpc_createerr, rpc_createerr, GLIBC_2_0);
+compat_symbol (libc, svc_pollfd, svc_pollfd, GLIBC_2_2);
+compat_symbol (libc, svc_max_pollfd, svc_max_pollfd, GLIBC_2_2);
+# endif
+#endif