]> git.ipfire.org Git - thirdparty/glibc.git/log
thirdparty/glibc.git
10 years agoPowerPC: multiarch memcpy for PowerPC32
Adhemerval Zanella [Mon, 14 Oct 2013 12:24:12 +0000 (07:24 -0500)] 
PowerPC: multiarch memcpy for PowerPC32

10 years agoPowerPC: initial support for multilib for PowerPC32
Adhemerval Zanella [Mon, 14 Oct 2013 11:55:28 +0000 (06:55 -0500)] 
PowerPC: initial support for multilib for PowerPC32

This patch add a empty Makefile, the C IFUNC helper macros, and a empty
available IFUNC implementation enumeration.

10 years agobenchtests: Append volatile keyword to type instead of prepending
Siddhesh Poyarekar [Fri, 6 Dec 2013 03:32:19 +0000 (09:02 +0530)] 
benchtests: Append volatile keyword to type instead of prepending

`volatile int` means the same as 'int volatile', but that's not the
case for 'volatile char *' and 'char * volatile'.  We won't need a
'char volatile *' or other complicated semantics for now.

10 years agoAdd SH implementation of sotruss-lib.c and c++-types.data.
Kaz Kojima [Thu, 5 Dec 2013 23:22:22 +0000 (08:22 +0900)] 
Add SH implementation of sotruss-lib.c and c++-types.data.

10 years agoUpdate powerpc-fpu ULPs.
Adhemerval Zanella [Thu, 5 Dec 2013 17:20:06 +0000 (11:20 -0600)] 
Update powerpc-fpu ULPs.

10 years agoFix tgamma errno setting on underflow (bug 6810).
Joseph Myers [Thu, 5 Dec 2013 14:01:41 +0000 (14:01 +0000)] 
Fix tgamma errno setting on underflow (bug 6810).

10 years agoMove TEST_f_f tests for [l-y]* functions from libm-test.inc to auto-libm-test-in.
Joseph Myers [Thu, 5 Dec 2013 13:54:50 +0000 (13:54 +0000)] 
Move TEST_f_f tests for [l-y]* functions from libm-test.inc to auto-libm-test-in.

10 years agoRevert wrong commit.
Adhemerval Zanella [Thu, 5 Dec 2013 13:47:34 +0000 (07:47 -0600)] 
Revert wrong commit.

10 years agoPowerPC: Add systemtap static probe points in setjmp/longjmp
Adhemerval Zanella [Fri, 22 Nov 2013 12:36:54 +0000 (06:36 -0600)] 
PowerPC: Add systemtap static probe points in setjmp/longjmp

This patch add static probes for setjmp/longjmp in the way gdb expects,fixing
the gdb.base/longjmp.exp gdb testcases.

It changes the symbol_name and use macros to to avoid change the probe names
and ending up adding more logic on GDB (since with the expected name
GDB work seamlessly).

10 years agoFix elf/get-dynamic-info.h for AT
Adhemerval Zanella [Fri, 22 Nov 2013 12:36:09 +0000 (06:36 -0600)] 
Fix elf/get-dynamic-info.h for AT

10 years agoAccept output arguments to benchmark functions
Siddhesh Poyarekar [Thu, 5 Dec 2013 04:42:59 +0000 (10:12 +0530)] 
Accept output arguments to benchmark functions

This patch adds the ability to accept output arguments to functions
being benchmarked, by nesting the argument type in <> in the args
directive.  It includes the sincos implementation as an example, where
the function would have the following args directive:

  ## args: double:<double *>:<double *>

This simply adds a definition for a static variable whose pointer gets
passed into the function, so it's not yet possible to pass something
more complicated like a pre-allocated string or array.  That would be
a good feature to add if a function needs it.

The values in the input file will map only to the input arguments.  So
if I had a directive like this for a function foo:

  ## args: int:<int *>:int:<int *>

and I have a value list like this:

1, 2
3, 4
5, 6

then the function calls generated would be:

foo (1, &out1, 2, &out2);
foo (3, &out1, 4, &out2);
foo (5, &out1, 6, &out2);

10 years agoRemove unused variables in __stpncpy_chk
Siddhesh Poyarekar [Thu, 5 Dec 2013 04:28:58 +0000 (09:58 +0530)] 
Remove unused variables in __stpncpy_chk

10 years agoFix ChangeLog formatting
Siddhesh Poyarekar [Thu, 5 Dec 2013 04:08:47 +0000 (09:38 +0530)] 
Fix ChangeLog formatting

10 years agoBZ #15941: Fix INSTALL file regeneration failure with makeinfo 5.x
Siddhesh Poyarekar [Thu, 5 Dec 2013 04:04:58 +0000 (09:34 +0530)] 
BZ #15941: Fix INSTALL file regeneration failure with makeinfo 5.x

I have skipped regenerating the INSTALL file because we want to
continue using the 4.x generator for now.

10 years agoUpdate longlong.h from GCC.
Joseph Myers [Wed, 4 Dec 2013 17:40:43 +0000 (17:40 +0000)] 
Update longlong.h from GCC.

10 years agoAdd bug numbers 926, 4772 and 16274 to NEWS.
Ondřej Bílka [Wed, 4 Dec 2013 15:45:26 +0000 (16:45 +0100)] 
Add bug numbers 926, 4772 and 16274 to NEWS.

10 years agoAdd missing bug numbers (12486, 15915, 16038) to NEWS.
Joseph Myers [Wed, 4 Dec 2013 15:06:37 +0000 (15:06 +0000)] 
Add missing bug numbers (12486, 15915, 16038) to NEWS.

10 years agoFix Bessel function error handling (bug 6807, bug 15901).
Joseph Myers [Wed, 4 Dec 2013 14:39:37 +0000 (14:39 +0000)] 
Fix Bessel function error handling (bug 6807, bug 15901).

10 years agoPowerPC64 ELFv2 ABI 6/6: Bump ld.so soname version number
Ulrich Weigand [Wed, 4 Dec 2013 13:08:48 +0000 (07:08 -0600)] 
PowerPC64 ELFv2 ABI 6/6: Bump ld.so soname version number

To avoid having a ELFv2 binary accidentally picking up an old ABI ld.so,
this patch bumps the soname to ld64.so.2.

In theory (or for testing purposes) this will also allow co-installing
ld.so versions for both ABIs on the same system.  Note that the kernel
will already be able to load executables of both ABIs.  However, there
is currently no plan to use that theoretical possibility in a any
supported distribution environment ...

Note that in order to check which ABI to use, we need to invoke the
compiler to check the _CALL_ELF macro; this is done in a new configure
check in sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac,
replacing the hard-coded value of default-abi in the Makefile.

10 years agoPowerPC64 ELFv2 ABI 5/6: LD_AUDIT interface changes
Ulrich Weigand [Wed, 4 Dec 2013 12:59:37 +0000 (06:59 -0600)] 
PowerPC64 ELFv2 ABI 5/6: LD_AUDIT interface changes

The ELFv2 ABI changes the calling convention by passing and returning
structures in registers in more cases than the old ABI:
http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01145.html
http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01147.html

For the most part, this does not affect glibc, since glibc assembler
files do not use structure parameters / return values.  However, one
place is affected: the LD_AUDIT interface provides a structure to
the audit routine that contains all registers holding function
argument and return values for the intercepted PLT call.

Since the new ABI now sometimes uses registers to return values
that were never used for this purpose in the old ABI, this structure
has to be extended.  To force audit routines to be modified for the
new ABI if necessary, the patch defines v2 variants of the la_ppc64
types and routines.

In addition, the patch contains two unrelated changes to the
PLT trampoline routines: it fixes a bug where FPR return values
were stored in the wrong place, and it removes the unnecessary
save/restore of CR.

10 years agoPowerPC64 ELFv2 ABI 4/6: Stack frame layout changes
Ulrich Weigand [Wed, 4 Dec 2013 12:55:03 +0000 (06:55 -0600)] 
PowerPC64 ELFv2 ABI 4/6: Stack frame layout changes

This updates glibc for the changes in the ELFv2 relating to the
stack frame layout.  These are described in more detail here:
http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01149.html
http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01146.html

Specifically, the "compiler and linker doublewords" were removed,
which has the effect that the save slot for the TOC register is
now at offset 24 rather than 40 to the stack pointer.

In addition, a function may now no longer necessarily assume that
its caller has set up a 64-byte register save area its use.

To address the first change, the patch goes through all assembler
files and replaces immediate offsets in instructions accessing the
ABI-defined stack slots by symbolic offsets.  Those already were
defined in ucontext_i.sym and used in some of the context routines,
but that doesn't really seem like the right place for those defines.

The patch instead defines those symbolic offsets in sysdeps.h,
in two variants for the old and new ABI, and uses them systematically
in all assembler files, not just the context routines.

The second change only affected a few assembler files that used
the save area to temporarily store some registers.  In those
cases where this happens within a leaf function, this patch
changes the code to store those registers to the "red zone"
below the stack pointer.  Otherwise, the functions already allocate
a stack frame, and the patch changes them to add extra space in
these frames as temporary space for the ELFv2 ABI.

10 years agoPowerPC64 ELFv2 ABI 3/6: PLT local entry point optimization
Ulrich Weigand [Wed, 4 Dec 2013 12:52:40 +0000 (06:52 -0600)] 
PowerPC64 ELFv2 ABI 3/6: PLT local entry point optimization

This is a follow-on to the previous patch to support the ELFv2 ABI in the
dynamic loader, split off into its own patch since it is just an optional
optimization.

In the ELFv2 ABI, most functions define both a global and a local entry
point; the local entry requires r2 to be already set up by the caller
to point to the callee's TOC; while the global entry does not require
the caller to know about the callee's TOC, but it needs to set up r12
to the callee's entry point address.

Now, when setting up a PLT slot, the dynamic linker will usually need
to enter the target function's global entry point.  However, if the
linker can prove that the target function is in the same DSO as the
PLT slot itself, and the whole DSO only uses a single TOC (which the
linker will let ld.so know via a DT_PPC64_OPT entry), then it is
possible to actually enter the local entry point address into the
PLT slot, for a slight improvement in performance.

Note that this uncovered a problem on the first call via _dl_runtime_resolve,
because that routine neglected to restore the caller's TOC before calling
the target function for the first time, since it assumed that function
would always reload its own TOC anyway ...

10 years agoPowerPC64 ELFv2 ABI 2/6: Remove function descriptors
Ulrich Weigand [Wed, 4 Dec 2013 12:51:11 +0000 (06:51 -0600)] 
PowerPC64 ELFv2 ABI 2/6: Remove function descriptors

This patch adds support for the ELFv2 ABI feature to remove function
descriptors.  See this GCC patch for in-depth discussion:
http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01141.html

This mostly involves two types of changes: updating assembler source
files to the new logic, and updating the dynamic loader.

After the refactoring in the previous patch, most of the assembler source
changes can be handled simply by providing ELFv2 versions of the
macros in sysdep.h.   One somewhat non-obvious change is in __GI__setjmp:
this used to "fall through" to the immediately following __setjmp ENTRY
point.  This is no longer safe in the ELFv2 since ENTRY defines both
a global and a local entry point, and you cannot simply fall through
to a global entry point as it requires r12 to be set up.

Also, makecontext needs to be updated to set up registers according to
the new ABI for calling into the context's start routine.

The dynamic linker changes mostly consist of removing special code
to handle function descriptors.  We also need to support the new PLT
and glink format used by the the ELFv2 linker, see:
https://sourceware.org/ml/binutils/2013-10/msg00376.html

In addition, the dynamic linker now verifies that the dynamic libraries
it loads match its own ABI.

The hack in VDSO_IFUNC_RET to "synthesize" a function descriptor
for vDSO routines is also no longer necessary for ELFv2.

10 years agoPowerPC64 ELFv2 ABI 1/6: Code refactoring
Ulrich Weigand [Wed, 4 Dec 2013 12:49:15 +0000 (06:49 -0600)] 
PowerPC64 ELFv2 ABI 1/6: Code refactoring

This is the first patch to support the new ELFv2 ABI in glibc.

As preparation, this patch simply refactors some of the powerpc64 assembler
code to move all code related to creating function descriptors (.opd section)
or using function descriptors (function pointer call) into a central place
in sysdep.h.

Note that most locations creating .opd entries were already using macros
in sysdep.h, this patch simply extends this to the remaining places.

No relevant change in generated code expected.

10 years agoPowerPC64: Add __private_ss field to TCB header
Ulrich Weigand [Wed, 4 Dec 2013 12:45:56 +0000 (06:45 -0600)] 
PowerPC64: Add __private_ss field to TCB header

The TCB header on Intel contains a field __private_ss that is used
to efficiently implement the -fsplit-stack GCC feature.

In order to prepare for a possible future implementation of that
feature on powerpc64, we'd like to reserve a similar field in
the TCB header as well.  (It would be good if this went in with
or before the ELFv2 patches to ensure that this field will be
available always in the ELFv2 environment.)

The field needs to be added at the front of tcbhead_t structure
to avoid changing the ABI; see the recent discussion when adding
the EBB fields.

10 years agoPowerPC64: Report overflow on @h and @ha relocations
Alan Modra [Wed, 4 Dec 2013 12:44:06 +0000 (06:44 -0600)] 
PowerPC64: Report overflow on @h and @ha relocations

This patch updates glibc in accordance with the binutils patch checked in here:
https://sourceware.org/ml/binutils/2013-10/msg00372.html

This changes the various R_PPC64_..._HI and _HA relocations to report
32-bit overflows.  The motivation is that existing uses of @h / @ha
are to build up 32-bit offsets (for the "medium model" TOC access
that GCC now defaults to), and we'd really like to see failures at
link / load time rather than silent truncations.

For those rare cases where a modifier is needed to build up a 64-bit
constant, new relocations _HIGH / _HIGHA are supported.

The patch also fixes a bug in overflow checking for the R_PPC64_ADDR30
and R_PPC64_ADDR32 relocations.

10 years agoPowerPC64: Fix incorrect CFI in *context routines
Ulrich Weigand [Wed, 4 Dec 2013 12:41:52 +0000 (06:41 -0600)] 
PowerPC64: Fix incorrect CFI in *context routines

The context established by "makecontext" has a link register pointing
back to an error path within the makecontext routine.  This is currently
covered by the CFI FDE for makecontext itself, which is simply wrong
for the stack frame *inside* the context.  When trying to unwind (e.g.
doing a backtrace) in a routine inside a context created by makecontext,
this can lead to uninitialized stack slots being accessed, causing the
unwinder to crash in the worst case.

Similarly, during parts of the "setcontext" routine, when the stack
pointer has already been switched to point to the new context, the
address range is still covered by the CFI FDE for setcontext.  When
trying to unwind in that situation (e.g. backtrace from an async
signal handler for profiling), it is again possible that the unwinder
crashes.

Theses are all problems in existing code, but the changes in stack
frame layout appear to make the "worst case" much more likely in
the ELFv2 ABI context.  This causes regressions e.g. in the libgo
testsuite on ELFv2.

This patch fixes this by ending the makecontext/setcontext FDEs
before those problematic parts of the assembler, similar to what
is already done on other platforms.   This fixes the libgo
regression on ELFv2.

10 years agoAllow strptime read outputs from strftime. Fixes bug 4772.
Ondřej Bílka [Wed, 4 Dec 2013 12:53:13 +0000 (13:53 +0100)] 
Allow strptime read outputs from strftime. Fixes bug 4772.

10 years agobenchtests: skip over blank lines in benchmark input files
Siddhesh Poyarekar [Wed, 4 Dec 2013 12:50:32 +0000 (18:20 +0530)] 
benchtests: skip over blank lines in benchmark input files

10 years agoClarify documentation on how functions use timezone. Fixes bug 926.
Paul Eggert [Wed, 4 Dec 2013 12:17:13 +0000 (13:17 +0100)] 
Clarify documentation on how functions use timezone. Fixes bug 926.

10 years agoUpdate powerpc-fpu ULPs.
Adhemerval Zanella [Wed, 4 Dec 2013 12:04:48 +0000 (06:04 -0600)] 
Update powerpc-fpu ULPs.

10 years agoRefactor several debug routines.
Ondřej Bílka [Wed, 4 Dec 2013 01:02:25 +0000 (02:02 +0100)] 
Refactor several debug routines.

To simplify additions of debug routines we replace a custom function
implementation by a simple call.

10 years agoUpdate MIPS dl-lookup.c from generic version.
Joseph Myers [Tue, 3 Dec 2013 22:56:05 +0000 (22:56 +0000)] 
Update MIPS dl-lookup.c from generic version.

10 years agoFix exp missing underflows (bug 15268, bug 15425).
Joseph Myers [Tue, 3 Dec 2013 21:49:56 +0000 (21:49 +0000)] 
Fix exp missing underflows (bug 15268, bug 15425).

10 years agoFix exp2 errno setting on underflow (bug 16283).
Joseph Myers [Tue, 3 Dec 2013 20:50:51 +0000 (20:50 +0000)] 
Fix exp2 errno setting on underflow (bug 16283).

10 years agoProperly handle shm_open validation. Fixes bug 16274.
Ondřej Bílka [Tue, 3 Dec 2013 19:16:01 +0000 (20:16 +0100)] 
Properly handle shm_open validation. Fixes bug 16274.

10 years agoFix erfc errno setting on underflow (bug 6786).
Joseph Myers [Tue, 3 Dec 2013 16:25:18 +0000 (16:25 +0000)] 
Fix erfc errno setting on underflow (bug 6786).

10 years agoMove TEST_f_f tests for [e-j]* functions from libm-test.inc to auto-libm-test-in.
Joseph Myers [Tue, 3 Dec 2013 16:22:49 +0000 (16:22 +0000)] 
Move TEST_f_f tests for [e-j]* functions from libm-test.inc to auto-libm-test-in.

10 years agoAdd bug number to ChangeLog and NEWS
Aurelien Jarno [Tue, 3 Dec 2013 13:43:23 +0000 (14:43 +0100)] 
Add bug number to ChangeLog and NEWS

10 years agolocale: don't crash if locale-archive contains all zeros
Aurelien Jarno [Tue, 3 Dec 2013 10:16:16 +0000 (11:16 +0100)] 
locale: don't crash if locale-archive contains all zeros

In case of power failure followed by filesystem issues locale-archive
can end-up containing all zeros. In that case all calls to setlocale()
generate a SIGFPE. This renders a system with a default non-C locale
unbootable.

Avoid this by ignoring the locale instead of generating a SIGFPE.

10 years ago[BZ #16195] Fix build warnings from systemtap probes in non-systemtap configurations
Siddhesh Poyarekar [Tue, 3 Dec 2013 06:56:12 +0000 (12:26 +0530)] 
[BZ #16195] Fix build warnings from systemtap probes in non-systemtap configurations

Joseph pointed out in the bug report (and in an earlier thread) that
systemtap probes cause build time warnings like the following:

    ../sysdeps/ieee754/dbl-64/e_atan2.c:602:4: warning: the address of
    'p' will always evaluate as 'true' [-Waddress]

due to the fact that we're now passing non-weak variables to
LIBC_PROBE in the libm probes.  This happens only on configurations
that do not enable systemtap.  The macro definition of LIBC_PROBE in
this case only acts as a sanity checker to ensure that the number
parameters passed to LIBC_PROBE is equal to the argument count
parameter passed before it.  This can be done in a much simpler manner
by just adding a macro definition for each number of arguments.  I am
assuming here that we don't really want to bother with supporting
LIBC_PROBE with an indeterminate number of arguments and if there is a
need for a probe to have more data than what is currently supported (4
arguments), one could simply add an additional macro here.

10 years agoDocument shm_open.
Ondřej Bílka [Mon, 2 Dec 2013 22:32:42 +0000 (23:32 +0100)] 
Document shm_open.

10 years agoAdd ChangeLog entry for sqrt tests.
Steve Ellcey [Mon, 2 Dec 2013 17:38:38 +0000 (09:38 -0800)] 
Add ChangeLog entry for sqrt tests.

10 years agoBenchmark test for sqrt function.
Steve Ellcey [Mon, 2 Dec 2013 17:37:18 +0000 (09:37 -0800)] 
Benchmark test for sqrt function.

10 years agoRemove redundant GAIH_OKIFUNSPEC and GAIH_EAI.
Pavel Simerda [Mon, 2 Dec 2013 14:53:13 +0000 (20:23 +0530)] 
Remove redundant GAIH_OKIFUNSPEC and GAIH_EAI.

Only gaih_inet() and gaih_inet_serv() use a special bit flag denoted
by the GAIH_OKIFUNSPEC macro. Only the return value of
gaih_inet_serv() is actively checked for the bit flag which is
redundant because it just copies the nonzero property of the value
otherwise returned. The return value of gaih_inet() is only checked
for being zero and then the bit flag is filtered out. As the bit flag
is set only for otherwise nonzero return values, it doesn't affect the
zero comparison. GAIH_EAI just an alias to ~GAIH_OKIFUNSPEC.

10 years agogetaddrinfo: remove dead code
Pavel Simerda [Mon, 2 Dec 2013 14:47:17 +0000 (20:17 +0530)] 
getaddrinfo: remove dead code

10 years agoUse herrnop directly
Siddhesh Poyarekar [Mon, 2 Dec 2013 14:36:20 +0000 (20:06 +0530)] 
Use herrnop directly

H_ERRNO_ARGS is unnecessary since we this file is specifically for
hosts lookup.

10 years agoFix ChangeLog formatting
Siddhesh Poyarekar [Mon, 2 Dec 2013 14:35:30 +0000 (20:05 +0530)] 
Fix ChangeLog formatting

10 years agoReturn fixed version of breaking of RPATH when $ORIGIN contains colons
Ondřej Bílka [Mon, 2 Dec 2013 13:53:14 +0000 (14:53 +0100)] 
Return fixed version of  breaking of RPATH when $ORIGIN contains colons

10 years agoUpdate powerpc-fpu ULPs.
Adhemerval Zanella [Mon, 2 Dec 2013 11:16:42 +0000 (05:16 -0600)] 
Update powerpc-fpu ULPs.

10 years agoAdd lang_name to various locales.
Chris Leonard [Sun, 1 Dec 2013 13:04:54 +0000 (08:04 -0500)] 
Add lang_name to various locales.

10 years agoMove TEST_f_f tests for [a-c]* functions from libm-test.inc to auto-libm-test-in.
Joseph Myers [Sat, 30 Nov 2013 22:04:13 +0000 (22:04 +0000)] 
Move TEST_f_f tests for [a-c]* functions from libm-test.inc to auto-libm-test-in.

10 years agoFix exp10 errno setting on underflow (bug 6787).
Joseph Myers [Fri, 29 Nov 2013 16:32:49 +0000 (16:32 +0000)] 
Fix exp10 errno setting on underflow (bug 6787).

10 years agoFix x86 sqrt rounding (bug 14032).
Joseph Myers [Fri, 29 Nov 2013 16:31:16 +0000 (16:31 +0000)] 
Fix x86 sqrt rounding (bug 14032).

10 years agoTest sqrt in all rounding modes.
Joseph Myers [Fri, 29 Nov 2013 16:28:47 +0000 (16:28 +0000)] 
Test sqrt in all rounding modes.

10 years agoStart generating libm tests automatically with MPFR.
Joseph Myers [Fri, 29 Nov 2013 16:27:55 +0000 (16:27 +0000)] 
Start generating libm tests automatically with MPFR.

10 years agoAdd 16214 to NEWS
Siddhesh Poyarekar [Fri, 29 Nov 2013 14:14:42 +0000 (19:44 +0530)] 
Add 16214 to NEWS

10 years ago[BZ #16214] S/390: Fix TLS GOT pointer setup.
Andreas Krebbel [Fri, 29 Nov 2013 08:57:04 +0000 (09:57 +0100)] 
[BZ #16214] S/390: Fix TLS GOT pointer setup.

10 years agoDocument libm accuracy goals.
Joseph Myers [Thu, 28 Nov 2013 22:31:03 +0000 (22:31 +0000)] 
Document libm accuracy goals.

10 years agoRemove unused ldbl-96 functions (bug 15004).
Joseph Myers [Thu, 28 Nov 2013 20:50:03 +0000 (20:50 +0000)] 
Remove unused ldbl-96 functions (bug 15004).

10 years agoAdd powerpc-nofpu/e500 support functions for atomic compound assignment and FLT_ROUNDS.
Joseph Myers [Thu, 28 Nov 2013 18:01:41 +0000 (18:01 +0000)] 
Add powerpc-nofpu/e500 support functions for atomic compound assignment and FLT_ROUNDS.

10 years agoDocument some libm error handling intents.
Joseph Myers [Thu, 28 Nov 2013 16:52:36 +0000 (16:52 +0000)] 
Document some libm error handling intents.

10 years agoFix dbl-64 e_sqrt.c for non-default rounding modes (bug 16271).
Joseph Myers [Thu, 28 Nov 2013 16:50:38 +0000 (16:50 +0000)] 
Fix dbl-64 e_sqrt.c for non-default rounding modes (bug 16271).

10 years agoGet canonical name in getaddrinfo from hosts file for AF_INET (fixes 16077)
Siddhesh Poyarekar [Thu, 28 Nov 2013 11:48:12 +0000 (17:18 +0530)] 
Get canonical name in getaddrinfo from hosts file for AF_INET (fixes 16077)

AF_INET lookup in hosts file uses _nss_files_gethostbyname2_r, which
is not capable of returning a canonical name if it has found one.
This change adds _nss_files_gethostbyname3_r, which wraps around
_nss_files_gethostbyname2_r and then returns result.h_name as the
canonical name.

10 years agoMake memset in calloc a tail call.
Ondřej Bílka [Thu, 28 Nov 2013 11:03:28 +0000 (12:03 +0100)] 
Make memset in calloc a tail call.

10 years agoAdd lang_name to various locales.
Chris Leonard [Wed, 27 Nov 2013 20:52:46 +0000 (15:52 -0500)] 
Add lang_name to various locales.

10 years agoMIPS: Fix RLIM64_INFINITY constant for O32 and N32 ABIs
Aurelien Jarno [Wed, 27 Nov 2013 13:42:06 +0000 (14:42 +0100)] 
MIPS: Fix RLIM64_INFINITY constant for O32 and N32 ABIs

Fix the RLIM64_INFINITY constant for O32 and N32 ABIs to match the
kernel one. Change the getrlimit64/setrlimit64 into old compat symbols,
and provide the Linux generic getrlimit64/setrlimit64 functions as
GLIBC_2_19 version.

10 years agoMIPS: Add wrappers to get/setrlimit64 to fix RLIM64_INFINITY constant
Aurelien Jarno [Wed, 27 Nov 2013 13:42:06 +0000 (14:42 +0100)] 
MIPS: Add wrappers to get/setrlimit64 to fix RLIM64_INFINITY constant

RLIM64_INFINITY was supposed to be a glibc convention rather than
anything seen by the kernel, but it ended being passed to the kernel
through the prlimit64 syscall.  On O32 and N32 ABIs, we therefore
end-up with different values on the userland and kernel side:

* On the kernel side, the value is defined for all architectures as
  include/uapi/linux/resource.h:

  #define RLIM64_INFINITY           (~0ULL)

* On the GNU libc side, the value is defined in
  ports/sysdeps/unix/sysv/linux/mips/bits/resource.h:

  For the O32 and N32 ABI:
  #  define RLIM64_INFINITY 0x7fffffffffffffffULL

  and for the N64 ABI:
  #  define RLIM64_INFINITY 0xffffffffffffffffUL

This was not a problem until the prlimit64 syscall was wired in the
2.6.36 kernel. Given the GLIBC uses the prlimit64 syscall to implement
getrlimit64 and setrlimit64, pam_limits.so is setting the limits to
a very big value instead of infinity. As a normal user process can
later only decrease the value and not increase it, it will later get
and EPERM error when trying to set the value to infinity with setrlimit.

The GLIBC has this constant for more than 7 years, and as it is defined
in a header file, it means a lot of binaries are in the wild. This patch
fixes that by adding a wrapper to fix the value passed to or received
from the kernel, before or after calling the prlimit64 syscall.

10 years agoAlso remove benchtests/bench-strsep-ifunc.c
Ondřej Bílka [Tue, 26 Nov 2013 16:34:34 +0000 (17:34 +0100)] 
Also remove benchtests/bench-strsep-ifunc.c

10 years agoaarch64: Enable ifunc support.
Will Newton [Mon, 25 Nov 2013 14:56:28 +0000 (14:56 +0000)] 
aarch64: Enable ifunc support.

Add support for handling the R_AARCH64_IRELATIVE relocation and
STT_GNU_IFUNC symbols to the aarch64 port.

ports/ChangeLog.aarch64:

2013-11-26  Will Newton  <will.newton@linaro.org>

* sysdeps/aarch64/dl-irel.h: Include ldsodefs.h.
(ELF_MACHINE_IRELA): Define.  (elf_ifunc_invoke): Pass
hwcap to ifunc resolver function.  (elf_irela): New function.
* sysdeps/aarch64/dl-machine.h: Include dl-irel.h.
(elf_machine_rela) Handle STT_GNU_IFUNC symbols and
R_AARCH64_IRELATIVE relocations.  (elf_machine_lazy_rel):
Handle R_AARCH64_IRELATIVE relocations.

10 years agoAvoid "left shift count >= width of type" warnings in soft-fp code.
Uros Bizjak [Tue, 26 Nov 2013 16:05:10 +0000 (16:05 +0000)] 
Avoid "left shift count >= width of type" warnings in soft-fp code.

10 years agoNEWS: Only public headers have __unused/__block changed.
Carlos O'Donell [Tue, 26 Nov 2013 14:47:45 +0000 (09:47 -0500)] 
NEWS: Only public headers have __unused/__block changed.

10 years agoNEWS: Mention __unused and __block removal.
Carlos O'Donell [Tue, 26 Nov 2013 14:01:52 +0000 (09:01 -0500)] 
NEWS: Mention __unused and __block removal.

10 years agoPowerPC: Fix __fe_nomask_env missing symbol
Adhemerval Zanella [Tue, 26 Nov 2013 13:25:08 +0000 (07:25 -0600)] 
PowerPC: Fix __fe_nomask_env missing symbol

This patch fix the missing symbol __fe_nomask_env from commit
41e8926aa4b7f17bc95984737ee82a254ad0911c for GLIBC_2.1.

10 years agoRemove duplicate ifunc tests.
Ondřej Bílka [Tue, 26 Nov 2013 11:56:37 +0000 (12:56 +0100)] 
Remove duplicate ifunc tests.

10 years agoAdd changelog.
Ondřej Bílka [Tue, 26 Nov 2013 11:56:08 +0000 (12:56 +0100)] 
Add changelog.

10 years agoRemove duplicate ifunc benchtests.
Ondřej Bílka [Tue, 26 Nov 2013 11:48:33 +0000 (12:48 +0100)] 
Remove duplicate ifunc benchtests.

10 years agoFix typo in _dl_tlsdesc_resolve_hold.
Ondřej Bílka [Tue, 26 Nov 2013 11:41:39 +0000 (12:41 +0100)] 
Fix typo in _dl_tlsdesc_resolve_hold.

10 years agoUse __glibc_reserved instead __unused.
Ondřej Bílka [Tue, 26 Nov 2013 11:29:20 +0000 (12:29 +0100)] 
Use __glibc_reserved instead __unused.

10 years agoFix bug ordering in NEWS.
Joseph Myers [Mon, 25 Nov 2013 22:27:06 +0000 (22:27 +0000)] 
Fix bug ordering in NEWS.

10 years agoAdd bug 11214 to NEWS.
Joseph Myers [Mon, 25 Nov 2013 22:26:18 +0000 (22:26 +0000)] 
Add bug 11214 to NEWS.

10 years agorevert hebrew lang_name addition
Chris Leonard [Mon, 25 Nov 2013 20:36:55 +0000 (15:36 -0500)] 
revert hebrew lang_name addition

10 years agorevert hebrew lang_name addition
Chris Leonard [Mon, 25 Nov 2013 20:31:36 +0000 (15:31 -0500)] 
revert hebrew lang_name addition

10 years agoAdd lang_name to various locales.
Chris Leonard [Mon, 25 Nov 2013 20:20:41 +0000 (15:20 -0500)] 
Add lang_name to various locales.

10 years agoFix typo in sys/ptrace.h.
Carlos O'Donell [Mon, 25 Nov 2013 19:57:42 +0000 (14:57 -0500)] 
Fix typo in sys/ptrace.h.

The event code is PTRACE_EVENT_SECCOMP, not PTRAVE_EVENT_SECCOMP.
This patch fixes the V->C typo. There are no ABI issues since the
number remains the same for the code. Code using the old wrong
name will need to be updated.

10 years agoFix intermittent failure in tst-getpid2.
Paul Pluzhnikov [Mon, 25 Nov 2013 19:38:01 +0000 (11:38 -0800)] 
Fix intermittent failure in tst-getpid2.

2013-11-25  Paul Pluzhnikov  <ppluzhnikov@google.com>

[BZ #11214]
* Makefile (tst-getpid2-ENV): New variable.

10 years agoFix powerpc-nofpu build.
Joseph Myers [Mon, 25 Nov 2013 19:07:55 +0000 (19:07 +0000)] 
Fix powerpc-nofpu build.

10 years agoPowerPC: Set/restore rounding mode only when needed
Adhemerval Zanella [Mon, 25 Nov 2013 12:12:30 +0000 (06:12 -0600)] 
PowerPC: Set/restore rounding mode only when needed

This patch helps some math functions performance by adding the libc_fexxx
variant of inline functions to handle both FPU round and exception set/restore
and by using them on the libc_fexxx_ctx functions. It is based on already coded
fexxx family functions for PPC with fpu.

Here is the summary of performance improvements due this patch (measured on a
POWER7 machine):

Before:

cos(): ITERS:9.5895e+07: TOTAL:5116.03Mcy, MAX:77.6cy, MIN:49.792cy, 18744 calls/Mcy
exp(): ITERS:2.827e+07: TOTAL:5187.15Mcy, MAX:494.018cy, MIN:38.422cy, 5450.01 calls/Mcy
pow(): ITERS:6.1705e+07: TOTAL:5144.26Mcy, MAX:171.95cy, MIN:29.935cy, 11994.9 calls/Mcy
sin(): ITERS:8.6898e+07: TOTAL:5117.06Mcy, MAX:83.841cy, MIN:46.582cy, 16982 calls/Mcy
tan(): ITERS:2.9473e+07: TOTAL:5115.39Mcy, MAX:191.017cy, MIN:172.352cy, 5761.63 calls/Mcy

After:

cos(): ITERS:2.05265e+08: TOTAL:5111.37Mcy, MAX:78.754cy, MIN:24.196cy, 40158.5 calls/Mcy
exp(): ITERS:3.341e+07: TOTAL:5170.84Mcy, MAX:476.317cy, MIN:15.574cy, 6461.23 calls/Mcy
pow(): ITERS:7.6153e+07: TOTAL:5129.1Mcy, MAX:147.5cy, MIN:30.916cy, 14847.2 calls/Mcy
sin(): ITERS:1.58816e+08: TOTAL:5115.11Mcy, MAX:1490.39cy, MIN:22.341cy, 31048.4 calls/Mcy
tan(): ITERS:3.4964e+07: TOTAL:5114.18Mcy, MAX:177.422cy, MIN:146.115cy, 6836.68 calls/Mcy

10 years agoAdd lang_name to various locales.
Chris Leonard [Mon, 25 Nov 2013 00:58:39 +0000 (19:58 -0500)] 
Add lang_name to various locales.

10 years agorevert error-generated by bs_BA.
Chris Leonard [Sat, 23 Nov 2013 23:07:00 +0000 (18:07 -0500)] 
revert error-generated by bs_BA.

10 years agoAdd lang_name to various locales.
Chris Leonard [Sat, 23 Nov 2013 21:29:48 +0000 (16:29 -0500)] 
Add lang_name to various locales.

10 years agoAdd lang_name to various locales.
Chris Leonard [Sat, 23 Nov 2013 18:10:17 +0000 (13:10 -0500)] 
Add lang_name to various locales.

10 years agoARM: Fix memcpy computed-jump calculations for ARM_ALWAYS_BX case.
Roland McGrath [Fri, 22 Nov 2013 19:39:20 +0000 (11:39 -0800)] 
ARM: Fix memcpy computed-jump calculations for ARM_ALWAYS_BX case.

10 years agoAdd lang_name to German, English, Spanish, French locales.
Chris Leonard [Fri, 22 Nov 2013 19:27:18 +0000 (14:27 -0500)] 
Add lang_name to German, English, Spanish, French locales.

10 years agoAdd missing #include for malloc/hooks.c code.
Roland McGrath [Thu, 21 Nov 2013 23:49:50 +0000 (15:49 -0800)] 
Add missing #include for malloc/hooks.c code.

10 years agoAdjust generic swapon prototype to match Linux version.
Roland McGrath [Thu, 21 Nov 2013 23:44:26 +0000 (15:44 -0800)] 
Adjust generic swapon prototype to match Linux version.

10 years agoUse __glibc_block in public headers.
Meador Inge [Thu, 21 Nov 2013 21:57:37 +0000 (16:57 -0500)] 
Use __glibc_block in public headers.

As detailed in PR11157, the use of '__block' is known to interfere
with keywords in some environments, such as the Clang -fblocks extension.
Recently a similar issue was raised concerning the use of '__unused'
and a '__glibc' prefix was proposed to create a glibc implementation
namespace for these sorts of issues [1].  This patches takes that
approach.

[1] https://sourceware.org/ml/libc-alpha/2012-02/msg00047.html
[2] http://lists.debian.org/debian-glibc/2013/11/msg00020.html

10 years agoDon't use broken DL_AUTO_FUNCTION_ADDRESS()
Guy Martin [Thu, 21 Nov 2013 18:23:16 +0000 (13:23 -0500)] 
Don't use broken DL_AUTO_FUNCTION_ADDRESS()

On hppa and ia64, the macro DL_AUTO_FUNCTION_ADDRESS() uses the
variable fptr[2] in it's own scope.

The content of fptr[] is thus undefined right after the macro exits.
Newer gcc's (>= 4.7) reuse the stack space of this variable triggering
a segmentation fault in dl-init.c:69.

To fix this we rewrite the macros to make the call directly to init
and fini without needing to pass back a constructed function pointer.

10 years agoAdd lang_name to Arabic locales.
Chris Leonard [Thu, 21 Nov 2013 19:43:51 +0000 (14:43 -0500)] 
Add lang_name to Arabic locales.

10 years agolinux-generic: fix alignment of struct stat/statfs for nios2
Chung-Lin Tang [Wed, 20 Nov 2013 21:12:18 +0000 (16:12 -0500)] 
linux-generic: fix alignment of struct stat/statfs for nios2

The hard alignment of 8 was appropriate for most platforms for
which 8-byte values are 8-byte aligned, but this is not true
for the nios2 platform, so only align to the alignment of the
8-byte type on the platform.

Remove the explicit alignment of struct statfs as it's redundant.