about summary refs log tree commit diff
path: root/sysdeps
Commit message (Collapse)AuthorAgeFilesLines
* Split __kernel_standard* functions (fixes bug 17724).Joseph Myers2014-12-223-90/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 17724 reports references to fesetround being brought in by ldbl-128ibm rintl via references to __rintl from __kernel_standard_l. Because all three __kernel_standard* functions are in the same file, this gets brought in even though only the long double version __kernel_standard_l needs __rintl, and the C90 functions use only __kernel_standard. This patch fixes this by splitting the three versions into separate files; it's fine for long double functions to refer to fe* functions directly, unless they get called by C90 double functions. Tested for x86_64 (testsuite; the reordering of code means disassembly of shared libraries can't usefully be compared). Tested for powerpc that the relevant issue disappears from the linknamespace test output. [BZ #17724] * sysdeps/ieee754/k_standard.c: Don't include <float.h>. (__kernel_standard_f): Remove. Moved to k_standardf.c. (__kernel_standard_l): Remove. Moved to k_standardl.c with (char *) casts added. * sysdeps/ieee754/k_standardf.c: New file. * sysdeps/ieee754/k_standardl.c: Likewise. * math/Makefile (libm-support): Remove k_standard. (libm-calls): Add k_standard.
* Call libc_fetestexcept_aarch64.Wilco Dijkstra2014-12-221-7/+2
|
* Call libc_fesetround_aarch64.Wilco Dijkstra2014-12-221-20/+5
|
* Fix resolver bind, getsockname namespace (bug 17733).Joseph Myers2014-12-222-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | On Linux architectures using socketcall, the resolver ends up bringing in strong symbols for bind and getsockname, which are not in POSIX.1-1996. This causes linknamespace test failures: FAIL: conform/POSIX/pthread.h/linknamespace FAIL: conform/POSIX/sched.h/linknamespace FAIL: conform/POSIX/time.h/linknamespace These functions are defined as strong symbols with __bind and __getsockname as weak aliases. This patch switches this to the other way round by removing the NO_WEAK_ALIAS definitions and so letting the default case in socket.S act; I see no reason for the existing arrangements. Tested for x86 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17733] * sysdeps/unix/sysv/linux/bind.S (NO_WEAK_ALIAS): Do not define. (__bind): Do not define as weak alias. * sysdeps/unix/sysv/linux/getsockname.S (NO_WEAK_ALIAS): Do not define. (__getsockname): Do not define as weak alias.
* tile: separate ffsll from ffsChris Metcalf2014-12-212-11/+33
| | | | | This avoids a linknamespace failure when ffs is legal but ffsll is not.
* tile: remove localplt.data and use generic one again.Chris Metcalf2014-12-211-18/+0
| | | | With the __tls_get_addr removed, it works for tile.
* Add hidden __tls_get_addr/___tls_get_addr aliasH.J. Lu2014-12-215-15/+10
| | | | | | | | | | | | | | | | | | | | __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.
* m68k: remove @PLTPC from _dl_init callAndreas Schwab2014-12-211-1/+1
|
* Remove @PLT from "call _dl_init@PLT" in _dl_start_userH.J. Lu2014-12-212-2/+2
| | | | | | | | | | _dl_start_user in ld.so calls the local function _dl_init. There is no need to go through PLT. * sysdeps/i386/dl-machine.h (_dl_start_user): Remove @PLT from "call _dl_init@PLT". * sysdeps/x86_64/dl-machine.h (_dl_start_user): Likewise. from "call _dl_init@PLT".
* tile: provide localplt.data with __tls_get_addr optionalChris Metcalf2014-12-201-0/+18
|
* tilegx: fix strstr to build and link betterChris Metcalf2014-12-191-1/+2
| | | | | | | | The two_way_short_needle() routine included from str-two-way.h is not used, so mark it so to avoid compiler warnings. Calling strnlen() breaks linknamespace tests, so change it to __strnlen().
* Remove trailing white space.Steve Ellcey2014-12-191-1/+0
|
* 2014-12-19 Steve Ellcey <sellcey@imgtec.com>Steve Ellcey2014-12-196-0/+182
| | | | | | | | | | * sysdeps/mips/addmul_1.S (__mpn_addmul_1): Use mulu/muhu instead of multu on MIPSr6. * sysdeps/mips/mul_1.S (__mpn_mul_1): Ditto. * sysdeps/mips/submul_1.S (__mpn_submul_1): Ditto. * sysdeps/mips/mips64/addmul_1.S (__mpn_addmul_1): Ditto. * sysdeps/mips/mips64/mul_1.S (__mpn_mul_1): Ditto. * sysdeps/mips/mips64/submul_1.S (__mpn_submul_1): Ditto.
* 2014-12-19 Steve Ellcey <sellcey@imgtec.com>Steve Ellcey2014-12-192-4/+16
| | | | | | | | | | * sysdeps/mips/sys/asm.h (PTR_ADDU): Use addu on mips32r6/mips64r6. (PTR_ADDIU): Use addiu for mips32r6/mips64r6. (PTR_SUBU): Use subu for mips32r6/mips64r6. (PTR_SUBIU): Use subu for mips32r6/mips64r6 (subiu does not exist). * sysdeps/mips/machine-gmon.h (PTR_ADDU_STRING) Use addu for mips32r6/mips64r6. (PTR_SUBU_STRING) Use subu for mips32r6/mips64r6.
* Fix soft-fp build warning on sparc about strict aliasing.David S. Miller2014-12-191-6/+11
| | | | | * sysdeps/sparc/sparc32/soft-fp/q_neg.c (_Q_neg): Use a union to access the quad as both a long double and as a series of 4 words.
* Replace -Wno-error with -fno-builtin-lroundH.J. Lu2014-12-191-2/+2
|
* i386: Move futex functions from lowlevellock.h to lowlevellock-futex.h.Torvald Riegel2014-12-192-110/+157
|
* Use generic lowlevellock-futex.h in x86_64 lowlevellock.h.Torvald Riegel2014-12-192-120/+24
|
* sh: Remove custom lowlevellock, barrier, condvar, and rwlock implementations.Torvald Riegel2014-12-1919-5572/+0
|
* Compile s_llround.c with -Wno-error for x32 buildH.J. Lu2014-12-191-0/+6
| | | | | | Since x32 returns 32-bit long int and 64-bit long long int in the same 64-bit register, we make the 32b-bit lround an alias of the 64-bit llround. Add -Wno-error for x32 build to silence the compiler.
* Replace 1L with (mp_limb_t) 1H.J. Lu2014-12-191-1/+1
| | | | | | | | | | | | | | | X86-64 and x32 use sysdeps/i386/ldbl2mpn.c. res_ptr is a pointer to mp_limb_t, which is long for i386 and x86-64 and long long for x32. On x32, I got ../sysdeps/x86_64/../i386/ldbl2mpn.c: In function ‘__mpn_extract_long_double’: ../sysdeps/x86_64/../i386/ldbl2mpn.c:72:4: error: left shift count >= width of type [-Werror] res_ptr[N - 1] &= ~(1L << ((LDBL_MANT_DIG - 1) % BITS_PER_MP_LIMB)); ^ cc1: all warnings being treated as errors This patch replaces 1L with (mp_limb_t) 1. Verified on x32, i686 and x86-64 with GCC 4.8.3.
* NPTL: Move fork state variables to initializer files.Roland McGrath2014-12-171-8/+0
|
* NPTL: Remove gratuitous Linuxisms from gai_misc.h.Roland McGrath2014-12-171-6/+6
|
* Fix profil_counter namespace (bug 17725).Joseph Myers2014-12-1714-20/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use PTR_MANGLE on libgcc unwinder function pointers.Roland McGrath2014-12-161-3/+12
|
* Revert "Use pragmas rather than makefiles for necessary options for unwind ↵Roland McGrath2014-12-164-6/+2
| | | | | | code." This reverts commit c324fcfe75c3976ae0b16943df00710e1d0d74f7.
* Use pragmas rather than makefiles for necessary options for unwind code.Roland McGrath2014-12-164-2/+6
|
* Fix x86_64 memrchr namespace (bug 17719).Joseph Myers2014-12-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | On x86_64, memrchr (not a standard function) is defined as a strong symbol, instead of a weak alias of __memrchr as on other architectures. This results in linknamespace test failures from the use of __memrchr from dirname. (Not a conformance issue because of the mem* reservation, but contrary to glibc conventions.) This patch makes x86_64 follow other architectures by defining memrchr as a weak alias. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17719] * sysdeps/x86_64/memrchr.S (memrchr): Rename to __memrchr and define as weak alias of __memrchr. (__memrchr): Do not define as strong alias of memrchr. * conform/Makefile (test-xfail-XPG4/libgen.h/linknamespace): Remove variable. (test-xfail-UNIX98/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K/libgen.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/libgen.h/linknamespace): Likewise.
* Fix resolver if_* namespace (bug 17717).Joseph Myers2014-12-162-15/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolver code, brought in by pthreads (at least), uses if_* interfaces that weren't in POSIX before 2001, resulting in linknamespace failures. This patch changes those interfaces to be weak aliases of __if_* and makes the resolver use __if_* directly. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by this patch). [BZ #17717] * inet/if_index.c (if_nametoindex): Rename to __if_nametoindex and define as weak alias of __if_nametoindex. Use libc_hidden_weak. (if_indextoname): Rename to __if_indextoname and define as weak alias of __if_indextoname. Use libc_hidden_weak. (if_freenameindex): Rename to __if_freenameindex and define as weak alias of __if_freenameindex. (if_nameindex): Rename to __if_nameindex and define as weak alias of __if_nameindex. * sysdeps/mach/hurd/if_index.c (if_nametoindex): Rename to __if_nametoindex and define as weak alias of __if_nametoindex. Use libc_hidden_weak. (if_freenameindex): Rename to __if_freenameindex and define as weak alias of __if_freenameindex. (if_nameindex): Rename to __if_nameindex and define as weak alias of __if_nameindex. (if_indextoname): Rename to __if_indextoname and define as weak alias of __if_indextoname. Use libc_hidden_weak. * sysdeps/unix/sysv/linux/if_index.c (if_nametoindex): Rename to __if_nametoindex and define as weak alias of __if_nametoindex. Use libc_hidden_weak. (if_freenameindex): Rename to __if_freenameindex and define as weak alias of __if_freenameindex. Use libc_hidden_weak. (if_nameindex_netlink): Use __if_freenameindex instead of if_freenameindex. (if_nameindex): Rename to __if_nameindex and define as weak alias of __if_nameindex. Use libc_hidden_weak. (if_indextoname): Rename to __if_indextoname and define as weak alias of __if_indextoname. Use libc_hidden_weak. * include/net/if.h [!_ISOMAC] (__if_nametoindex): Declare and use libc_hidden_proto. [!_ISOMAC] (__if_freenameindex): Likewise. * resolv/res_init.c (__res_vinit): Use __if_nametoindex instead of if_nametoindex. * conform/Makefile (test-xfail-XPG4/grp.h/linknamespace): Remove variable. (test-xfail-XPG4/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/aio.h/linknamespace): Likewise. (test-xfail-UNIX98/grp.h/linknamespace): Likewise. (test-xfail-UNIX98/pthread.h/linknamespace): Likewise. (test-xfail-UNIX98/pwd.h/linknamespace): Likewise. (test-xfail-UNIX98/sched.h/linknamespace): Likewise. (test-xfail-UNIX98/time.h/linknamespace): Likewise.
* Add comments for the generic lowlevellock implementation.Torvald Riegel2014-12-151-9/+82
| | | | Patch by Bernard Ogden <bernie.ogden@linaro.org>.
* Remove custom pthread_once implementation on s390.Torvald Riegel2014-12-151-110/+0
|
* NPTL: Refactor named semaphore code to use shm-directory.hRoland McGrath2014-12-128-7/+61
|
* Refactor shm_{open,unlink} code to separate Linux-specific directory choice ↵Roland McGrath2014-12-118-282/+276
| | | | from POSIX-generic code.
* * Fix SH specific compiler warnings which are for integer-pointerKaz Kojima2014-12-124-5/+5
| | | | type conversions without cast.
* Move semaphore.h to sysdeps/pthread/.Joseph Myers2014-12-111-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | Carlos reported failures in conform/ tests in environments where the compiler used could only find headers in glibc's source and build trees, not any previously installed headers <https://sourceware.org/ml/libc-alpha/2014-09/msg00040.html>. This patch moves nptl/semaphore.h to sysdeps/pthread/semaphore.h so that it can be found by builds from all glibc subdirectories; it's not in any way NPTL-specific. (I left the Makefile setting to install this header in nptl/, but maybe it should move as well - it's just not clear to me what ifeq ($(subdir),...) conditional should be used to select the directory to associate the header with for installation purposes. The path in the toplevel Makefile used for begin-end-check also remains hardcoded; it's a known todo issue to rework that test to run in each subdirectory checking the headers installed from that subdirectory, rather than a separate hardcoded list.) Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by the patch). I did *not* test a configuration such as that in which Carlos saw failure. * nptl/semaphore.h: Move to ... * sysdeps/pthread/semaphore.h: ... here. * Makefile (installed-headers): Change nptl/semaphore.h to sysdeps/pthread/semaphore.h.
* tile: add inhibit_loop_to_libcall to string functionsChris Metcalf2014-12-113-3/+3
| | | | | | Without this, on gcc 4.8.2 the built glibc crashes when memcpy or memset are invoked, since they call themselves recursively. See commit 85c2e6110c9a01ec for the generic inhibit_loop_to_libcall.
* * sysdeps/mips/dl-trampoline.c: Modify switch expression to haveSteve Ellcey2014-12-111-1/+1
| | | | integer value instead of boolean.
* S/390: Get rid of assembler warning value truncated.Stefan Liebler2014-12-111-1/+1
|
* powerpc: Fix lgammal_r overflow warningsAdhemerval Zanella2014-12-111-1/+9
| | | | | | | ldbl-128ibm uses ldbl-128 e_lgammal_r implementation as is, however some constants definitions overflows for IBM long double range. This patch suppress the compiler warnings until the ldbl-128ibm implementation is fixed.
* Properly handle forced elision in pthread_mutex_trylock (bug 16657)Andreas Schwab2014-12-112-10/+0
|
* Fix MIPS waitid build.Joseph Myers2014-12-101-0/+7
| | | | | | | | | | | | | | | As previously discussed in <https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, MIPS (o32) waitid has build warnings (now errors) because a function is declared inline but functions with five-argument syscalls cannot be inlined for MIPS o32. This patch disables the -Winline warnings for waitid.c using a MIPS-specific wrapper file. As it's whole-file disabling, there's no point in using push and pop, so just DIAG_IGNORE_NEEDS_COMMENT is used. * sysdeps/unix/sysv/linux/mips/mips32/waitid.c: New file.
* Fix MIPS sigaction build.Joseph Myers2014-12-101-0/+12
| | | | | | | | | | | | Building MIPS sigaction (for ABIs other than o32) fails because of "'restore_rt' used but never defined", arising from static functions being defined in asms and referred to from C code. There is no corresponding -W option for that warning, so this patch uses -Wno-error for building sigaction.c. * sysdeps/unix/sysv/linux/mips/mips64/Makefile [$(subdir) == signal] (CFLAGS-sigaction.c): New variable. [$(subdir) == nptl] (CFLAGS-sigaction.c): Likewise.
* Fix strftime wcschr namespace (bug 17634).Joseph Myers2014-12-107-15/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use of strftime, a C90 function, ends up bringing in wcschr, which is not a C90 function. Although not a conformance bug (C90 reserves wcs*), this is still contrary to glibc practice of avoiding relying on those reservations; this patch arranges for the internal uses to use __wcschr instead, with wcschr being a weak alias. This is more complicated than some such patches because of the various IFUNC definitions of wcschr (which include code redefining libc_hidden_def in a way that involves creating __GI_wcschr manually and so also needs to create __GI___wcschr after the change of internal uses to use __wcschr). Tested for x86_64 and 32-bit x86 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). 2014-12-10 Joseph Myers <joseph@codesourcery.com> Adhemerval Zanella <azanella@linux.vnet.ibm.com> [BZ #17634] * wcsmbs/wcschr.c [!WCSCHR] (wcschr): Define as __wcschr. Undefine after defining function. Define as weak alias of __wcschr. Use libc_hidden_weak. * include/wchar.h (__wcschr): Declare. Use libc_hidden_proto. * sysdeps/i386/i686/multiarch/wcschr-c.c [IS_IN (libc) && SHARED] (libc_hidden_def): Also define __GI___wcschr alias. * sysdeps/i386/i686/multiarch/wcschr.S (wcschr): Rename to __wcschr and define as weak alias of __wcschr. * sysdeps/powerpc/power6/wcschr.c [!WCSCHR] (WCSCHR): Define as __wcschr. [!WCSCHR] (DEFAULT_WCSCHR): Define. [DEFAULT_WCSCHR] (__wcschr): Use libc_hidden_def. [DEFAULT_WCSCHR] (wcschr): Define as weak alias of __wcschr. Use libc_hidden_weak. Do not use libc_hidden_def. * sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c [IS_IN (libc) && SHARED] (libc_hidden_def): Also define __GI___wcschr alias. * sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c [IS_IN (libc)] (wcschr): Define as macro expanding to __redirect_wcschr. [IS_IN (libc)] (__wcschr_ppc): Use __redirect_wcschr in typeof. [IS_IN (libc)] (__wcschr_power6): Likewise. [IS_IN (libc)] (__wcschr_power7): Likewise. [IS_IN (libc)] (__libc_wcschr): New. Define with libc_ifunc instead of wcschr. [IS_IN (libc)] (wcschr): Undefine and define as weak alias of __libc_wcschr. [!IS_IN (libc)] (libc_hidden_def): Do not undefine and redefine. * sysdeps/powerpc/powerpc64/multiarch/wcschr.c (wcschr): Rename to __wcschr and define as weak alias of __wcschr. Use libc_hidden_builtin_def. * sysdeps/x86_64/wcschr.S (wcschr): Rename to __wcschr and define as weak alias of __wcschr. Use libc_hidden_weak. * time/alt_digit.c (_nl_get_walt_digit): Use __wcschr instead of wcschr. * time/era.c (_nl_init_era_entries): Likewise. * conform/Makefile (test-xfail-ISO/time.h/linknamespace): Remove variable. (test-xfail-XPG3/time.h/linknamespace): Likewise. (test-xfail-XPG4/time.h/linknamespace): Likewise.
* Don't touch user-controlled stdio locks in forked child (bug 12847)Andreas Schwab2014-12-101-1/+2
| | | | | The stdio locks for streams with the _IO_USER_LOCK flag should not be touched by internal code.
* [AArch64] Fix strchrnul clobbering v15Richard Earnshaw2014-12-101-1/+1
|
* Remove custom pthread_once implementation on sh.Torvald Riegel2014-12-091-257/+0
|
* Fix pthreads getrlimit, gettimeofday namespace (bug 17682).Joseph Myers2014-12-062-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some pthreads functions use getrlimit and gettimeofday, but these functions are XSI, not base POSIX; this is a namespace issue for dynamic linking as well as static linking. This patch makes them use __getrlimit and __gettimeofday instead - the former needed to be newly exported from libc.so at GLIBC_PRIVATE (and so now needs libc_hidden_proto / libc_hidden_def), the latter was already exported. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17682] * resource/Versions (libc): Add __getrlimit at GLIBC_PRIVATE. * resource/getrlimit.c (__getrlimit): Use libc_hidden_def. * sysdeps/mach/hurd/getrlimit.c (__getrlimit): Likewise. * include/sys/resource.h (__getrlimit): Use libc_hidden_proto. * nptl/nptl-init.c (__pthread_initialize_minimal_internal): Use __getrlimit instead of getrlimit. * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait): Use __gettimeofday instead of gettimeofday. * nptl/pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise. * nptl/pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise. * sysdeps/pthread/aio_misc.c (handle_fildes_io): Likewise. * conform/Makefile (test-xfail-POSIX2008/aio.h/linknamespace): Remove variable. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise.
* Fix getifaddrs, freeifaddrs namespace (bug 17668).Joseph Myers2014-12-022-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various objects in glibc bring in ifaddrs.o (via references to __netlink_*) and thereby getifaddrs and freeifaddrs, which are not part of any standard supported by glibc. These should be weak aliases of __getifaddrs and __freeifaddrs; this patch makes them so. (The path by which these functions are brought in is Linux-specific, but it seems less confusing to make all versions of these functions weak aliases rather than only the Linux-specific versions that definitely need it.) Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by this patch). [BZ #17668] * inet/ifaddrs.c (getifaddrs): Rename to __getifaddrs and define as weak alias of __getifaddrs. Use libc_hidden_weak. (freeifaddrs): Rename to __freeifaddrs and define as weak alias of __freeifaddrs. Use libc_hidden_weak. * sysdeps/gnu/ifaddrs.c (getifaddrs): Rename to __getifaddrs and define as weak alias of __getifaddrs. Use libc_hidden_weak. (freeifaddrs): Rename to __freeifaddrs and define as weak alias of __freeifaddrs. Use libc_hidden_weak. * sysdeps/unix/sysv/linux/ifaddrs.c (getifaddrs): Rename to __getifaddrs and define as weak alias of __getifaddrs. Use libc_hidden_weak. (freeifaddrs): Rename to __freeifaddrs and define as weak alias of __freeifaddrs. Use libc_hidden_weak. * conform/Makefile (test-xfail-XOPEN2K/net/if.h/linknamespace): Remove variable. (test-xfail-POSIX2008/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/net/if.h/linknamespace): Likewise.
* mips: Do not use jal to reach __libc_start_mainPetar Jovanovic2014-12-021-2/+6
| | | | | | | | | | | | Since __libc_start_main may not be in the same 256MB-aligned region as the function __start, replace use of jal instruction with la/jalr. This fixes linker issue reported in: https://sourceware.org/bugzilla/show_bug.cgi?id=17601 [BZ #17601] * sysdeps/mips/start.S (__start): Use indirect jump to call __libc_start_main.
* powerpc: Add powerpc64 strpbrk optimizationAdhemerval Zanella2014-12-026-147/+25
| | | | | | This patch makes the POWER7 optimized strpbrk generic by using default doubleword stores to zero the hash, instead of VSX instructions. Performance on POWER7/POWER8 does not change.