[PATCH] Make tile's set_dataplane API compatibility-only

Joseph Myers joseph@codesourcery.com
Mon Nov 14 17:00:00 GMT 2016


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



More information about the Libc-alpha mailing list