From 48eb7a94e292efcbbd74902322252a99cbf74fb9 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 24 Oct 2014 12:57:59 +0000 Subject: Move some chown / lchown / fchown definitions to syscalls.list (bug 14138). Continuing the move of syscall definitions to syscalls.list, where the removal of support for old kernel versions has made this possible, this patch moves various definitions of chown, lchown and fchown. In most cases the need for special syscalls.list entries (rather than existing generic ones) is because these architectures use chown32, lchown32 and fchown32 as syscall names. Some architectures also have symbol versioning compatibility for older versions of chown having been equivalent to lchown. The aliases specified for s390-32 had the effect of exporting __chown@@GLIBC_2.1 (but not __chown@GLIBC_2.0) despite it not being listed in Versions files. (I'm not sure why versioned_symbol but not compat_symbol were effective like that to create such __chown exports in the absence of Versions entries.) The natural way to preserve that versioned export of __chown seems to be to add it in a Versions file, so I did so. (Maybe actually it should be a compat symbol, __chown@GLIBC_2.1, unless there's a good reason for that export, but this patch doesn't change anything there.) Tested for x86. [BZ #14138] * sysdeps/unix/sysv/linux/i386/chown.c: Remove file. * sysdeps/unix/sysv/linux/i386/fchown.c: Likewise. * sysdeps/unix/sysv/linux/i386/lchown.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/chown.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/fchown.c: Remove file. * sysdeps/unix/sysv/linux/s390/s390-32/lchown.c: Likewise. * sysdeps/unix/sysv/linux/sh/chown.c: Likewise. * sysdeps/unix/sysv/linux/sh/fchown.c: Likewise. * sysdeps/unix/sysv/linux/sh/lchown.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/chown.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/fchown.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/lchown.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/Versions (GLIBC_2.1): Add __chown. * sysdeps/unix/sysv/linux/i386/syscalls.list (chown): Add syscall. (lchown): Likewise. (fchown): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (chown): Likewise. (lchown): Likewise. (fchown): Likewise. * sysdeps/unix/sysv/linux/sh/syscalls.list (chown): Likewise. (lchown): Likewise. (fchown): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (chown): Likewise. (lchown): Likewise. (fchown): Likewise. --- sysdeps/unix/sysv/linux/sparc/sparc32/chown.c | 1 - sysdeps/unix/sysv/linux/sparc/sparc32/fchown.c | 1 - sysdeps/unix/sysv/linux/sparc/sparc32/lchown.c | 1 - sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list | 4 ++++ 4 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/chown.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/fchown.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/lchown.c (limited to 'sysdeps/unix/sysv/linux/sparc') diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/chown.c b/sysdeps/unix/sysv/linux/sparc/sparc32/chown.c deleted file mode 100644 index 374131695c..0000000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/chown.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/fchown.c b/sysdeps/unix/sysv/linux/sparc/sparc32/fchown.c deleted file mode 100644 index 3a69ecc9e7..0000000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/fchown.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/lchown.c b/sysdeps/unix/sysv/linux/sparc/sparc32/lchown.c deleted file mode 100644 index c89de99ba2..0000000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/lchown.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list index 3d70185474..e71a044028 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list @@ -1,5 +1,9 @@ # File name Caller Syscall name # args Strong name Weak names +chown - chown32 i:sii __chown chown +lchown - lchown32 i:sii __lchown lchown +fchown - fchown32 i:iii __fchown fchown + setrlimit - setrlimit 2 __setrlimit setrlimit getrlimit - getrlimit 2 __getrlimit getrlimit getresuid - getresuid32 3 getresuid -- cgit 1.4.1