about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/i386
Commit message (Collapse)AuthorAgeFilesLines
* Fix i386 build for lll_unlock_elision change.Joseph Myers2015-10-161-1/+1
| | | | | | | Tested for i386. * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_unlock_elision): Add adapt_count parameter.
* Add comments for GCC 5 requirementH.J. Lu2015-10-151-0/+4
| | | | | * sysdeps/unix/sysv/linux/i386/sysdep.h: Add comments for GCC 5 requirement.
* Remove i386/epoll_pwait.SH.J. Lu2015-10-152-78/+1
| | | | | | | | | | | | | | | | | | | | | | | | Only i386 implements epoll_pwait in assembly code withot cancellation support. All other architectures implement epoll_pwait in epoll_pwait.c with int epoll_pwait (int epfd, struct epoll_event *events, int maxevents, int timeout, const sigset_t *set) { return SYSCALL_CANCEL (epoll_pwait, epfd, events, maxevents, timeout, set, _NSIG / 8); } Although there is no test for epoll_pwait in glibc, since SYSCALL_CANCEL works on i386 and epoll_pwait.c works for other architectures, it is safe to assume that epoll_pwait.c with SYSCALL_CANCEL also works on i386. [BZ #19137] * sysdeps/unix/sysv/linux/i386/Makefile (CFLAGS-epoll_pwait.c): Add -fomit-frame-pointer. * sysdeps/unix/sysv/linux/i386/epoll_pwait.S: Remove file.
* Optimize i386 syscall inlining for GCC 5H.J. Lu2015-10-152-11/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since GCC 5 and above can properly spill %ebx when needed, we can inline syscalls with 6 arguments if GCC 5 or above is used to compile glibc. This patch rewrites INTERNAL_SYSCALL macros and skips __libc_do_syscall for GCC 5. For sysdeps/unix/sysv/linux/i386/brk.c, with -O2 -march=i686 -mtune=generic, GCC 5.2 now generates: <__brk>: 0: push %ebx 1: mov $0x2d,%eax 6: mov 0x8(%esp),%ebx a: call b <__brk+0xb> b: R_386_PC32 __x86.get_pc_thunk.dx f: add $0x2,%edx 11: R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 15: call *%gs:0x10 1c: mov 0x0(%edx),%edx 1e: R_386_GOT32 __curbrk 22: cmp %eax,%ebx 24: mov %eax,(%edx) 26: ja 30 <__brk+0x30> 28: xor %eax,%eax 2a: pop %ebx 2b: ret instead of <__brk>: 0: push %ebx 1: mov 0x8(%esp),%ecx 5: call 6 <__brk+0x6> 6: R_386_PC32 __x86.get_pc_thunk.bx a: add $0x2,%ebx c: R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 10: xchg %ecx,%ebx 12: mov $0x2d,%eax 17: call *%gs:0x10 1e: xchg %ecx,%ebx 20: mov %eax,%edx 22: mov 0x0(%ebx),%eax 24: R_386_GOT32 __curbrk 28: mov %edx,(%eax) 2a: xor %eax,%eax 2c: cmp %edx,%ecx 2e: ja 38 <__brk+0x38> 30: pop %ebx 31: ret The new one is shorter by 2 instructions. * sysdeps/unix/sysv/linux/i386/libc-do-syscall.S (__libc_do_syscall): Defined only if !__GNUC_PREREQ (5,0). * sysdeps/unix/sysv/linux/i386/sysdep.h: Define assembler macros only if !__GNUC_PREREQ (5,0). (INTERNAL_SYSCALL_MAIN_6): Optimize for GCC 5. (INTERNAL_SYSCALL_MAIN_INLINE): Likewise. (INTERNAL_SYSCALL_NCS): Likewise. (LOADREGS_0): New macro for GCC 5. (ASMARGS_0): Likewise. (LOADREGS_1): Likewise. (ASMARGS_1): Likewise. (LOADREGS_2): Likewise. (ASMARGS_2): Likewise. (LOADREGS_3): Likewise. (ASMARGS_3): Likewise. (LOADREGS_4): Likewise. (ASMARGS_4): Likewise. (LOADREGS_5): Likewise. (ASMARGS_5): Likewise. (LOADREGS_6): Likewise. (ASMARGS_6): Likewise.
* i386: Remove syscall assembly codes with 6 argumentsH.J. Lu2015-10-155-268/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes i386 assembly implementation for mmap, mmap64, semtimeop now that i386 have 6 argument syscall support from C code and GCC 5 can inline syscalls with 6 arguments. We also compile mmap.c, mmap64.c and semtimedop.c with -fomit-frame-pointer since %ebp may be used to pass the 6th argument to syscall. Fo sysdeps/unix/sysv/linux/i386/mmap.c, with -O2 -march=i686 -mtune=generic, GCC 5.2 now generates: <__mmap>: 0: sub $0x10,%esp 3: mov 0x28(%esp),%eax 7: mov %ebx,(%esp) a: mov 0x18(%esp),%ecx e: mov %esi,0x4(%esp) 12: mov 0x14(%esp),%ebx 16: mov %edi,0x8(%esp) 1a: mov 0x1c(%esp),%edx 1e: test $0xfff,%eax 23: mov 0x20(%esp),%esi 27: mov %ebp,0xc(%esp) 2b: mov 0x24(%esp),%edi 2f: jne 60 <__mmap+0x60> 31: shr $0xc,%eax 34: mov %eax,%ebp 36: mov $0xc0,%eax 3b: call *%gs:0x10 42: cmp $0xfffff000,%eax 47: ja 65 <__mmap+0x65> 49: mov (%esp),%ebx 4c: mov 0x4(%esp),%esi 50: mov 0x8(%esp),%edi 54: mov 0xc(%esp),%ebp 58: add $0x10,%esp 5b: ret 5c: lea 0x0(%esi,%eiz,1),%esi 60: mov $0xffffffea,%eax 65: mov (%esp),%ebx 68: mov 0x4(%esp),%esi 6c: mov 0x8(%esp),%edi 70: mov 0xc(%esp),%ebp 74: add $0x10,%esp 77: jmp 78 <__mmap+0x78> vs sysdeps/unix/sysv/linux/i386/mmap.S: <__mmap>: 0: push %ebp 1: push %ebx 2: push %esi 3: push %edi 4: mov 0x14(%esp),%ebx 8: mov 0x18(%esp),%ecx c: mov 0x1c(%esp),%edx 10: mov 0x20(%esp),%esi 14: mov 0x24(%esp),%edi 18: mov 0x28(%esp),%ebp 1c: test $0xfff,%ebp 22: mov $0xffffffea,%eax 27: jne 38 <__mmap+0x38> 29: shr $0xc,%ebp 2c: mov $0xc0,%eax 31: call *%gs:0x10 38: pop %edi 39: pop %esi 3a: pop %ebx 3b: pop %ebp 3c: cmp $0xfffff000,%eax 41: ja 44 <__mmap+0x44> 43: ret 44: call 45 <__mmap+0x45> 45: R_386_PC32 __x86.get_pc_thunk.cx 49: add $0x2,%ecx 4b: R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 4f: mov 0x0(%ecx),%ecx 51: R_386_TLS_GOTIE __libc_errno 55: neg %eax 57: mov %eax,%gs:(%ecx) 5a: or $0xffffffff,%eax 5d: ret The C version has: 3: mov 0x28(%esp),%eax ... 1e: test $0xfff,%eax ... 31: sar $0xc,%eax 34: mov %eax,%ebp is due to missing $ebx register constraint for inline asm. We have to use "r" constraint with register unsigned int _a6 asm ("ebp") = (unsigned int) (arg6); and compiler chose %eax for offset (arg6) in if (offset & (MMAP_PAGE_UNIT - 1)) * sysdeps/unix/sysv/linux/i386/Makefile (CFLAGS-epoll_pwait.c): Add -fomit-frame-pointer. (CFLAGS-mmap.c): Likewise. (CFLAGS-mmap64.c): Likewise. (CFLAGS-semtimedop.c): Likewise. * sysdeps/unix/sysv/linux/i386/mmap.c: New file. * sysdeps/unix/sysv/linux/i386/mmap.S: Remove file. * sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise. * sysdeps/unix/sysv/linux/i386/semtimedop.S: Likewise.
* Support PLT and GOT references in local PIC checkH.J. Lu2015-10-141-8/+8
| | | | | | | | | | | | | | Linker in binutils 2.26 and newer generate GOT references instead PLT references when -z now is passed to linker. We need to extend scripts/localplt.awk to allow PLT or GOT references. [BZ #19007] * scripts/localplt.awk: Also allow GOT references. * sysdeps/unix/sysv/linux/i386/localplt.data: Mark _Unwind_Find_FDE, calloc, memalign, realloc and __libc_memalign with "+ REL R_386_GLOB_DAT". * sysdeps/x86_64/localplt.data: Mark calloc, memalign, realloc and __libc_memalign with "+ RELA R_X86_64_GLOB_DAT".
* Use INTERNAL_SYSCALL and INLINE_SYSCALL_ERROR_RETURN_VALUEH.J. Lu2015-10-149-47/+39
| | | | | | | | | | | | | | | | | | | | | | This patch uses INTERNAL_SYSCALL and INLINE_SYSCALL_ERROR_RETURN_VALUE to avoid reading and writing errno directly so that we don't need to call __x86.get_pc_thunk.reg to load PC into reg in case there is an error. * sysdeps/unix/sysv/linux/i386/brk.c (__brk): Use INLINE_SYSCALL_ERROR_RETURN_VALUE. * sysdeps/unix/sysv/linux/i386/fxstatat.c (__fxstatat): Likewise. * sysdeps/unix/sysv/linux/i386/setegid.c (setegid): Likewise. * sysdeps/unix/sysv/linux/i386/seteuid.c (seteuid): Likewise. * sysdeps/unix/sysv/linux/i386/fxstat.c (__fxstat): Use INTERNAL_SYSCALLINTERNAL_SYSCALL and INLINE_SYSCALL_ERROR_RETURN_VALUE. * sysdeps/unix/sysv/linux/i386/lockf64.c (lockf64): Likewise. * sysdeps/unix/sysv/linux/i386/lxstat.c (__lxstat): Likewise. * sysdeps/unix/sysv/linux/i386/sigaction.c (__libc_sigaction): Likewise. * sysdeps/unix/sysv/linux/i386/xstat.c (__xstat): Likewise.
* Add INLINE_SYSCALL_ERROR_RETURN_VALUEH.J. Lu2015-10-134-85/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For ia32 PIC, the first thing of many syscalls does is to call __x86.get_pc_thunk.reg to load PC into reg in case there is an error, which is required for setting errno. In most cases, there are no errors. But we still call __x86.get_pc_thunk.reg. This patch adds INLINE_SYSCALL_ERROR_RETURN_VALUE so that i386 can optimize setting errno by branching to the internal __syscall_error without PLT. With i386 INLINE_SYSCALL_ERROR_RETURN_VALUE and i386 syscall inlining optimization for GCC 5, for sysdeps/unix/sysv/linux/fchmodat.c with -O2 -march=i686 -mtune=generic, GCC 5.2 now generates: <fchmodat>: 0: push %ebx 1: mov 0x14(%esp),%eax 5: mov 0x8(%esp),%ebx 9: mov 0xc(%esp),%ecx d: mov 0x10(%esp),%edx 11: test $0xfffffeff,%eax 16: jne 38 <fchmodat+0x38> 18: test $0x1,%ah 1b: jne 48 <fchmodat+0x48> 1d: mov $0x132,%eax 22: call *%gs:0x10 29: cmp $0xfffff000,%eax 2e: ja 58 <fchmodat+0x58> 30: pop %ebx 31: ret 32: lea 0x0(%esi),%esi 38: pop %ebx 39: mov $0xffffffea,%eax 3e: jmp 3f <fchmodat+0x3f> 3f: R_386_PC32 __syscall_error 43: nop 44: lea 0x0(%esi,%eiz,1),%esi 48: pop %ebx 49: mov $0xffffffa1,%eax 4e: jmp 4f <fchmodat+0x4f> 4f: R_386_PC32 __syscall_error 53: nop 54: lea 0x0(%esi,%eiz,1),%esi 58: pop %ebx 59: jmp 5a <fchmodat+0x5a> 5a: R_386_PC32 __syscall_error instead of <fchmodat>: 0: sub $0x8,%esp 3: mov 0x18(%esp),%eax 7: mov %ebx,(%esp) a: call b <fchmodat+0xb> b: R_386_PC32 __x86.get_pc_thunk.bx f: add $0x2,%ebx 11: R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 15: mov %edi,0x4(%esp) 19: test $0xfffffeff,%eax 1e: jne 70 <fchmodat+0x70> 20: test $0x1,%ah 23: jne 88 <fchmodat+0x88> 25: mov 0x14(%esp),%edx 29: mov 0x10(%esp),%ecx 2d: mov 0xc(%esp),%edi 31: xchg %ebx,%edi 33: mov $0x132,%eax 38: call *%gs:0x10 3f: xchg %edi,%ebx 41: cmp $0xfffff000,%eax 46: ja 58 <fchmodat+0x58> 48: mov (%esp),%ebx 4b: mov 0x4(%esp),%edi 4f: add $0x8,%esp 52: ret 53: nop 54: lea 0x0(%esi,%eiz,1),%esi 58: mov 0x0(%ebx),%edx 5a: R_386_TLS_GOTIE __libc_errno 5e: neg %eax 60: mov %eax,%gs:(%edx) 63: mov $0xffffffff,%eax 68: jmp 48 <fchmodat+0x48> 6a: lea 0x0(%esi),%esi 70: mov 0x0(%ebx),%eax 72: R_386_TLS_GOTIE __libc_errno 76: movl $0x16,%gs:(%eax) 7d: mov $0xffffffff,%eax 82: jmp 48 <fchmodat+0x48> 84: lea 0x0(%esi,%eiz,1),%esi 88: mov 0x0(%ebx),%eax 8a: R_386_TLS_GOTIE __libc_errno 8e: movl $0x5f,%gs:(%eax) 95: mov $0xffffffff,%eax 9a: jmp 48 <fchmodat+0x48> * sysdeps/unix/sysv/linux/sysdep.h: New file. * sysdeps/unix/sysv/linux/i386/sysdep.c: Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep.h: Include <sysdeps/unix/sysv/linux/sysdep.h>. * sysdeps/unix/sysv/linux/arm/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/generic/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/hppa/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/i386/Makefile [$(subdir) == csu] (sysdep-dl-routines): Add sysdep. [$(subdir) == nptl] (libpthread-routines): Likewise. [$(subdir) == rt] (librt-routines): Likewise. * sysdeps/unix/sysv/linux/i386/clone.S (__clone): Don't check PIC when branching to SYSCALL_ERROR_LABEL. * sysdeps/unix/sysv/linux/i386/sysdep.S: Removed. * sysdeps/unix/sysv/linux/i386/sysdep.h: Include <sysdeps/unix/sysv/linux/sysdep.h>. (SYSCALL_ERROR_LABEL): Changed to __syscall_error. (SYSCALL_ERROR_ERRNO): Removed. (SYSCALL_ERROR_HANDLER): Changed to empty. (SYSCALL_ERROR_HANDLER_TLS_STORE): Likewise. (__syscall_error): New prototype. [IS_IN (libc)] (INLINE_SYSCALL): New macro. (INLINE_SYSCALL_ERROR_RETURN_VALUE): Likewise.
* Move sysdeps/unix/sysv/linux/i386/i486/*.? to i386H.J. Lu2015-09-3030-254/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since glibc doesn't support i386 any more, we can move sysdeps/unix/sysv/linux/i386/i486/*.? to i386. [BZ #19006] * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Moved to ... * sysdeps/unix/sysv/linux/i386/libc-lowlevellock.S: Here. * sysdeps/unix/sysv/linux/i386/i486/lll_timedlock_wait.c: Moved to ... * sysdeps/unix/sysv/linux/i386/lll_timedlock_wait.c: Here. * sysdeps/unix/sysv/linux/i386/i486/lll_timedwait_tid.c: Moved to ... * sysdeps/unix/sysv/linux/i386/lll_timedwait_tid.c: Here. * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Moved to ... * sysdeps/unix/sysv/linux/i386/lowlevellock.S: Here. * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Moved to ... * sysdeps/unix/sysv/linux/i386/lowlevelrobustlock.S: Here. * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Moved to ... * sysdeps/unix/sysv/linux/i386/pthread_barrier_wait.S: Here. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Moved to ... * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S: Here. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Moved to ... * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S: Here. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Moved to ... * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S: Here. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Moved to ... * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S: Here. * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Removed. * sysdeps/unix/sysv/linux/i386/i586/lll_timedlock_wait.c: Likewise. * sysdeps/unix/sysv/linux/i386/i586/lll_timedwait_tid.c: Likewise. * sysdeps/unix/sysv/linux/i386/i586/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: Likewise. * sysdeps/unix/sysv/linux/i386/i586/pthread_barrier_wait.S: Likewise. * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: Likewise. * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: Likewise. * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: Likewise. * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: Likewise. * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/i386/i686/lll_timedlock_wait.c: Likewise. * sysdeps/unix/sysv/linux/i386/i686/lll_timedwait_tid.c: Likewise. * sysdeps/unix/sysv/linux/i386/i686/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: Likewise. * sysdeps/unix/sysv/linux/i386/i686/pthread_barrier_wait.S: Likewise. * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: Likewise. * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: Likewise. * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: Likewise. * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: Replace ../i486/pthread_cond_timedwait.S with ../pthread_cond_timedwait.S.
* Remove __ASSUME_IPC64Andreas Schwab2015-08-243-244/+0
| | | | | | | PowerPC has always used __IPC_64 like most other architectures, which means that __ASSUME_IPC64 can be always true. Also, all other architecture implementations that use the ipc syscall are effectively identical to the generic version and can be removed.
* Call __setcontext with HIDDEN_JUMPTARGETH.J. Lu2015-08-192-6/+2
| | | | | | | | | | | i386 __makecontext should call __setcontext with HIDDEN_JUMPTARGET. [BZ #18822] * sysdeps/unix/sysv/linux/i386/makecontext.S (__makecontext): Don't load %ebx when calling __setcontext. Call __setcontext with HIDDEN_JUMPTARGET. * sysdeps/unix/sysv/linux/i386/setcontext.S (__setcontext): Add libc_hidden_def.
* Use x86-64 cacheinfo.c and sysconf.c for x86H.J. Lu2015-08-192-510/+0
| | | | | | | | | | | | | | | Since _dl_x86_cpu_features is always available, we can use x86-64 cacheinfo.c and sysconf.c for both i386 and x86-64. * sysdeps/i386/i686/Makefile [$(subdir) == string] (sysdep_routines): Moved to ... * sysdeps/i386/Makefile: Here. * sysdeps/i386/i686/cacheinfo.c: Moved to ... * sysdeps/i386/cacheinfo.c: Here. * sysdeps/unix/sysv/linux/i386/sysconf.c: Removed. * sysdeps/unix/sysv/linux/i386/i686/sysconf.c: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysconf.c: Moved to ... * sysdeps/unix/sysv/linux/x86/sysconf.c: Here.
* Properly terminate FDE in makecontext for ix86 (bug 18635)Andreas Schwab2015-08-041-1/+4
|
* Extend local PLT reference checkH.J. Lu2015-07-291-3/+5
| | | | | | | | | | | | | | On x86, linker in binutils 2.26 and newer consolidates R_*_JUMP_SLOT with R_*_GLOB_DAT relocation against the same symbol. This patch extends local PLT reference check to support alternate relocations. [BZ #18078] * scripts/check-localplt.awk: Support alternate relocations. * scripts/localplt.awk: Also check relocations in DT_RELA/DT_REL sections. * sysdeps/unix/sysv/linux/i386/localplt.data: Mark free and malloc entries with + REL R_386_GLOB_DAT. * sysdeps/x86_64/localplt.data: New file.
* PLT avoidance for _exit in rtld.Roland McGrath2015-07-091-0/+1
|
* libio: fmemopen rewrite to POSIX complianceAdhemerval Zanella2015-07-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch added a new fmemopen version, for glibc 2.22, that aims to be POSIX complaint. It fixes some long-stading glibc fmemopen issues, such as: * it changes the way fseek with SEEK_END works on fmemopen to seek relative to buffer size instead of first '\0'. This is default mode and 'b' opening mode does not change internal behavior (bz#6544). * fix apending opening mode to use as start position either first null byte of len specified in function call (bz#13152 and #13151). * remove binary option 'b' and internal different handling (bz#12836) * fix seek/SEE_END with negative values (bz#14292). A compatibility symbol is provided to with old behavior for older symbols version (2.2.5). * include/stdio.h (fmemopen): Remove hidden prototype. (__fmemopen): Add new hidden prototype. * libio/Makefile: Add oldfmemopen object. * libio/Versions [GLIBC_2.22]: Add new fmemopen symbol. * libio/fmemopen.c (__fmemopen): Function rewrite to be POSIX compliance. * libio/oldfmemopen.c: New file: old fmemopen implementation for symbol compatibility. * stdio-common/Makefile [tests]: Add new tst-fmemopen3. * stdio-common/psiginfo.c [psiginfo]: Call __fmemopen instead of fmemopen. * stdio-common/tst-fmemopen3.c: New file: more fmemopen tests, focus on append and read mode. * sysdeps/unix/sysv/linux/aarch64/libc.abilist [GLIBC_2.22]: Add fmemopen. * sysdeps/unix/sysv/linux/alpha/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/arm/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/microblaze/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/sh/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/hppa/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/nios2/libc.abilist [GLIBC_2.22]: Likewise.
* Clean up BUSY_WAIT_NOP and atomic_delay.Torvald Riegel2015-06-301-4/+0
| | | | | | | | | This patch combines BUSY_WAIT_NOP and atomic_delay into a new atomic_spin_nop function and adjusts all clients. The new function is put into atomic.h because what is best done in a spin loop is architecture-specific, and atomics must be used for spinning. The function name is meant to tell users that this has no effect on synchronization semantics but is a performance aid for spinning.
* Fix mq_notify pthread_barrier_* namespace (bug 18544).Joseph Myers2015-06-171-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mq_notify (present in POSIX by 1996) brings in references to pthread_barrier_init and pthread_barrier_wait (new in the 2001 edition of POSIX). This patch fixes this by making those functions into weak aliases of __pthread_barrier_*, exporting the __pthread_barrier_* names at version GLIBC_PRIVATE and using them in mq_notify. Tested for x86_64 and x86 (testsuite, and comparison of installed stripped shared libraries). Changes in addresses from dynamic symbol table / PLT changes render most comparisons not particularly useful, but when the addresses of subsequent code don't change there's no sign of unexpected changes there. This patch does not remove any linknamespace XFAILs because of other namespace issues remaining with mqueue.h functions. [BZ #18544] * nptl/pthread_barrier_init.c (pthread_barrier_init): Rename to __pthread_barrier_init and define as weak alias of __pthread_barrier_init. * sysdeps/sparc/nptl/pthread_barrier_init.c (pthread_barrier_init): Likewise. * nptl/pthread_barrier_wait.c (pthread_barrier_wait): Rename to __pthread_barrier_wait and define as weak alias of __pthread_barrier_wait. * sysdeps/sparc/nptl/pthread_barrier_wait.c (pthread_barrier_wait): Likewise. * sysdeps/sparc/sparc32/pthread_barrier_wait.c (pthread_barrier_wait): Likewise. * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S (pthread_barrier_wait): Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S (pthread_barrier_wait): Likewise. * nptl/Versions (libpthread): Export __pthread_barrier_init and __pthread_barrier_wait at version GLIBC_PRIVATE. * include/pthread.h (__pthread_barrier_init): Declare. (__pthread_barrier_wait): Likewise. * sysdeps/unix/sysv/linux/mq_notify.c (notification_function): Call __pthread_barrier_wait instead of pthread_barrier_wait. (helper_thread): Likewise. (init_mq_netlink): Call __pthread_barrier_init instead of pthread_barrier_init.
* x86: Remove vsyscall usageAdhemerval Zanella2015-06-092-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the vsyscall usage for x86_64 port. As indicated by kernel code comments [1], vsyscalls are a legacy ABI and its concept is problematic: - It interferes with ASLR. - It's awkward to write code that lives in kernel addresses but is callable by userspace at fixed addresses. - The whole concept is impossible for 32-bit compat userspace. - UML cannot easily virtualize a vsyscall. The VDSO is a better approach for such functionality. Tested on i686, x86_64, and x32. * sysdeps/unix/sysv/linux/i386/gettimeofday.c (__gettimeofday_syscall): Remove vsyscall fallback. * sysdeps/unix/sysv/linux/i386/time.c (__time_syscall): Likewise. * sysdeps/unix/sysv/linux/x86/gettimeofday.c (__gettimeofday_syscall): Add syscall fallback function. (gettimeofday_ifunc): Use __gettimeofday_syscall as fallback mechanism if vDSO is not present. * sysdeps/unix/sysv/linux/x86/time.c (__time_syscall): Add syscall fallback function. (time_ifunc): Use __time_syscall as fallback mechanism if vDSO is not present. * sysdeps/unix/sysv/linux/x86_64/gettimeofday.c: Remove file. * sysdeps/unix/sysv/linux/x86_64/time.c: Likewise. [1] arch/x86/kernel/vsyscall_64.c
* nptl: Rewrite cancellation macrosAdhemerval Zanella2015-06-041-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the way cancellation entrypoints are defined to instead call the macro SYSCALL_CANCEL. An usual cnacellation definition is defined as: if (SINGLE_THREAD_P) return INLINE_SYSCALL (syscall, NARGS, args...) int oldtype = LIBC_CANCEL_ASYNC (); return INLINE_SYSCALL (syscall, NARGS, args...) LIBC_CANCEL_RESET (oldtype); And it is rewrited as just: SYSCALL_CANCEL (syscall, args...) The idea is to remove LIBC_CANCEL_ASYNC/LIBC_CANCEL_RESET explicit usage. Tested on i386, x86_64, powerpc32, powerpc64le, arm, and aarch64. * sysdeps/unix/sysdep.h [SYSCALL_CANCEL]: New macro: define cancellable syscalls. (SYS_ify): Add guard to no redefine it. (INLINE_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/accept4.c (accept4): Remove LIBC_CANCEL_ASYNC/INLINE_SYSCALL/LIBC_CANCEL_RESET and use SYSCALL_CANCEL instead. * sysdeps/unix/sysv/linux/alpha/fdatasync.c (__fdatasync): Likewise. * sysdeps/unix/sysv/linux/arm/pread.c (__libc_pread): Likewise. * sysdeps/unix/sysv/linux/arm/pread64.c (__libc_pread64): Likewise. * sysdeps/unix/sysv/linux/arm/pwrite.c (__libc_pwrite): Likewise. * sysdeps/unix/sysv/linux/arm/pwrite64.c (__libc_pwrite64): Likewise. * sysdeps/unix/sysv/linux/epoll_pwait.c (epoll_pwait): Likewise. * sysdeps/unix/sysv/linux/fallocate.c (fallocate): Likewise. * sysdeps/unix/sysv/linux/fallocate64.c (fallocate64): Likewise. * sysdeps/unix/sysv/linux/generic/open.c (__libc_open): Likewise. * sysdeps/unix/sysv/linux/generic/open64.c (__libc_open64): Likewise. * sysdeps/unix/sysv/linux/generic/pause.c (__libc_pause): Likewise. * sysdeps/unix/sysv/linux/generic/poll.c (__poll): Likewise. * sysdeps/unix/sysv/linux/generic/recv.c (__libc_recv): Likewise. * sysdeps/unix/sysv/linux/generic/select.c (__select): Likewise. * sysdeps/unix/sysv/linux/generic/send.c (__libc_send): Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c (__libc_pread): Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c (__libc_pread64): Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c (__libc_preadv): Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c (__libc_readv64): Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c (__libc_pwrite): Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c (__libc_pwrite64): Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c (__libc_pwritev): Likewise. * sysdeps/sysv/linux/generic/wordsize-32/pwritev64.c (__libc_pwritev64): Likewise. * sysdeps/unix/sysv/linux/i386/fcntl.c (__libc_fcntl): Likewise. * sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c (sync_file_range): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c (fallocate): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c (fallocate64): Likewise. * sysdeps/unix/sysv/linux/mips/pread.c (__libc_pread): Likewise. * sysdeps/unix/sysv/linux/mips/pread64.c (__libc_pread64): Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c (__libc_pwrite): Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c (__libc_pwrite64): Likewise. * sysdeps/unix/sysv/linux/msgrcv.c (__libc_msgrcv): Likewise. * sysdeps/unix/sysv/linux/msgsnd.c (__libc_msgsnd): Likewise. * sysdeps/unix/sysv/linux/open64.c (__libc_open64): Likewise. * sysdeps/unix/sysv/linux/openat.c (__libc_openat): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c (__libc_pread): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c (__libc_read64): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c (__libc_write): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c (__libc_write64): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c (__libc_fcntl): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c (__libc_pread): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c (__libc_pread64): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c (__libc_pwrite): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c (__libc_pwrite64): Likewise. * sysdeps/sysv/linux/powerpc/powerpc64/sync_file_range.c (sync_file_range): Likewise. * sysdeps/unix/sysv/linux/ppoll.c (ppoll): Likewise. * sysdeps/unix/sysv/linux/pread.c (__libc_pread): Likewise. * sysdeps/unix/sysv/linux/pread64.c (__libc_pread64): Likewise. * sysdeps/unix/sysv/linux/preadv.c (__libc_preadv): Likewise. * sysdeps/unix/sysv/linux/pselect.c (__pselect): Likewise. * sysdeps/unix/sysv/linux/pwrite.c (__libc_pwrite): Likewise. * sysdeps/unix/sysv/linux/pwrite64.c (__libc_pwrite64): Likewise. * sysdeps/unix/sysv/linux/pwritev.c (PWRITEV): Likewise. * sysdeps/unix/sysv/linux/readv.c (__libc_readv): Likewise. * sysdeps/unix/sysv/linux/recvmmsg.c (recvmmsg): Likewise. * sysdeps/unix/sysv/linux/sendmmsg.c (sendmmsg): Likewise. * sysdeps/unix/sysv/linux/sh/pread.c (__libc_pread): Likewise. * sysdeps/unix/sysv/linux/sh/pread64.c (__libc_pread64): Likewise. * sysdeps/unix/sysv/linux/sh/pwrite.c (__libc_pwrite): Likewise. * sysdeps/unix/sysv/linux/sh/pwrite64.c (__libc_pwrite64): Likewise. * sysdeps/unix/sysv/linux/sigsuspend.c (__sigsuspend): Likewise. * sysdeps/unix/sysv/linux/sigtimedwait.c (__sigtimedwait): Likewise. * sysdeps/unix/sysv/linux/sigwaitinfo.c (__sigwaitinfo): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c (__libc_msgrcv): Likewise. * sysdeps/unix/sysv/linux/sync_file_range.c (sync_file_range): Likewise. * sysdeps/unix/sysv/linux/tcdrain.c (__libc_tcdrain): Likewise. * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread): Likewise. * sysdeps/unix/sysv/linux/wait.c (__libc_wait): Likewise. * sysdeps/unix/sysv/linux/waitid.c (__waitid): Likewise. * sysdeps/unix/sysv/linux/waitpid.c (__libc_waitpid): Likewise. * sysdeps/unix/sysv/linux/wordsize-64/fallocate.c (fallocate): Likewise. * sysdeps/unix/sysv/linux/wordsize-64/preadv.c (preadv): Likewise. * sysdeps/unix/sysv/linux/wordsize-64/pwritev.c (pwritev): Likewise. * sysdeps/unix/sysv/linux/writev.c (__libc_writev): Likewise. * sysdeps/unix/sysv/linux/x86_64/recv.c (__libc_recv): Likewise. * sysdeps/unix/sysv/linux/x86_64/send.c (__libc_send): Likewise.
* x86: clock_gettime and timespec_get vDSO cleanupAdhemerval Zanella2015-06-011-0/+4
| | | | | This patch removes the x86 specific timespec_get and clock_gettime implementation to use generic HAVE_CLOCK_GETTIME_VSYSCALL way.
* Split timed-wait functions out of nptl/lowlevellock.c.Roland McGrath2015-05-266-0/+6
|
* Consolidate vDSO macros and usageAdhemerval Zanella2015-05-261-3/+3
| | | | | | | | | | | | | | | | This patch consolidate the Linux vDSO define and usage across all ports that uses it. The common vDSO definitions and calling through {INLINE/INTERNAL}_VSYSCALL macros are moved to a common header sysdep-vdso.h and vDSO name declaration and prototype is defined using a common macro. Also PTR_{MANGLE,DEMANGLE} is added to ports that does not use them for vDSO calls (aarch64, powerpc, s390, and tile) and thus it will reflect in code changes. For ports that already implement pointer mangling/demangling in vDSO system (i386, x32, x86_64) this patch is mainly a code refactor. Checked on x32, x86_64, x32, ppc64le, and aarch64.
* Remove socket.S implementationAdhemerval Zanella2015-05-223-300/+0
| | | | | | | | | | | | | | | This patch removes the socket.S implementation for all ports and replace it by a C implementation using socketcall. For ports that implement the syscall directly, there is no change. The patch idea is to simplify the socket function implementation that uses the socketcall to be based on C implemetation instead of a pseudo assembly implementation with arch specific parts. The patch then remove the assembly implementatation for the ports which uses socketcall (i386, microblaze, mips, powerpc, sparc, m68k, s390 and sh). I have cross-build GLIBC for afore-mentioned ports and tested on both i386 and ppc32 without regressions.
* i386: Remove six-argument specialized implementationsAdhemerval Zanella2015-05-205-197/+2
| | | | | | This patch removes the specialized i386 assembly implementations for fallocate{64}, pselect, and sync_file_range now that i386 have support for 6 argument syscalls.
* Refactor scandir/scandirat to use common tail.Roland McGrath2015-05-131-8/+7
|
* Break __scandir_cancel_handler out into its own file.Roland McGrath2015-05-131-1/+0
|
* i386: Remove fallocate, fallocate64, posix_fallocate, posix_fallocate64Florian Weimer2015-05-056-232/+3
| | | | | With 6-argument system call support, the generic Linux implementations of these system calls work, and there is no need for i386-specific versions.
* Remove unused macros from i386 lowlevellock.h.Joseph Myers2015-03-251-18/+0
| | | | | | | | | | | | | | In the course of the work on six-argument syscalls I noticed that the i386 lowlevellock.h contained some unused macro definitions (already unused before my patch). This patch removes them. Tested for x86 that installed stripped shared libraries are unchanged by this patch. * sysdeps/unix/sysv/linux/i386/lowlevellock.h (LLL_EBX_LOAD): Remove macro. (LLL_EBX_REG): Likewise. (LLL_ENTER_KERNEL): Likewise.
* Support six-argument syscalls from C for 32-bit x86, use generic ↵Joseph Myers2015-03-255-153/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lowlevellock-futex.h (bug 18138). This patch follows the approach outlined in <https://sourceware.org/ml/libc-alpha/2015-03/msg00656.html> to support six-argument syscalls from INTERNAL_SYSCALL for 32-bit x86, making them call a function __libc_do_syscall that takes the syscall number and three syscall arguments in the registers in which the kernel expects them, along with a pointer to a structure containing the other three arguments. In turn, this allows the generic lowlevellock-futex.h to be used on 32-bit x86, so supporting lll_futex_timed_wait_bitset (and so allowing FUTEX_CLOCK_REALTIME to be used in various cases, so fixing bug 18138 for 32-bit x86 and leaving hppa as the only architecture missing lll_futex_timed_wait_bitset). The change to lowlevellock.h's definition of SYS_futex is because the generic lowlevelloc-futex.h ends up bringing in bits/syscall.h which defines SYS_futex to __NR_futex, so resulting in redefinition errors. The revised definition in lowlevellock.h is in line with what the x86_64 version does. __libc_do_syscall is only needed in libpthread at present (meaning nothing special needs to be done to make it shared-only in most libraries containing it, static in libc only, as on ARM). Tested for 32-bit x86, with the glibc testsuite and with the test in bug 18138. The failures seen FAIL: nptl/tst-cleanupx4 FAIL: rt/tst-cpuclock2 are pre-existing. [BZ #18138] * sysdeps/unix/sysv/linux/i386/sysdep.h (struct libc_do_syscall_args): New structure. (INTERNAL_SYSCALL_MAIN_0): New macro. (INTERNAL_SYSCALL_MAIN_1): Likewise. (INTERNAL_SYSCALL_MAIN_2): Likewise. (INTERNAL_SYSCALL_MAIN_3): Likewise. (INTERNAL_SYSCALL_MAIN_4): Likewise. (INTERNAL_SYSCALL_MAIN_5): Likewise. (INTERNAL_SYSCALL_MAIN_6): Likewise. Call __libc_do_syscall. (INTERNAL_SYSCALL): Define to use INTERNAL_SYSCALL_MAIN_##nr. Replace conditional definitions by conditional definitions of .... (INTERNAL_SYSCALL_MAIN_INLINE): ... this. New macro. * sysdeps/unix/sysv/linux/i386/libc-do-syscall.S: New file. * sysdeps/unix/sysv/linux/i386/Makefile [$(subdir) = nptl] (libpthread-sysdep_routines): Add libc-do-syscall. * sysdeps/unix/sysv/linux/i386/lowlevellock-futex.h: Remove file. * sysdeps/unix/sysv/linux/i386/lowlevellock.h (SYS_futex): Define to __NR_futex not 240.
* Fix posix_spawn getrlimit64 namespace (bug 17991).Joseph Myers2015-02-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | posix_spawn (a standard POSIX function) brings in a use of getrlimit64 (not a standard POSIX function). This patch fixes this by using __getrlimit64 and making getrlimit64 a weak alias. This is more complicated than some such changes because of files that define getrlimit64 in their own way using symbol versioning after including the main sysdeps/unix/sysv/linux/getrlimit64.c with a getrlimit macro defined. There are various existing patterns for such cases in glibc; the one I've used here is that a getrlimit64 macro disables the weak_alias / libc_hidden_weak calls, leaving it to the including file to define the getrlimit64 name in whatever way is appropriate. Tested for x86_64 and x86 that installed stripped shared libraries are unchanged by this patch. [BZ #17991] * include/sys/resource.h (__getrlimit64): Declare. Use libc_hidden_proto. * resource/getrlimit64.c (getrlimit64): Rename to __getrlimit64 and define as weak alias of __getrlimit64. Use libc_hidden_weak. * sysdeps/posix/spawni.c (__spawni): Call __getrlimit64 instead of getrlimit64. * sysdeps/unix/sysv/linux/getrlimit64.c (getrlimit64): Rename to __getrlimit64. [!getrlimit64] (getrlimit64): Define as weak alias of __getrlimit64. Use libc_hidden_weak. * sysdeps/unix/sysv/linux/i386/getrlimit64.c (getrlimit64): Define using __getrlimit64 not __new_getrlimit64. (__GI_getrlimit64): Likewise. * sysdeps/unix/sysv/linux/mips/getrlimit64.c (getrlimit64): Likewise. (__GI_getrlimit64): Likewise. (__old_getrlimit64): Use __getrlimit64 not __new_getrlimit64. * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list (getrlimit): Add __getrlimit64 alias. * sysdeps/unix/sysv/linux/wordsize-64/syscalls.list (getrlimit): Likewise. * conform/Makefile (test-xfail-XOPEN2K/spawn.h/linknamespace): Remove variable. (test-xfail-POSIX2008/spawn.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/spawn.h/linknamespace): Likewise.
* x86: Clean up __vdso_clock_gettime variable.Roland McGrath2015-02-061-3/+1
|
* Fix semaphore destruction (bug 12674).Carlos O'Donell2015-01-2112-1039/+0
| | | | | | | | | | | | | This commit fixes semaphore destruction by either using 64b atomic operations (where available), or by using two separate fields when only 32b atomic operations are available. In the latter case, we keep a conservative estimate of whether there are any waiting threads in one bit of the field that counts the number of available tokens, thus allowing sem_post to atomically both add a token and determine whether it needs to call futex_wake. See: https://sourceware.org/ml/libc-alpha/2014-12/msg00155.html
* Add x86 32 bit vDSO time function supportAdhemerval Zanella2015-01-123-0/+128
| | | | | | | | | | Linux 3.15 adds support for clock_gettime, gettimeofday, and time vDSO (commit id 37c975545ec63320789962bf307f000f08fabd48). This patch adds GLIBC supports to use such symbol when they are avaiable. Along with x86 vDSO support, this patch cleanup x86_64 code by moving all common code to x86 common folder. Only init-first.c is different between implementations.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-02107-107/+107
|
* i386: Fix build by GCC 5.0Andrew Senkevich2014-12-301-1/+1
| | | | | | | | | | | | | | | | | | Fixed 3 "make check" failures on glibc 32bit built by gcc 5.0 due to EBX was enabled for allocation: https://gcc.gnu.org/ml/gcc-patches/2014-10/msg00892.html Tests elf/tst-tls3, elf/tst-execstack-needed, elf/tst-execstack-prog were failed because EBX was used as PIC register. * sysdeps/i386/tls-macros.h: Include <features.h>. (TLS_LE): Use non-PIC version for GCC >= 5.0. (TLS_IE): Likewise. (TLS_LD): Likewise. (TLS_GD): Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h (check_consistency): Don't define for GCC >= 5.0.
* Add hidden __tls_get_addr/___tls_get_addr aliasH.J. Lu2014-12-211-6/+3
| | | | | | | | | | | | | | | | | | | | __tls_get_addr/___tls_get_addr is always defined in ld.so. There is no need to call them via PLT inside ld.so. This patch adds the hidden __tls_get_addr/___tls_get_addr aliases and calls them directly from _dl_tlsdesc_dynamic. There is no need to set up the EBX register in i386 _dl_tlsdesc_dynamic when calling the hidden ___tls_get_addr. * elf/dl-tls.c (__tls_get_addr): Provide the hidden definition if not defined. * sysdeps/i386/dl-tls.h (___tls_get_addr): Provide the hidden definition. * sysdeps/i386/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Call the hidden ___tls_get_addr. * sysdeps/x86_64/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Call the hidden __tls_get_addr. * sysdeps/generic/localplt.data (__tls_get_addr): Removed. * sysdeps/unix/sysv/linux/i386/localplt.data (___tls_get_addr): Likewise.
* i386: Move futex functions from lowlevellock.h to lowlevellock-futex.h.Torvald Riegel2014-12-192-110/+157
|
* Fix profil_counter namespace (bug 17725).Joseph Myers2014-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On ARM, where profil_counter is not static, it is brought in by references to various standard functions, as noted in <https://sourceware.org/ml/libc-alpha/2014-11/msg00890.html>, although it is not a standard function itself. I don't know if this also causes test failures on SPARC, although I see no reason for it not to do so. This patch fixes this namespace issue. profil_counter is renamed to __profil_counter and made a weak alias on ARM and SPARC. Because of the uses in profil.c / sprofil.c it seems simplest to make the rename globally, including on the other architectures for which profil_counter was static and so the change is of no substance. The variant names profil_counter_* used in sprofil.c are also renamed to start with __ so that undesired function names do not get exported in static libc. As I noted in bug 17726, profil_counter should probably be a compat symbol on ARM and SPARC, so it wouldn't exist at all in static libc even as a weak alias. Since defining a compat symbol still requires an internal name as a target of an alias, this patch still seems reasonable as an intermediate step towards that goal: it wouldn't be possible for the function simply to be static profil_counter on ARM and SPARC with profil_counter also being the exported compat symbol name, so profil.c / sprofil.c would still need to be prepared to call the function under another name (here, __profil_counter). Tested for x86_64 (testsuite, and that stripped installed shared libraries are unchanged by the patch) and ARM (ABI and linknamespace tests - this patch reduces the number of linknamespace failures I see on ARM from 227 to 5, the residue being math.h failures for fe* functions and for j0l/j1n/jnl/y0l/y1l/ynl aliases). 2014-12-17 Joseph Myers <joseph@codesourcery.com> [BZ #17725] * sysdeps/generic/profil-counter.h (profil_counter): Rename to __profil_counter. * sysdeps/unix/sysv/linux/hppa/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/i386/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/ia64/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/sh/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/tile/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/x86_64/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/arm/profil-counter.h (profil_counter): Likewise. [!__profil_counter] (profil_counter): Define as weak alias of __profil_counter. * sysdeps/unix/sysv/linux/sparc/sparc32/profil-counter.h (profil_counter): Rename to __profil_counter. [!__profil_counter] (profil_counter): Define as weak alias of __profil_counter. * sysdeps/unix/sysv/linux/sparc/sparc64/profil-counter.h (profil_counter): Rename to __profil_counter. [!__profil_counter] (profil_counter): Define as weak alias of __profil_counter. * sysdeps/posix/profil.c: Update comment referring to profil_counter. (__profil): Use __profil_counter instead of profil_counter. * sysdeps/posix/sprofil.c (profil_counter): Rename to __profil_counter. Use __profil_counter_ushort and __profil_counter_uint in definitions. (__sprofil): Use __profil_counter_uint and __profil_counter_ushort instead of profil_counter_uint and profil_counter_ushort.
* Remove NOT_IN_libcSiddhesh Poyarekar2014-11-244-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace with !IS_IN (libc). This completes the transition from the IS_IN/NOT_IN macros to the IN_MODULE macro set. The generated code is unchanged on x86_64. * stdlib/isomac.c (fmt): Replace NOT_IN_libc with IN_MODULE. (get_null_defines): Adjust. * sunrpc/Makefile: Adjust comment. * Makerules (CPPFLAGS-nonlib): Remove NOT_IN_libc. * elf/Makefile (CPPFLAGS-sotruss-lib): Likewise. (CFLAGS-interp.c): Likewise. (CFLAGS-ldconfig.c): Likewise. (CPPFLAGS-.os): Likewise. * elf/rtld-Rules (rtld-CPPFLAGS): Likewise. * extra-lib.mk (CPPFLAGS-$(lib)): Likewise. * extra-modules.mk (extra-modules.mk): Likewise. * iconv/Makefile (CPPFLAGS-iconvprogs): Likewise. * locale/Makefile (CPPFLAGS-locale_programs): Likewise. * malloc/Makefile (CPPFLAGS-memusagestat): Likewise. * nscd/Makefile (CPPFLAGS-nscd): Likewise. * nss/Makefile (CPPFLAGS-nss_test1): Likewise. * stdlib/Makefile (CFLAGS-tst-putenvmod.c): Likewise. * sysdeps/gnu/Makefile ($(objpfx)errlist-compat.c): Likewise. * sysdeps/unix/sysv/linux/Makefile (CPPFLAGS-lddlibc4): Likewise. * iconvdata/Makefile (CPPFLAGS): Likewise. (cpp-srcs-left): Add libof for all iconvdata routines. * bits/stdio-lock.h: Replace NOT_IN_libc with IS_IN. * include/assert.h: Likewise. * include/ctype.h: Likewise. * include/errno.h: Likewise. * include/libc-symbols.h: Likewise. * include/math.h: Likewise. * include/netdb.h: Likewise. * include/resolv.h: Likewise. * include/stdio.h: Likewise. * include/stdlib.h: Likewise. * include/string.h: Likewise. * include/sys/stat.h: Likewise. * include/wctype.h: Likewise. * intl/l10nflist.c: Likewise. * libidn/idn-stub.c: Likewise. * libio/libioP.h: Likewise. * nptl/libc_multiple_threads.c: Likewise. * nptl/pthreadP.h: Likewise. * posix/regex_internal.h: Likewise. * resolv/res_hconf.c: Likewise. * sysdeps/arm/armv7/multiarch/memcpy.S: Likewise. * sysdeps/arm/memmove.S: Likewise. * sysdeps/arm/sysdep.h: Likewise. * sysdeps/generic/_itoa.h: Likewise. * sysdeps/generic/symbol-hacks.h: Likewise. * sysdeps/gnu/errlist.awk: Likewise. * sysdeps/gnu/errlist.c: Likewise. * sysdeps/i386/i586/memcpy.S: Likewise. * sysdeps/i386/i586/memset.S: Likewise. * sysdeps/i386/i686/memcpy.S: Likewise. * sysdeps/i386/i686/memmove.S: Likewise. * sysdeps/i386/i686/mempcpy.S: Likewise. * sysdeps/i386/i686/memset.S: Likewise. * sysdeps/i386/i686/multiarch/bcopy.S: Likewise. * sysdeps/i386/i686/multiarch/bzero.S: Likewise. * sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/memchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/memchr.S: Likewise. * sysdeps/i386/i686/multiarch/memcmp-sse4.S: Likewise. * sysdeps/i386/i686/multiarch/memcmp-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/memcmp.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy_chk.S: Likewise. * sysdeps/i386/i686/multiarch/memmove.S: Likewise. * sysdeps/i386/i686/multiarch/memmove_chk.S: Likewise. * sysdeps/i386/i686/multiarch/mempcpy.S: Likewise. * sysdeps/i386/i686/multiarch/mempcpy_chk.S: Likewise. * sysdeps/i386/i686/multiarch/memrchr-c.c: Likewise. * sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/memrchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/memrchr.S: Likewise. * sysdeps/i386/i686/multiarch/memset-sse2-rep.S: Likewise. * sysdeps/i386/i686/multiarch/memset-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/memset.S: Likewise. * sysdeps/i386/i686/multiarch/memset_chk.S: Likewise. * sysdeps/i386/i686/multiarch/rawmemchr.S: Likewise. * sysdeps/i386/i686/multiarch/strcat-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strcat-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/strcat.S: Likewise. * sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/strchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strchr.S: Likewise. * sysdeps/i386/i686/multiarch/strcmp-sse4.S: Likewise. * sysdeps/i386/i686/multiarch/strcmp-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/strcmp.S: Likewise. * sysdeps/i386/i686/multiarch/strcpy-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strcpy-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/strcpy.S: Likewise. * sysdeps/i386/i686/multiarch/strcspn.S: Likewise. * sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/strlen-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strlen.S: Likewise. * sysdeps/i386/i686/multiarch/strnlen.S: Likewise. * sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/strrchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strrchr.S: Likewise. * sysdeps/i386/i686/multiarch/strspn.S: Likewise. * sysdeps/i386/i686/multiarch/wcschr-c.c: Likewise. * sysdeps/i386/i686/multiarch/wcschr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/wcschr.S: Likewise. * sysdeps/i386/i686/multiarch/wcscmp-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/wcscmp.S: Likewise. * sysdeps/i386/i686/multiarch/wcscpy-c.c: Likewise. * sysdeps/i386/i686/multiarch/wcscpy-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/wcscpy.S: Likewise. * sysdeps/i386/i686/multiarch/wcslen-c.c: Likewise. * sysdeps/i386/i686/multiarch/wcslen-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/wcslen.S: Likewise. * sysdeps/i386/i686/multiarch/wcsrchr-c.c: Likewise. * sysdeps/i386/i686/multiarch/wcsrchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/wcsrchr.S: Likewise. * sysdeps/i386/i686/multiarch/wmemcmp-c.c: Likewise. * sysdeps/i386/i686/multiarch/wmemcmp.S: Likewise. * sysdeps/ia64/fpu/libm-symbols.h: Likewise. * sysdeps/nptl/bits/libc-lock.h: Likewise. * sysdeps/nptl/bits/libc-lockP.h: Likewise. * sysdeps/nptl/bits/stdio-lock.h: Likewise. * sysdeps/posix/closedir.c: Likewise. * sysdeps/posix/opendir.c: Likewise. * sysdeps/posix/readdir.c: Likewise. * sysdeps/posix/rewinddir.c: Likewise. * sysdeps/powerpc/novmx-sigjmp.c: Likewise. * sysdeps/powerpc/powerpc32/__longjmp.S: Likewise. * sysdeps/powerpc/powerpc32/bsd-_setjmp.S: Likewise. * sysdeps/powerpc/powerpc32/fpu/__longjmp.S: Likewise. * sysdeps/powerpc/powerpc32/fpu/setjmp.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memcmp.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memcpy.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memset-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memset.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strlen-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strncmp.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strnlen.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy.c: Likewise. * sysdeps/powerpc/powerpc32/power6/memset.S: Likewise. * sysdeps/powerpc/powerpc32/setjmp.S: Likewise. * sysdeps/powerpc/powerpc64/__longjmp.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/bzero.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcmp-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcpy-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memmove.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/mempcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memrchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memset.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/rawmemchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/stpcpy-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/stpcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/stpncpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcasecmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcat.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strchrnul.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcmp-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcpy-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcspn.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strlen-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strlen.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncase.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncase_l.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncat.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncpy-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strnlen.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strpbrk.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strrchr-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strrchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strspn-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strspn.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcschr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcscpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wordcopy.c: Likewise. * sysdeps/powerpc/powerpc64/setjmp.S: Likewise. * sysdeps/s390/s390-32/multiarch/ifunc-resolve.c: Likewise. * sysdeps/s390/s390-32/multiarch/memcmp.S: Likewise. * sysdeps/s390/s390-32/multiarch/memcpy.S: Likewise. * sysdeps/s390/s390-32/multiarch/memset.S: Likewise. * sysdeps/s390/s390-64/multiarch/ifunc-resolve.c: Likewise. * sysdeps/s390/s390-64/multiarch/memcmp.S: Likewise. * sysdeps/s390/s390-64/multiarch/memcpy.S: Likewise. * sysdeps/s390/s390-64/multiarch/memset.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memset-niagara1.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memset-niagara4.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memset.S: Likewise. * sysdeps/unix/alpha/sysdep.S: Likewise. * sysdeps/unix/alpha/sysdep.h: Likewise. * sysdeps/unix/make-syscalls.sh: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/getpid.c: Likewise. * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/lowlevellock-futex.h: Likewise. * sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/not-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/longjmp_chk.c: Likewise. * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise. * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sh/vfork.S: Likewise. * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/brk.S: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/tile/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * sysdeps/wordsize-32/symbol-hacks.h: Likewise. * sysdeps/x86_64/memcpy.S: Likewise. * sysdeps/x86_64/memmove.c: Likewise. * sysdeps/x86_64/memset.S: Likewise. * sysdeps/x86_64/multiarch/init-arch.h: Likewise. * sysdeps/x86_64/multiarch/memcmp-sse4.S: Likewise. * sysdeps/x86_64/multiarch/memcmp-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/memcmp.S: Likewise. * sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: Likewise. * sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: Likewise. * sysdeps/x86_64/multiarch/memcpy-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/memcpy.S: Likewise. * sysdeps/x86_64/multiarch/memcpy_chk.S: Likewise. * sysdeps/x86_64/multiarch/memmove.c: Likewise. * sysdeps/x86_64/multiarch/mempcpy.S: Likewise. * sysdeps/x86_64/multiarch/mempcpy_chk.S: Likewise. * sysdeps/x86_64/multiarch/memset-avx2.S: Likewise. * sysdeps/x86_64/multiarch/memset.S: Likewise. * sysdeps/x86_64/multiarch/memset_chk.S: Likewise. * sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S: Likewise. * sysdeps/x86_64/multiarch/strcat-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/strcat.S: Likewise. * sysdeps/x86_64/multiarch/strchr-sse2-no-bsf.S: Likewise. * sysdeps/x86_64/multiarch/strchr.S: Likewise. * sysdeps/x86_64/multiarch/strcmp-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/strcmp.S: Likewise. * sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: Likewise. * sysdeps/x86_64/multiarch/strcpy-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/strcpy.S: Likewise. * sysdeps/x86_64/multiarch/strcspn.S: Likewise. * sysdeps/x86_64/multiarch/strspn.S: Likewise. * sysdeps/x86_64/multiarch/wcscpy-c.c: Likewise. * sysdeps/x86_64/multiarch/wcscpy-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/wcscpy.S: Likewise. * sysdeps/x86_64/multiarch/wmemcmp-c.c: Likewise. * sysdeps/x86_64/multiarch/wmemcmp.S: Likewise. * sysdeps/x86_64/strcmp.S: Likewise.
* Remove IS_IN_rtldSiddhesh Poyarekar2014-11-242-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace with IS_IN (rtld). Generated code is unchanged on x86_64. * elf/Makefile (CPPFLAGS-.os): Remove IS_IN_rtld. * elf/dl-open.c: Use IS_IN (rtld) instead if IS_IN_rtld. * elf/rtld-Rules: Likewise. * elf/setup-vdso.h: Likewise. * include/assert.h: Likewise. * include/bits/stdlib-float.h: Likewise. * include/errno.h: Likewise. * include/sys/stat.h: Likewise. * include/unistd.h: Likewise. * sysdeps/aarch64/setjmp.S: Likewise. * sysdeps/alpha/setjmp.S: Likewise. * sysdeps/arm/__longjmp.S: Likewise. * sysdeps/arm/aeabi_unwind_cpp_pr1.c: Likewise. * sysdeps/arm/setjmp.S: Likewise. * sysdeps/arm/sysdep.h: Likewise. * sysdeps/generic/_itoa.h: Likewise. * sysdeps/generic/dl-sysdep.h: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/i386/dl-tls.h: Likewise. * sysdeps/i386/setjmp.S: Likewise. * sysdeps/m68k/setjmp.c: Likewise. * sysdeps/mach/hurd/dl-execstack.c: Likewise. * sysdeps/mach/hurd/opendir.c: Likewise. * sysdeps/posix/getcwd.c: Likewise. * sysdeps/posix/opendir.c: Likewise. * sysdeps/posix/profil.c: Likewise. * sysdeps/powerpc/dl-procinfo.h: Likewise. * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Likewise. * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h: Likewise. * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. * sysdeps/powerpc/powerpc64/__longjmp-common.S: Likewise. * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. * sysdeps/s390/dl-tls.h: Likewise. * sysdeps/s390/s390-32/setjmp.S: Likewise. * sysdeps/s390/s390-64/setjmp.S: Likewise. * sysdeps/sh/sh3/setjmp.S: Likewise. * sysdeps/sh/sh4/setjmp.S: Likewise. * sysdeps/unix/alpha/sysdep.h: Likewise. * sysdeps/unix/arm/sysdep.S: Likewise. * sysdeps/unix/i386/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/getcwd.c: Likewise. * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/lowlevellock-futex.h: Likewise. * sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h: Likewise. * sysdeps/unix/sysv/linux/m68k/m68k-helpers.S: Likewise. * sysdeps/unix/sysv/linux/microblaze/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/tile/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * sysdeps/unix/x86_64/sysdep.S: Likewise. * sysdeps/x86_64/setjmp.S: Likewise.
* Remove IS_IN_libpthreadSiddhesh Poyarekar2014-11-242-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace with IS_IN (libpthread). Generated code unchanged on x86_64. * nptl/lowlevellock.c: Use IS_IN instead of IS_IN_libpthread. * nptl/pthreadP.h: Likewise. * nptl_db/structs.def: Likewise. * sysdeps/arm/sysdep.h: Likewise. * sysdeps/nptl/bits/libc-lock.h: Likewise. * sysdeps/nptl/bits/libc-lockP.h: Likewise. * sysdeps/sparc/sparc32/lowlevellock.c: Likewise. * sysdeps/unix/alpha/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/not-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
* Remove IS_IN_librtSiddhesh Poyarekar2014-11-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace with IS_IN (librt). Generated code unchanged on x86_64 * include/mqueue.h: Use IS_IN instead of IS_IN_librt. * nptl/pthreadP.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/not-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
* Remove __libc_waitpid function name.Joseph Myers2014-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the removal of unused __libc_* function names, this patch removes the __libc_waitpid name. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch; __waitpid, which is exported from shared libc, changes from weak to strong on some configurations, which is of no significance). * include/sys/wait.h (__libc_waitpid): Remove declaration. * posix/waitpid.c (__libc_waitpid): Rename to __waitpid. (__waitpid): Don't define as alias. Use libc_hidden_def not libc_hidden_weak. (waitpid): Define as alias of __waitpid. * sysdeps/unix/bsd/waitpid.c (__libc_waitpid): Rename to __waitpid. (__waitpid): Don't define as alias. Use libc_hidden_def not libc_hidden_weak. (waitpid): Define as alias of __waitpid. * sysdeps/unix/sysv/linux/i386/syscalls.list (waitpid): Remove __libc_waitpid alias. * sysdeps/unix/sysv/linux/m68k/syscalls.list (waitpid): Likewise. * sysdeps/unix/sysv/linux/powerpc/syscalls.list (waitpid): Likewise. * sysdeps/unix/sysv/linux/sh/syscalls.list (waitpid): Likewise. * sysdeps/unix/sysv/linux/sparc/syscalls.list (waitpid): Likewise. * sysdeps/unix/sysv/linux/tile/waitpid.S (__libc_waitpid): Remove alias. * sysdeps/unix/sysv/linux/waitpid.c (__libc_waitpid): Rename to __waitpid. (__waitpid): Don't define as alias. Use libc_hidden_def not libc_hidden_weak. (waitpid): Define as alias of __waitpid.
* Run check-localpltk/textrel/execstack over ld.so.Carlos O'Donell2014-11-061-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For maximum paranoia we run ld.so through the normal set of tests for all of the shared libraries. This includes running ld.so through check-localplt, check-textrel, and check-execstack. While none of these should trigger any failures given the way ld.so is built, it might possibly fail if a developer does something wrong. This paranoia was triggered by a discussion over the use of __strcpy vs. strcpy [1] and if the symbol could leak and use the libc.so version. The check-localplt test fails right away because localplt.data needs updating for all arches. By default we add 6 new symbols: __tls_get_addr, __libc_memalign, malloc, calloc, realloc and free. Other machines like i386, power, and s390 require some different symbol sets e.g. ___tls_get_addr vs. __tls_get_addr for i386. Verified for i386 Verified for x86_64 Verified for ppc32 Verified for ppc64 Verified for ppc64le Verified for arm Verified for aarch64 Verified for s390 Verified for s390x Guessed for alpha Guessed for ia64 Guessed for m68k Guessed for microblaze Guessed for sparc32 Guessed for sparc64 Defaults for sh Defaults for mips Defaults for hppa Defaults for tile Machine manintainers notified to double check the data used in localplt.data. [1] https://sourceware.org/ml/libc-alpha/2014-10/msg00548.html
* Move setfsgid/setfsuid definitions to syscalls.list (bug 14138).Joseph Myers2014-10-273-67/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 setfsgid and setfsuid. Tested for x86. [BZ #14138] * sysdeps/unix/sysv/linux/arm/setfsgid.c: Remove file. * sysdeps/unix/sysv/linux/arm/setfsuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setfsgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setfsuid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/setfsgid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/setfsuid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setfsgid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setfsuid.c: Likewise. * sysdeps/unix/sysv/linux/sh/setfsgid.c: Likewise. * sysdeps/unix/sysv/linux/sh/setfsuid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setfsgid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setfsuid.c: Likewise. * sysdeps/unix/sysv/linux/arm/syscalls.list (setfsgid): Add syscall. (setfsuid): Likewise. * sysdeps/unix/sysv/linux/i386/syscalls.list (setfsgid): Likewise. (setfsuid): Likewise. * sysdeps/unix/sysv/linux/m68k/syscalls.list (setfsgid): Likewise. (setfsuid): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (setfsgid): Likewise. (setfsuid): Likewise. * sysdeps/unix/sysv/linux/sh/syscalls.list (setfsgid): Likewise. (setfsuid): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (setfsgid): Likewise. (setfsuid): Likewise.
* Move get*id and getgroups definitions to syscalls.list (bug 14138).Joseph Myers2014-10-248-241/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 get*id functions and getgroups. The previous C definitions were because of the transition to 32-bit uids and gids. Tested for x86. [BZ #14138] * sysdeps/unix/sysv/linux/arm/getegid.c: Remove file. * sysdeps/unix/sysv/linux/arm/geteuid.c: Likewise. * sysdeps/unix/sysv/linux/arm/getgid.c: Likewise. * sysdeps/unix/sysv/linux/arm/getgroups.c: Likewise. * sysdeps/unix/sysv/linux/arm/getresgid.c: Likewise. * sysdeps/unix/sysv/linux/arm/getresuid.c: Likewise. * sysdeps/unix/sysv/linux/arm/getuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getegid.c: Likewise. * sysdeps/unix/sysv/linux/i386/geteuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getgroups.c: Likewise. * sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/getuid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/getegid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/geteuid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/getgid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/getgroups.c: Likewise. * sysdeps/unix/sysv/linux/m68k/getresgid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/getresuid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/getuid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getegid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/geteuid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getgid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getgroups.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getresgid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getresuid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getuid.c: Likewise. * sysdeps/unix/sysv/linux/sh/getegid.c: Likewise. * sysdeps/unix/sysv/linux/sh/geteuid.c: Likewise. * sysdeps/unix/sysv/linux/sh/getgid.c: Likewise. * sysdeps/unix/sysv/linux/sh/getgroups.c: Likewise. * sysdeps/unix/sysv/linux/sh/getresgid.c: Likewise. * sysdeps/unix/sysv/linux/sh/getresuid.c: Likewise. * sysdeps/unix/sysv/linux/sh/getuid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/getegid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/geteuid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/getgid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/getgroups.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/getuid.c: Likewise. * sysdeps/unix/sysv/linux/arm/syscalls.list (getegid): Add syscall. (geteuid): Likewise. (getgid): Likewise. (getuid): Likewise. (getresgid): Likewise. (getresuid): Likewise. (getgroups): Likewise. * sysdeps/unix/sysv/linux/i386/syscalls.list (getegid): Likewise. (geteuid): Likewise. (getgid): Likewise. (getuid): Likewise. (getresgid): Likewise. (getresuid): Likewise. (getgroups): Likewise. * sysdeps/unix/sysv/linux/m68k/syscalls.list (getegid): Likewise. (geteuid): Likewise. (getgid): Likewise. (getuid): Likewise. (getresgid): Likewise. (getresuid): Likewise. (getgroups): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (getegid): Likewise. (geteuid): Likewise. (getgid): Likewise. (getuid): Likewise. (getresgid): Likewise. (getresuid): Likewise. (getgroups): Likewise. * sysdeps/unix/sysv/linux/sh/syscalls.list (getegid): Likewise. (geteuid): Likewise. (getgid): Likewise. (getuid): Likewise. (getresgid): Likewise. (getresuid): Likewise. (getgroups): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (getegid): Likewise. (geteuid): Likewise. (getgid): Likewise. (getuid): Likewise. (getgroups): Likewise.
* Move some chown / lchown / fchown definitions to syscalls.list (bug 14138).Joseph Myers2014-10-244-135/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* pthread_once: Add fast path and remove x86 variants.Torvald Riegel2014-10-201-178/+0
|
* Support and use mixed compat/non-compat aliases in syscalls.list.Joseph Myers2014-10-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables syscalls.list entries to specify both compat and non-compat symbol versions for the same syscall definition, making use of this for setrlimit / chown / lchown where the inability to specify such aliases showed up in the course of work on bug 14138. The change to make-syscalls.sh is minimal: adding a SHARED conditional on the compat_symbol calls. It remains the case that if a compat symbol version is specified, the syscall is only built for the shared library at all if an explicit symbol version is given for a non-compat symbol (so it's necessary to specify "lchown@@GLIBC_2.0 chown@GLIBC_2.0" rather than just "lchown chown@GLIBC_2.0"). It also remains the case, as already commented in make-syscalls.sh, that no SHLIB_COMPAT conditionals are generated, so there would be problems if the same syscalls.list file, with compat symbols, were used for both configurations that should have those symbols and configurations for which they should be conditioned out with SHLIB_COMPAT. Tested for x86. * sysdeps/unix/make-syscalls.sh (emit_weak_aliases): Condition compat_symbol calls on [SHARED]. * sysdeps/unix/sysv/linux/powerpc/lchown.S: Remove file. * sysdeps/unix/sysv/linux/i386/syscalls.list (oldsetrlimit): Remove. (setrlimit): Add setrlimit@GLIBC_2.0 alias. * sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list (oldsetrlimit): Remove. (setrlimit): Add setrlimit@GLIBC_2.0 alias. * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (lchown): New syscall entry. (oldsetrlimit): Remove. (setrlimit): Add setrlimit@GLIBC_2.0 alias. * sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (oldsetrlimit): Remove. (setrlimit): Add setrlimit@GLIBC_2.0 alias.