This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Make tile's set_dataplane API compatibility-only
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Chris Metcalf <cmetcalf at mellanox dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Mon, 14 Nov 2016 16:59:52 +0000
- Subject: Re: [PATCH] Make tile's set_dataplane API compatibility-only
- Authentication-results: sourceware.org; auth=none
- References: <1479142545-13207-1-git-send-email-cmetcalf@mellanox.com>
On Mon, 14 Nov 2016, Chris Metcalf wrote:
> diff --git a/sysdeps/unix/sysv/linux/tile/set_dataplane.c b/sysdeps/unix/sysv/linux/tile/set_dataplane.c
> index 5a4bffe4f311..e2ea896e88d0 100644
> --- a/sysdeps/unix/sysv/linux/tile/set_dataplane.c
> +++ b/sysdeps/unix/sysv/linux/tile/set_dataplane.c
> @@ -23,9 +23,9 @@
> #include <sys/dataplane.h>
> #endif
>
> -/* Request dataplane modes from the kernel. */
> +/* Request dataplane modes from the kernel (compatibility only). */
> int
> -set_dataplane (int flags)
> +__old_set_dataplane (int flags)
> {
> #ifdef __NR_set_dataplane
> return INLINE_SYSCALL (set_dataplane, 1, flags);
> @@ -34,3 +34,7 @@ set_dataplane (int flags)
> return -1;
> #endif
> }
> +
> +#if SHLIB_COMPAT (libc, GLIBC_2_12, GLIBC_2_25)
> +compat_symbol (libc, __old_set_dataplane, set_dataplane, GLIBC_2_12);
> +#endif
I'd expect the function definition to be under the SHLIB_COMPAT
conditional as well, so the object file has no code in the static libc.
--
Joseph S. Myers
joseph@codesourcery.com