about summary refs log tree commit diff
path: root/sysdeps
Commit message (Collapse)AuthorAgeFilesLines
* sparc: fix sigaction for 32bit builds [BZ #18694] gentoo/2.20Mike Frysinger2015-07-201-0/+4
| | | | | | | | | | | | | | 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. (cherry picked from commit 7fde904c73c57faea48c9679bbdc0932d81b3a2f) (cherry picked from commit ed99e5f9cc6471745488f269d16ee5b127944a85)
* Merge branch 'release/2.20/master' into 'gentoo/2.20'Mike Frysinger2015-02-1712-16/+26
|\
| * Use AVX unaligned memcpy only if AVX2 is availableH.J. Lu2015-02-168-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memcpy with unaligned 256-bit AVX register loads/stores are slow on older processorsl like Sandy Bridge. This patch adds bit_AVX_Fast_Unaligned_Load and sets it only when AVX2 is available. [BZ #17801] * sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): Set the bit_AVX_Fast_Unaligned_Load bit for AVX2. * sysdeps/x86_64/multiarch/init-arch.h (bit_AVX_Fast_Unaligned_Load): New. (index_AVX_Fast_Unaligned_Load): Likewise. (HAS_AVX_FAST_UNALIGNED_LOAD): Likewise. * sysdeps/x86_64/multiarch/memcpy.S (__new_memcpy): Check the bit_AVX_Fast_Unaligned_Load bit instead of the bit_AVX_Usable bit. * sysdeps/x86_64/multiarch/memcpy_chk.S (__memcpy_chk): Likewise. * sysdeps/x86_64/multiarch/mempcpy.S (__mempcpy): Likewise. * sysdeps/x86_64/multiarch/mempcpy_chk.S (__mempcpy_chk): Likewise. * sysdeps/x86_64/multiarch/memmove.c (__libc_memmove): Replace HAS_AVX with HAS_AVX_FAST_UNALIGNED_LOAD. * sysdeps/x86_64/multiarch/memmove_chk.c (__memmove_chk): Likewise. (cherry picked from commit 5f3d0b78e011d2a72f9e88b0e9ef5bc081d18f97) Conflicts: ChangeLog NEWS
| * [AArch64] End frame record chain correctly.Renlin Li2014-11-111-1/+0
| |
| * MIPS: Avoid a dangling `vfork@GLIBC_2.0' referenceMaciej W. Rozycki2014-10-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This satisfies a symbol reference created with: .symver __libc_vfork, vfork@GLIBC_2.0 where `__libc_vfork' has not been defined or referenced. In this case the `vfork@GLIBC_2.0' reference is supposed to be discarded, however a bug present in GAS since forever causes an undefined symbol table entry to be created. This in turn triggers a problem in the linker that can manifest itself by link errors such as: ld: libpthread.so: invalid string offset 2765592330 >= 5154 for section `.dynstr' The GAS and linker bugs need to be resolved, but we can avoid them too by providing a `__libc_vfork' definition just like our other platforms. [BZ #17485] * sysdeps/unix/sysv/linux/mips/vfork.S (__libc_vfork): Define. (cherry picked from commit b5af9297d51a43f96c5be1bafab032184690dd6f) Conflicts: NEWS
| * Handle zero prefix length in getifaddrs (BZ #17371)Andreas Schwab2014-09-161-7/+4
| | | | | | | | | | | | | | (cherry picked from commit a7b872687073decdcc7effc2289877d69058aca9) Conflicts: NEWS
| * Add new Linux 3.16 constants to netinet/udp.h.Joseph Myers2014-09-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the new constants UDP_NO_CHECK6_TX and UDP_NO_CHECK6_RX from Linux 3.16 to sysdeps/gnu/netinet/udp.h. (I believe the existing constants there are already Linux-specific, possibly with the intention that other OSes should adopt the same values if possible if adopting the features in question.) Tested on x86_64. * sysdeps/gnu/netinet/udp.h (UDP_NO_CHECK6_TX): New macro. (UDP_NO_CHECK6_RX): Likewise. (cherry picked from commit 0bd72468030947254e7de183cac1014dac884475)
* | arm: drop EABI checkMike Frysinger2014-11-222-27/+0
| | | | | | | | | | | | | | | | GCC marked OABI obsolete in 4.7 and dropped it in 4.8. So the number of people this is catching is shrinking every day. At this point, it's not terribly useful, so just drop it. (cherry picked from commit 34d97d87bb1c08e34d08a9d4be24a3b1d53a4ddb)
* | hppa: fix __O_SYNC to match the kernelJohn David Anglin2014-08-101-1/+1
| |
* | hppa: fix pthread spinlockJohn David Anglin2014-08-102-8/+8
| |
* | hppa: fix bug in floating point exception supportJohn David Anglin2014-08-102-5/+5
| |
* | hppa: fix build problems with atomic codeJohn David Anglin2014-08-101-30/+34
| | | | | | | | | | | | Specifically: ../sysdeps/unix/sysv/linux/hppa/bits/atomic.h:68:6: error: can’t find a register in class ‘R1_REGS’ while reloading ‘asm’
* | hppa: name setjmp unionJohn David Anglin2014-08-101-1/+1
| | | | | | | | | | | | | | | | | | Some of the C++ tests want this, and this is what all other arches have done, so do it on hppa too. 2013-07-07 John David Anglin <dave.anglin@bell.net> * ports/sysdeps/hppa/bits/setjmp.h: Name anonymous union.
* | arm: fix PIC vs SHARED typosDavid Lamparter2013-08-162-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the logic in setjmp/__longjmp incorrectly tie to "PIC" to figure out whether the code is going into a shared library when it should be using "SHARED". otherwise, building static PIC code goes wrong. https://bugs.gentoo.org/336914 http://sourceware.org/ml/libc-ports/2011-09/msg00018.html 2011-09-19 David Lamparter <equinox-gentoo@diac24.net> * sysdeps/arm/setjmp.S: Change PIC to SHARED. * sysdeps/arm/__longjmp.S: Likewise
* | nptl: handle EAGAIN with some futex operationsCarlos O'Donell2013-08-162-4/+4
| | | | | | | | https://bugs.gentoo.org/452184
* | workaround crash when handling signals in static PIEsMike Frysinger2013-05-041-1/+1
|/ | | | | | | | | | work around ... not entirely sure what is going on here. 2011-03-01 squeezy <vina@mailserver.eu> * sysdeps/unix/sysv/linux/x86_64/sigaction.c fix the __restore_rt symbol http://bugs.gentoo.org/283470
* [BZ #17354] tile: Fix up corner cases with signed relocationsChris Metcalf2014-09-061-18/+23
| | | | | | | | | | | | | | | | | | Some types of relocations technically need to be signed rather than unsigned: in particular ones that are used with moveli or movei, or for jump and branch. This is almost never a problem. Jump and branch opcodes are pretty much uniformly resolved by the static linker (unless you omit -fpic for a shared library, which is not recommended). The moveli and movei opcodes that need to be sign-extended generally are for positive displacements, like the construction of the address of main() from _start(). However, tst-pie1 ends up with main below _start (in a different module) and the test failed due to signedness issues in relocation handling. This commit treats the value as signed when shifting (to preserve the high bit) and also sign-extends the value generated from the updated bundle when comparing with the desired bundle, which we do to make sure no overflow occurred. As a result, the tst-pie1 test now passes.
* Define __GI_fegetenv for e500 libmKhem Raj2014-09-021-0/+1
| | | | | | | | | | | generic HAVE_RM_CTX implementation which is used for ppc/e500 as well has introduced calls to fegetenv which should be resolved internally with in libm Signed-off-by: Khem Raj <raj.khem@gmail.com> * sysdeps/powerpc/powerpc32/e500/nofpu/fegetenv.c (fegetenv): Add libm_hidden_ver.
* Fix hang on forkSamuel Thibault2014-08-281-0/+4
| | | | | | | | | | If e.g. a signal is being received while we are running fork(), the signal thread may be having our SS lock when we make the space copy, and thus in the child we can not take the SS lock any more. * sysdeps/mach/hurd/fork.c (__fork): Lock SS->lock around __proc_dostop call. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* i386 TLS_INIT_TP might produce bogus asm changing stack pointer [BZ #17319]Mark Wielaard2014-08-281-29/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TLS_INIT_TP in sysdeps/i386/nptl/tls.h uses some hand written asm to generate a set_thread_area that might result in exchanging ebx and esp around the syscall causing introspection tools like valgrind to loose track of the user stack. Just use INTERNAL_SYSCALL which makes sure esp isn't changed arbitrarily. Before the patch the code would generate: mov $0xf3,%eax movl $0xfffff,0x8(%esp) movl $0x51,0xc(%esp) xchg %esp,%ebx int $0x80 xchg %esp,%ebx Using INTERNAL_SYSCALL instead will generate: movl $0xfffff,0x8(%esp) movl $0x51,0xc(%esp) xchg %ecx,%ebx mov $0xf3,%eax int $0x80 xchg %ecx,%ebx Thanks to Florian Weimer for analysing why the original code generated the bogus esp usage: _segdescr.desc happens to be at the top of the stack, so its address is in %esp. The asm statement says that %3 is an input, so its value will not change, and GCC can use %esp as the input register for the expression &_segdescr.desc. But the constraints do not fully describe the asm statement because the %3 register is actually modified, albeit only temporarily. [BZ #17319] * sysdeps/i386/nptl/tls.h (TLS_INIT_TP): Use INTERNAL_SYSCALL to call set_thread_area instead of hand written asm. (__NR_set_thread_area): Removed define. (TLS_FLAG_WRITABLE): Likewise. (__ASSUME_SET_THREAD_AREA): Remove check. (TLS_EBX_ARG): Remove define. (TLS_LOAD_EBX): Likewise.
* Simplify atomicity of socket creation in bind.Samuel Thibault2014-08-281-22/+18
|
* Update x86 ULPsAllan McRae2014-08-271-4/+4
| | | | Using gcc-4.9, i7-2620M, i686 Linux.
* Remove unnecessary uses of NOT_IN_libcSiddhesh Poyarekar2014-08-2127-31/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a IS_IN_* macro is defined, then NOT_IN_libc is always defined, except obviously for IS_IN_libc. There's no need to check for both. Verified on x86_64 and i686 that the source is unchanged. * include/libc-symbols.h: Remove unnecessary check for NOT_IN_libc. * nptl/pthreadP.h: Likewise. * sysdeps/aarch64/setjmp.S: Likewise. * sysdeps/alpha/setjmp.S: Likewise. * sysdeps/arm/sysdep.h: Likewise. * sysdeps/i386/setjmp.S: Likewise. * sysdeps/m68k/setjmp.c: Likewise. * sysdeps/posix/getcwd.c: Likewise. * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. * sysdeps/powerpc/powerpc64/setjmp-common.S: 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/sysv/linux/aarch64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise. * sysdeps/unix/sysv/linux/ia64/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/sparc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * sysdeps/x86_64/setjmp.S: Likewise.
* Fix powerpc32 __get_clockfreq for non-power4 (bug 17263).Joseph Myers2014-08-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In my powerpc32 testing I've observed misc/test-gettimebasefreq failing. This is a glibc build (soft-float, though that's not relevant here) without any --with-cpu and without any special configuration of the default CPU for GCC either. In particular, it's one not using sysdeps/powerpc/powerpc32/power4/hp-timing.h (although in fact the processor I'm using for testing is POWER4-based), so hp_timing_t is 32-bit not 64-bit. But the VDSO call being used by INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK is generating a 64-bit result (high part in r3, low part in r4). The code extracting that result, however, expects a result of the type hp_timing_t as passed to INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK, meaning that only r3 (= 0) is used and the value in r4 is ignored. This patch fixes this by always using uint64_t as the type in INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK - reflecting the actual ABI (unconditional in the kernel) of that VDSO call. This is the minimal change for this issue - no check for overflow, no change of the type of the timebase_freq variable or the return type of __get_clockfreq to something other than hp_timing_t (such a change would simply move the implicit conversions to the over callers of that function), no change to hp_timing_t itself. Tested for powerpc32 soft float. [BZ #17263] * sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c: Include <stdint.h>. (__get_clockfreq): Use uint64_t instead of hp_timing_t in INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK call.
* Fix comment error that Jakub pointed out but I forgot to fixSiddhesh Poyarekar2014-08-131-1/+1
|
* Disable x87 inline functions for x86_64 and SSE [BZ #17262]Siddhesh Poyarekar2014-08-131-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Since: commit 409e00bd69b8d8dd74d7327085351d26769ea6fc Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Jan 29 07:51:41 2014 -0800 Disable x87 inline functions for SSE2 math When i386 and x86-64 mathinline.h was merged into a single mathinline.h, "gcc -m32" enables x87 inline functions on x86-64 even when -mfpmath=sse and SSE2 is enabled. It is a regression on x86-64. We should check __SSE2_MATH__ instead of __x86_64__ when disabling x87 inline functions. gcc-3.2 is unable to correctly compile x86_64 routines for llrint since it gets redefined. This is because gcc 3.2 does not set __SSE2_MATH__ for x86_64, thus exposing the duplicate definition. The correct fix ought to be to check for both __SSE2_MATH__ and __x86_64__ and enable those bits only when neither are defined. Tested fix with the reproducer for 409e00bd69b8d8dd74d7327085351d26769ea6fc as well as with gcc-3.2.
* Replace cpuid asm statement with __cpuid_countH.J. Lu2014-08-121-3/+1
| | | | | | | | | | | The compiler doesn't know that the cpuid asm statement in intel_check_word will trash RBX. We are lucky that it doesn't cause any problems since RBX is also used by compiler for other purposes so that RBX is saved and restored. This patch replaces it with __cpuid_count. [BZ #17259] * sysdeps/x86_64/cacheinfo.c (intel_check_word): Replace cpuid asm statement with __cpuid_count.
* Fix powerpc-nofpu __fe_enabled_env and __fe_nonieee_env (bug 17261).Joseph Myers2014-08-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | On powerpc, floating-point environment macros are defined as pointers to constants in the library that contain the bit-patterns of the desired environment, instead of being magic constants cast to pointer type. For soft-float, the bit-patterns used for fenv_t are not laid out the same as for hard-float. (e500 has a third layout used; that's not an ABI issue because these values are only meaningful within a single process, all of whose glibc libraries must come from the same build of glibc.) While the __fe_dfl_env value for soft-float was appropriate for the soft-float fenv_t representation, the other two constants had the same bit-patterns as for hard-float. Those bit patterns had the effect of having exceptions already raised, causing math/test-fenv-return to fail; this patch fixes the patterns used. (__fe_nonieee_env also had exceptions unmasked, though they should be masked to match hard-float semantics. Since there is no separate non-IEEE mode for soft-float, it's most appropriate for __fe_nonieee_env to be the same as __fe_dfl_env; this patch makes it an alias.) Tested for powerpc-nofpu. [BZ #17261] * sysdeps/powerpc/nofpu/fenv_const.c (__fe_enabled_env): Change value to 0. (__fe_nonieee_env): Define as an alias for __fe_dfl_env.
* Check value of futex before updating in __lll_timedlockBernard Ogden2014-08-121-1/+4
| | | | | | | | 2014-08-12 Bernard Ogden <bernie.ogden@linaro.org> [BZ #16892] * sysdeps/nptl/lowlevellock.h (__lll_timedlock): Use atomic_compare_and_exchange_bool_acq rather than atomic_exchange_acq.
* This patch adds new function libc_feholdsetround_noex_aarch64_ctx, enablingWilco Dijkstra2014-08-071-3/+27
| | | | | | | further optimization. libc_feholdsetround_aarch64_ctx now only needs to read the FPCR in the typical case, avoiding a redundant FPSR read. Performance results show a good improvement (5-10% on sin()) on cores with expensive FPCR/FPSR instructions.
* Fix performance issue in misaligned strcpy.Wilco2014-08-071-3/+3
|
* PowerPC: Fix termios definitionsAdhemerval Zanella2014-08-062-50/+73
| | | | | | | | | | | This patch fixes the incorrect guard by __USE_MISC of struct winsize and struct termio in powerpc termios header. Current states leads to build failures if the program defines _XOPEN_SOURCE, but not _DEFAULT_SOURCE or either _BSD_SOURCE or _SVID_SOURCE. Without any definition, __USE_MISC will not be defined and neither the struct definitions. This patch copies the default Linux ioctl-types.h by adjusting only the character control field (c_cc) size in struct termio.
* alpha: Fix exception raising from soft-fpRichard Henderson2014-08-054-12/+12
| | | | | | Use the SSI_IEEE_RAISE_EXCEPTION function as from feraiseexcept, instead of __ieee_get+set_fp_status. Always raise the FP exceptions from float-to-integer conversion.
* alpha: Remove linux lowlevellock.hRichard Henderson2014-08-051-305/+0
| | | | For real this time.
* MIPS - Remove mips lowlevellock.h.Bernard Ogden2014-08-041-354/+0
| | | | * sysdeps/unix/sysv/linux/mips/lowlevellock.h: Remove file.
* AArch64: Remove lowlevellock.hWill Newton2014-08-041-312/+0
| | | | | | | | | | | | | Remove lowlevellock.h in favour of the generic implementation. The generic implementation was tested natively and introduces no regressions. ChangeLog: 2014-08-04 Will Newton <will.newton@linaro.org> * sysdeps/unix/sysv/linux/aarch64/lowlevellock.h: Remove file.
* ia64: define nocancel entry points in PSEUDOMike Frysinger2014-08-041-0/+19
| | | | | | | | | | | | | | The previous set of not-cancel.h headers (prior to the commit 2fbdf5339aaeaa423bd661524f7ec7af41fa2606) did not require the arch to define nocancel entry points, so ia64 never did. However, after the various files were merged, it became a hard requirement for arches which mean ia64 failed to build. Here we add dedicated entry points. It'd be nice to merge with the existing stubs like other arches do, but the ia64 asm does not lend itself to interleaving of functions. If someone has a suggestion on merging these, that'd be great, but at least now we build & pass tests again.
* IA64: Consolidate nptl/ subdirectories under linux/...Roland McGrath2014-08-0431-17/+18
|
* IA64: Move NPTL public headers to sysdeps/ia64/nptl/.Roland McGrath2014-08-043-0/+0
|
* IA64: Define TLS_DEFINE_INIT_TPRoland McGrath2014-08-043-25/+6
|
* IA64: Consolidate NPTL/non versions of vforkRoland McGrath2014-08-044-131/+79
|
* IA64: Consolidate NPTL/non versions of cloneRoland McGrath2014-08-042-11/+0
|
* Fix missing <math_private.h> in ldbl-96 fmaAndreas Schwab2014-08-041-0/+1
|
* Remove sysdeps/unix/sysv/linux/arm/lowlevellock.hRoland McGrath2014-08-011-307/+0
|
* Force eval for fma implementationsRichard Henderson2014-08-014-20/+24
|
* ARM: Move PTR_MANGLE et al out of Linux-specific file.Roland McGrath2014-08-012-44/+48
|
* Add __safe_fatal and use it in __pthread_unwind forwarder fallback.Roland McGrath2014-07-312-0/+70
|
* Use __builtin_trap for ABORT_INSTRUCTION.Roland McGrath2014-07-311-1/+30
|
* Split nptl-signals.h out from pthreadP.hRoland McGrath2014-07-312-0/+55
|
* [PATCH] S390: Fix remaining ONE_DIRECTION warning messagesStefan Liebler2014-07-313-0/+3
| | | | | | | | | | | | | | This patch fixes the remaining ONE_DIRECTION warnings for s390 specific conversions. It defines ONE_DIRECTION to 0 like the patch from Steve Ellcey: https://www.sourceware.org/ml/libc-alpha/2014-05/msg00039.html Changelog: * sysdeps/s390/s390-64/utf16-utf32-z9.c (ONE_DIRECTION): Define. * sysdeps/s390/s390-64/utf8-utf16-z9.c (ONE_DIRECTION): Define. * sysdeps/s390/s390-64/utf8-utf32-z9.c (ONE_DIRECTION): Define.