aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux
AgeCommit message (Collapse)Author
2015-08-20Move x86_64 init-arch.h to sysdeps/x86/init-arch.hH.J. Lu
Move sysdeps/x86_64/multiarch/init-arch.h to sysdeps/x86/init-arch.h which can be used for both i386 and x86_64. * sysdeps/i386/i686/multiarch/init-arch.h: Removed. * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise. * sysdeps/x86_64/cacheinfo.c: Include <init-arch.h> instead of "multiarch/init-arch.h". * sysdeps/x86_64/multiarch/init-arch.h: Renamed to ... * sysdeps/x86/init-arch.h: This.
2015-08-20Remove x86 init-arch.cH.J. Lu
Both files include sysdeps/x86_64/multiarch/init-arch.c which has been removed. * sysdeps/i386/i686/multiarch/init-arch.c: Removed. * sysdeps/unix/sysv/linux/x86/init-arch.c: Likewise.
2015-08-19Mark __xstatXX_conv as hiddenH.J. Lu
__xstat_conv, __xstat64_conv and __xstat32_conv are internal to glibc. They should be marked as hidden so that they can't be called without PLT. [BZ #18822] * sysdeps/unix/sysv/linux/xstatconv.h (__xstat_conv): Add attribute_hidden. (__xstat64_conv): Likewise. (__xstat32_conv): Likewise.
2015-08-19Call __setcontext with HIDDEN_JUMPTARGETH.J. Lu
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.
2015-08-19Use x86-64 cacheinfo.c and sysconf.c for x86H.J. Lu
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.
2015-08-18hppa: timerfd.h: move to common sys/timerfd.hMike Frysinger
Use the common sys/timerfd.h to avoid duplication and move the arch-specific settings into bits/timerfd.h.
2015-08-18hppa: signalfd.h: move to common sys/signalfd.hMike Frysinger
Use the common sys/signalfd.h to avoid duplication and move the arch-specific settings into bits/signalfd.h.
2015-08-18hppa: inotify.h: move to common sys/inotify.hMike Frysinger
Use the common sys/inotify.h to avoid duplication and move the arch-specific settings into bits/inotify.h.
2015-08-18hppa: eventfd.h: move to common sys/eventfd.hMike Frysinger
Use the common sys/eventfd.h to avoid duplication and move the arch-specific settings into bits/eventfd.h.
2015-08-18hppa: epoll.h: move to common sys/epoll.hMike Frysinger
Use the common sys/epoll.h to avoid duplication and move the arch-specific settings into bits/epoll.h.
2015-08-18hppa: sigaction.h: update define export based on __USE_XOPEN2K8Mike Frysinger
This brings hppa in line with other ports by exporting a few more defines based on the __USE_XOPEN2K8 define and not just __USE_MISC.
2015-08-18hppa: shm.h: add SHM_EXECMike Frysinger
This brings hppa in line with all the other arches.
2015-08-18hppa: drop __ASSUME_LWS_CAS defineMike Frysinger
We require recent enough kernels for this now, and we've been hardcoding it to 1, so drop it entirely now.
2015-08-17Add version set GLIBC_2.19 for linux/powerpcAndreas Schwab
2015-08-13Don't include <cpuid.h> in elision-conf.hH.J. Lu
Don't include the unused <cpuid.h> in Linux/x86 elision-conf.h. * sysdeps/unix/sysv/linux/x86/elision-conf.h: Don't include <cpuid.h>.
2015-08-13Update x86 elision-conf.c for <cpu-features.h>H.J. Lu
This patch updates x86 elision-conf.c to use the newly defined HAS_CPU_FEATURE from <cpu-features.h>. * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init): Replace HAS_RTM with HAS_CPU_FEATURE (RTM).
2015-08-13Add _dl_x86_cpu_features to rtld_globalH.J. Lu
This patch adds _dl_x86_cpu_features to rtld_global in x86 ld.so and initializes it early before __libc_start_main is called so that cpu_features is always available when it is used and we can avoid calling __init_cpu_features in IFUNC selectors. * sysdeps/i386/dl-machine.h: Include <cpu-features.c>. (dl_platform_init): Call init_cpu_features. * sysdeps/i386/dl-procinfo.c (_dl_x86_cpu_features): New. * sysdeps/i386/i686/cacheinfo.c (DISABLE_PREFERRED_MEMORY_INSTRUCTION): Removed. * sysdeps/i386/i686/multiarch/Makefile (aux): Remove init-arch. * sysdeps/i386/i686/multiarch/Versions: Removed. * sysdeps/i386/i686/multiarch/ifunc-defines.sym (KIND_OFFSET): Removed. * sysdeps/i386/ldsodefs.h: Include <cpu-features.h>. * sysdeps/unix/sysv/linux/x86/Makefile (libpthread-sysdep_routines): Remove init-arch. * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c: Include <sysdeps/x86_64/dl-procinfo.c> instead of sysdeps/generic/dl-procinfo.c>. * sysdeps/x86/Makefile [$(subdir) == csu] (gen-as-const-headers): Add cpu-features-offsets.sym and rtld-global-offsets.sym. [$(subdir) == elf] (sysdep-dl-routines): Add dl-get-cpu-features. [$(subdir) == elf] (tests): Add tst-get-cpu-features. [$(subdir) == elf] (tests-static): Add tst-get-cpu-features-static. * sysdeps/x86/Versions: New file. * sysdeps/x86/cpu-features-offsets.sym: Likewise. * sysdeps/x86/cpu-features.c: Likewise. * sysdeps/x86/cpu-features.h: Likewise. * sysdeps/x86/dl-get-cpu-features.c: Likewise. * sysdeps/x86/libc-start.c: Likewise. * sysdeps/x86/rtld-global-offsets.sym: Likewise. * sysdeps/x86/tst-get-cpu-features-static.c: Likewise. * sysdeps/x86/tst-get-cpu-features.c: Likewise. * sysdeps/x86_64/dl-procinfo.c: Likewise. * sysdeps/x86_64/cacheinfo.c (__cpuid_count): Removed. Assume USE_MULTIARCH is defined and don't check it. (is_intel): Replace __cpu_features with GLRO(dl_x86_cpu_features). (is_amd): Likewise. (max_cpuid): Likewise. (intel_check_word): Likewise. (__cache_sysconf): Don't call __init_cpu_features. (__x86_preferred_memory_instruction): Removed. (init_cacheinfo): Don't call __init_cpu_features. Replace __cpu_features with GLRO(dl_x86_cpu_features). * sysdeps/x86_64/dl-machine.h: <cpu-features.c>. (dl_platform_init): Call init_cpu_features. * sysdeps/x86_64/ldsodefs.h: Include <cpu-features.h>. * sysdeps/x86_64/multiarch/Makefile (aux): Remove init-arch. * sysdeps/x86_64/multiarch/Versions: Removed. * sysdeps/x86_64/multiarch/cacheinfo.c: Likewise. * sysdeps/x86_64/multiarch/init-arch.c: Likewise. * sysdeps/x86_64/multiarch/ifunc-defines.sym (KIND_OFFSET): Removed. * sysdeps/x86_64/multiarch/init-arch.h: Rewrite.
2015-08-11Remove unused definition of __openat(64)_nocancelAndreas Schwab
2015-08-10Readd O_LARGEFILE flag for openat64 (bug 18781)Andreas Schwab
2015-08-08hppa: put custom madvise defines behind __USE_MISCMike Frysinger
No other arch exports these defines, and having them in the default namespace causes conformance header tests to fail. Put them behind the __USE_MISC define as that is what other arches seem to use.
2015-08-08hppa: Fix miscompilation of sched_setaffinity() [BZ #18480]John David Anglin
The attached change fixes the miscompilation of sched_setaffinity() on hppa. This is an old problem that was fixed on other architectures using a similar approach to the attached change. See: https://sourceware.org/ml/libc-hacker/2004-04/msg00016.html Build tested on trunk. Patch has been applied to debian glibc for some time.
2015-08-08hppa: Fix reload error with atomic code [BZ #18787]John David Anglin
As noted in the bug, the asm operands need to be copied to register variables to avoid operand reloads in the principal asm of the macro. See the arm implementation for reference. Otherwise we get: ../sysdeps/unix/sysv/linux/hppa/bits/atomic.h:68:6: error: can't find a register in class 'R1_REGS' while reloading 'asm' Build tested on trunk with gcc-4.8. Similar patch has been tested with 2.19 on Debian hppa-unknown-linux-gnu.
2015-08-07microblaze: include unix/sysdep.hMike Frysinger
The semi-recent SYSCALL_CANCEL inclusion broke microblaze due to the sysdep.h header not including the unix/sysdep.h header. Include it here like all other ports.
2015-08-05Properly terminate FDE in makecontext for m68k (bug 18635)Andreas Schwab
2015-08-05Align stack to 16 bytes when calling __gettimeofdayH.J. Lu
Subtract stack by 24 bytes instead of 16 bytes so that stack is aligned to 16 bytes when calling __gettimeofday. [BZ #18661] * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedwait_tid): Align stack to 16 bytes when calling __gettimeofday.
2015-08-05Align stack to 16 bytes when calling __setcontextH.J. Lu
Don't use pop to restore %rdi so that stack is aligned to 16 bytes when calling __setcontext. [BZ #18661] * sysdeps/unix/sysv/linux/x86_64/__start_context.S (__start_context): Don't use pop to restore %rdi so that stack is aligned to 16 bytes when calling __setcontext.
2015-08-05arm: Assembly implementation cleanupAdhemerval Zanella
This patch removes arm assembly implementation of mmap and mmap64. The new implementation used is the wordsize-32 generic linux one. Tested on armhf.
2015-08-05mmap64: fix undef warningsMike Frysinger
The only target that defines this is m68k, so move the existing fallback define up to avoid warnings on other systems.
2015-08-04Properly terminate FDE in makecontext for ix86 (bug 18635)Andreas Schwab
2015-07-30hppa: Remove custom lowlevellock.h.Torvald Riegel
This untested patch removes the custom lowlevellock.h on hppa. It seems to contain an implementation equivalent to the generic lowlevellock.h.
2015-07-29hppa: sigaction.h: change sa_flags to an intMike Frysinger
This fixes the conform test for the sigaction.h header and makes it match all the other arches.
2015-07-29hppa: fix sysdep.h header setupMike Frysinger
The semi-recent SYSCALL_CANCEL inclusion broke hppa due to the sysdep.h headers not including the unix/sysdep.h headers. Rework the includes so we match the other ports: * hppa/sysdep.h: - Do not include sys/syscall.h as the unix sysdep.h headers do it. - Do not include config.h as libc-symbols.h does it, and it has no #ifdef multiple-include protection, and it breaks when some files do things like #undef __OPTIMIZE__. * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: - Drop the generic/sysdep.h as the unix sysdep.h headers include it. * sysdeps/unix/sysv/linux/hppa/sysdep.h: - Change to the unix & core hppa sysdep header stacks. - Undef a few defines that the core headers already set up for us.
2015-07-29hppa: rewrite INLINE_SYSCALLMike Frysinger
The semi-recent SYSCALL_CANCEL macro imposes a slight nuance on the implementation of INLINE_SYSCALL: the nr argument cannot be expanded directly but must be passed on to another macro which may expand it. Most arches don't notice because INLINE_SYSCALL is defined in terms of INTERNAL_SYSCALL which has the additional layer of expansion, but on hppa, it was attempting to expand it directly. That causes build errors like so: ../sysdeps/unix/sysv/linux/sigsuspend.c: In function '__sigsuspend': ../sysdeps/unix/sysv/linux/sigsuspend.c:31:62: error: implicit declaration of function 'LOAD_ARGS___SYSCALL_NARGS' ../sysdeps/unix/sysv/linux/sigsuspend.c:31:304: error: called object 'LOAD_ARGS___SYSCALL_NARGS(set, 8)' is not a function So rewrite hppa's INLINE_SYSCALL to use INTERNAL_SYSCALL like other arches do. This is also a nice clean up as the two macros had quite a bit of duplicated logic.
2015-07-29Extend local PLT reference checkH.J. Lu
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.
2015-07-28ia64: drop __tls_get_addr from expected ld.so plt usageMike Frysinger
This file was updated with an educated guess as to the symbols needed, but on ia64, we don't have __tls_get_addr calls, so drop it from the list.
2015-07-28ia64: clean up old kernel headers cruftMike Frysinger
This define made more sense in the pre-sanitized kernel headers days, but since we require kernel versions that are sanitized, we don't need this hack anymore.
2015-07-24Fix order of arguments to rt_sigprocmask syscall when setting the signal maskChung-Lin Tang
in setcontext/swapcontext.
2015-07-23ia64: sigaction.h: fix sa_flags orderingMike Frysinger
Since ia64 is little endian, sa_flags has to come before the padding when splitting it from 64bits to 32bits. Reported-by: Joseph Myers <joseph@codesourcery.com>
2015-07-21ia64: msg.h: fix msg_qnum/msg_qbytes typesMike Frysinger
These two fields have dedicated types, so change the ia64 header to match all the other arches. This fixes the conform test for msg.h.
2015-07-21ia64: stat.h: rename pad0 to __glibc_reserved0Mike Frysinger
This fixes the conform test for the stat.h header and makes it match all the other arches.
2015-07-21ia64: sifaction.h: change sa_flags to an intMike Frysinger
This fixes the conform test for the sigaction.h header and makes it match all the other arches.
2015-07-21ia64: siginfo.h: delete siginfo nameMike Frysinger
This fixes the conform test for the siginfo.h header and makes it match all the other arches.
2015-07-21tile: Fix BZ #18508 (makecontext yield infinite backtrace)Chris Metcalf
It turns out tile suffered from the same problem as S390. However, disabling CFI information for the __startcontext on tile was not sufficient to fix the problem; I think the backtracer will just blindly try to follow the link register (lr) in that case. Instead, the change adds a cfi_undefined directive for "lr" and then arranges to call __startcontext directly when the new context starts, rather than just synthesizing a return to it. In addition to being a bit easier now to understand the control flow, this also allows the cfi_undefined directive to be placed in a way that causes it to be in force at the address that the "lr" from the called function points to.
2015-07-20sparc: fix sigaction for 32bit builds [BZ #18694]Mike Frysinger
Commit a059d359d86130b5fa74e04a978c8523a0293f77 changed the sigaction struct to pass conform tests, but it ended up also changing the ABI for 32 bit builds. For 64 bit builds, changing the long to two ints works, but for 32 bit builds, it inserts 4 extra bytes. This leads to many packages randomly failing like bash that spews things like: configure: line 471: wait_for: No record of process 0 Bracket the new member by a wordsize check to fix the ABI for 32bit.
2015-07-20Add si_addr_bnd to _sigfault in x86 struct siginfoH.J. Lu
X86 struct siginfo in kernel 3.19 has been changed by commit ee1b58d36aa1b5a79eaba11f5c3633c88231da83 Author: Qiaowei Ren <qiaowei.ren@intel.com> Date: Fri Nov 14 07:18:19 2014 -0800 mpx: Extend siginfo structure to include bound violation information This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. This patch updates x86 struct siginfo to enable GDB with MPX support. [BZ #18696] * sysdeps/unix/sysv/linux/x86/bits/siginfo.h (_sigfault): Add si_addr_bnd. (si_lower): New. (si_upper): Likewise.
2015-07-10Add and use new glibc-internal futex API.Torvald Riegel
This adds new functions for futex operations, starting with wait, abstimed_wait, reltimed_wait, wake. They add documentation and error checking according to the current draft of the Linux kernel futex manpage. Waiting with absolute or relative timeouts is split into separate functions. This allows for removing a few cases of code duplication in pthreads code, which uses absolute timeouts; also, it allows us to put platform-specific code to go from an absolute to a relative timeout into the platform-specific futex abstractions.. Futex operations that can be canceled are also split out into separate functions suffixed by "_cancelable". There are separate versions for both Linux and NaCl; while they currently differ only slightly, my expectation is that the separate versions of lowlevellock-futex.h will eventually be merged into futex-internal.h when we get to move the lll_ functions over to the new futex API.
2015-07-09PLT avoidance for _exit in rtld.Roland McGrath
2015-07-09libio: Update powerpc64le libc.abilistAdhemerval Zanella
This patch adds the missing fmemopen entry for powerpc64le libc abilist check file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
2015-07-09[AArch64][BZ 18648] change greg_t definition in ucontext.hSzabolcs Nagy
This is an ABI breaking change, but typedef int greg_t; is not a useful definition on aarch64. greg_t is usually used for defining gregset_t which is used in mcontext_t. The general registers in mcontext_t can only be accessed by target specific code and on aarch64 greg_t is not needed for that so this change is not supposed to break existing code, just fix the definition. [BZ #18648] * sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h (greg_t): Change the definition to elf_greg_t. (Added another BZ entry that was missed in the previous commit).
2015-07-09[AArch64][BZ 18400] fix elf_prpsinfo in procfs.hSzabolcs Nagy
Kernel uses int pr_uid, pr_gid, but glibc used unsigned short. This is an ABI breaking change, but the size and alignment of the struct and the layout of other members is not changed and there is no known usage of pr_uid and pr_gid so it is expected to be safe. [BZ #18400] * sysdeps/unix/sysv/linux/aarch64/sys/procfs.h (struct elf_prpsinfo): Fix pr_uid and pr_gid members.