glibc/sysdeps/unix/sysv/linux/sys
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
..
acct.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
epoll.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
eventfd.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fanotify.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fsuid.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
inotify.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
kd.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
klog.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
mount.h Update headers for Linux 4.0, 4.1 definitions. 2015-06-29 14:38:46 +00:00
pci.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
personality.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
prctl.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
procfs.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ptrace.h Update <sys/ptrace.h> for Linux 4.3. 2015-11-23 17:53:08 +00:00
quota.h
raw.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
reboot.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
signalfd.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
soundcard.h
swap.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
syscall.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sysctl.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sysinfo.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sysmacros.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
timerfd.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
timex.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ttydefaults.h
ultrasound.h
user.h
vt.h