glibc/sysdeps
Joseph Myers eed3e1eb79 Make obsolete syscall wrappers into compat symbols (bug 18472).
Various Linux kernel syscalls have become obsolete over time.
Specifically, the following are obsolete in all kernel versions
supported by glibc, are not present for architectures more recently
added to the kernel, and as such, the wrapper functions for them
should be compat symbols, not in static libc and not available for new
links with shared libc.

* bdflush: in Linux 2.6, does nothing if present.

* create_module get_kernel_syms query_module: Linux 2.4 module
  interface, syscalls not present in Linux 2.6.

* uselib: part of the mechanism for loading a.out shared libraries,
  irrelevant with ELF.

This patch adds support for syscalls.list to list syscall aliases of
the form NAME@VERSION:OBSOLETED, with SHLIB_COMPAT conditionals being
generated for such aliases.  Those five syscalls are then made into
compat symbols (obsoleted in glibc 2.23, so future ports won't have
these symbols at all), with the header <sys/kdaemon.h> declaring
bdflush being removed.  When we move to 3.2 as minimum kernel version,
the same can be done for nfsservctl (removed in Linux 3.1) as well.

Tested for x86_64 and x86 (testsuite, as well as checking that the
symbols in question indeed become compat symbols, that they are indeed
omitted from static libc, and that the generated SHLIB_COMPAT
conditionals look right).

	[BZ #18472]
	* sysdeps/unix/Makefile ($(objpfx)stub-syscalls.c): Handle entries
	for the form NAME@VERSION:OBSOLETED and generate SHLIB_COMPAT
	conditionals for them.
	* sysdeps/unix/make-syscalls.sh (emit_weak_aliases): Likewise.
	* sysdeps/unix/sysv/linux/sys/kdaemon.h: Remove file.
	* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Remove
	sys/kdaemon.h.
	* sysdeps/unix/sysv/linux/syscalls.list (bdflush): Make into
	compat-only syscall, obsoleted in glibc 2.23.
	(create_module): Likewise.
	(get_kernel_syms): Likewise.
	(query_module): Likewise.
	(uselib): Likewise.
	* manual/sysinfo.texi (System Parameters): Do not mention bdflush.
2015-12-14 22:52:15 +00:00
..
aarch64 [AArch64] Regenerate libm-test-ulps 2015-12-01 12:57:16 +00:00
alpha Move bits/atomic.h to atomic-machine.h (bug 14912). 2015-09-11 20:00:19 +00:00
arm math: add LDBL_CLASSIFY_COMPAT support 2015-12-03 13:00:46 -05:00
generic Replace MUTEX_INITIALIZER with _LIBC_LOCK_INITIALIZER in generic code 2015-11-24 16:37:15 +01:00
gnu Rename localedir to complocaledir (bug 14259). 2015-11-27 10:22:38 -05:00
hppa Fix math_private.h multiple include guards. 2015-11-20 23:46:23 +00:00
i386 Fix hurd build with hidden support 2015-11-25 02:35:18 +01:00
ia64 Fix lgamma setting signgam for ISO C (bug 15421). 2015-11-20 22:49:59 +00:00
ieee754 Fix indentation. 2015-12-11 09:19:37 -08:00
init_array NPTL: Initializer for .init_array-only configurations. 2015-02-13 13:19:11 -08:00
m68k math: add LDBL_CLASSIFY_COMPAT support 2015-12-03 13:00:46 -05:00
mach Add __CPU_MASK_TYPE for __cpu_mask 2015-12-01 10:25:44 -08:00
microblaze math: add LDBL_CLASSIFY_COMPAT support 2015-12-03 13:00:46 -05:00
mips mips: fix testsuite build for O32 FPXX ABI on pre-R2 CPU 2015-12-09 19:03:46 +01:00
nacl Add __CPU_MASK_TYPE for __cpu_mask 2015-12-01 10:25:44 -08:00
nios2 math: add LDBL_CLASSIFY_COMPAT support 2015-12-03 13:00:46 -05:00
nptl Replace MUTEX_INITIALIZER with _LIBC_LOCK_INITIALIZER in generic code 2015-11-24 16:37:15 +01:00
posix Remove signal handling for nanosleep (bug 16364) 2015-11-20 11:16:07 -02:00
powerpc powerpc: Add hwcap/hwcap2/platform data to TCB. 2015-12-03 13:56:13 -02:00
pthread Convert 113 more function definitions to prototype style (files with assertions). 2015-10-20 11:54:09 +00:00
s390 S390: Use __asm__ instead of asm. 2015-11-20 08:56:40 +01:00
sh math: add LDBL_CLASSIFY_COMPAT support 2015-12-03 13:00:46 -05:00
sparc Convert 69 more function definitions to prototype style (line wrap cases). 2015-10-19 21:23:47 +00:00
tile tile: define __NO_LONG_DOUBLE_MATH 2015-11-24 14:09:31 -05:00
unix Make obsolete syscall wrappers into compat symbols (bug 18472). 2015-12-14 22:52:15 +00:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wordsize-64 Add LFS support for fts functions (bug 11460) 2015-11-06 11:24:16 +01:00
x86 Utilize x86_64 vector math functions w/o -fopenmp. 2015-12-07 21:58:26 +03:00
x86_64 Better workaround for aliases of *_finite symbols in vector math library. 2015-11-27 16:22:26 +03:00