lp:glibc

Owned by Adam Conrad
Get this repository:
git clone https://git.launchpad.net/glibc

Import details

Import Status: Reviewed

This repository is an import of the Git repository at git://sourceware.org/git/glibc.git.

The next import is scheduled to run .

Last successful import was .

Import started on juju-98ee42-prod-launchpad-codeimport-4 and finished taking 3 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 3 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 2 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-0 and finished taking 5 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-5 and finished taking 2 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 3 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 2 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-0 and finished taking 2 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-5 and finished taking 2 minutes — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 3 minutes — see the log

Branches

Name Last Modified Last Commit
siddhesh/changelog-begone 2019-01-12 11:16:42 UTC
Another major update

Author: Siddhesh Poyarekar
Author Date: 2019-01-12 11:09:16 UTC

Another major update

aaribaud/bugzilla/23789/v4 2018-11-02 06:03:52 UTC
Ensure mktime sets errno on error [BZ #23789]

Author: Albert ARIBAUD (3ADEV)
Author Date: 2018-10-24 12:43:06 UTC

Ensure mktime sets errno on error [BZ #23789]

Posix mandates that mktime set errno to EOVERFLOW
on error, but the glibc mktime wasn't doing it so
far.

Fix this and add a test to prevent regressions.
The fix also fixes the same issue in timegm.

Tested with 'make check' on x86-linux-gnu and
i686-linux-gnu.

        * time/Makefile: Add bug-mktime4.
 * time/bug-mktime4.c: New file.
 * time/mktime.c
 (__mktime_internal): Set errno to EOVERFLOW on error.
 (mktime): Move call to __tzset inside conditional.

aaribaud/bugzilla/23789/v2 2018-10-27 15:18:02 UTC
Ensure mktime sets errno on error (bug 23789)

Author: Albert ARIBAUD (3ADEV)
Author Date: 2018-10-24 12:43:06 UTC

Ensure mktime sets errno on error (bug 23789)

Posix mandates that mktime set errno to EOVERFLOW
on error, that it, upon retuning -1, but the glibc
mktime does not so far on 32-bit architectures.

Fix this and add a test to prevent regressions.

The test was run through 'make check' on i686-linux-gnu,
then the fix was added and 'make check' run again.

 * time/mktime.c
 (mktime): Set errno to EOVERFLOW on error.
 * time/bug-mktime4.c: New file.
        * time/Makefile: Add bug-mktime4.

aaribaud/y2038 2018-10-24 10:53:27 UTC
Y2038: add _TIME_BITS support

Author: Albert ARIBAUD (3ADEV)
Author Date: 2017-09-06 08:00:42 UTC

Y2038: add _TIME_BITS support

This makes all previously defined Y2038-proof API types, functions and
implementations the default when _TIME_BITS==64 and __WORDSIZE==32 (so
that 64-bit architectures are unaffected).

Note: it is assumed that the API is consistent, i.e. for each API type
which is enabled here, all API functions which depend on this type are
enabled and mapped to Y2038-proof implementations.

aaribaud/y2038-submitted-v1 2018-06-13 08:21:00 UTC
Y2038: make __mktime_internal compatible with 64-bit-time

Author: Albert ARIBAUD (3ADEV)
Author Date: 2018-05-02 11:15:50 UTC

Y2038: make __mktime_internal compatible with 64-bit-time

This implies that its callers be 64-bit-time compatible too.
It is done by creating 64-bit-time versions of these and
turning their original 32-bit-time versions into wrappers
(at a slight execution time cost).

The callers affected are:

      * mktime
      * timelocal (as an alias of mktime)
      * timegm

zack/elf-builtin-expect-conversion 2018-06-12 14:02:27 UTC
Convert __builtin_expect to __glibc_(un)likely throughout elf/.

Author: Zack Weinberg
Author Date: 2018-06-01 16:53:59 UTC

Convert __builtin_expect to __glibc_(un)likely throughout elf/.

In the previous patch I didn't change a use of __builtin_expect to
__glibc_(un)likely that happened to be right next to the code I was
actually working on; Andreas asked why not, and I said that there were
a bunch more uses of __builtin_expect in that file and I would convert
them all in a separate patch. This is that patch, converting all of
elf/.

I would appreciate someone checking over this patch very carefully
indeed. In a whole bunch of places, __builtin_expect was used in a
way that did not map mechanically to the newer convention. The test
suite caught one mistake; I'm not confident I didn't make any more.

Writing this patch gave me a deeper appreciation for why we _want_ to
switch to __glibc_(un)likely, but also for how difficult it can be. I
now think that people should _not_ be asked to change existing uses of
__builtin_expect in a patch whose purpose is something else.

 * elf/dl-addr.c, elf/dl-cache.c, elf/dl-close.c, elf/dl-deps.c
 * elf/dl-environ.c, elf/dl-error-skeleton.c, elf/dl-fini.c
 * elf/dl-fptr.c, elf/dl-init.c, elf/dl-libc.c, elf/dl-minimal.c
 * elf/dl-open.c, elf/dl-reloc.c, elf/dl-runtime.c
 * elf/dl-sysdep.c, elf/dl-tls.c, elf/dl-version.c, elf/ldconfig.c
 * elf/rtld.c: Replace __builtin_expect with __glibc_likely or
 __glibc_unlikely, as appropriate, throughout.

hjl/pr23240/fw 2018-06-06 15:32:12 UTC
Check non-lazy binding with LD_PRELOAD and weak reference

Author: H.J. Lu
Author Date: 2018-05-27 14:15:35 UTC

Check non-lazy binding with LD_PRELOAD and weak reference

Check non-lazy binding with

1. Reference to unrelocated IFUNC function with LD_PRELOAD.
2. Weak reference.

 [BZ #23176]
 [BZ #23240]
 * elf/Makefile (tests): Add reldep6a.
 (tests-internal): Add ifuncpreload1
 (modules-names): Add ifuncpreloadmod1a and ifuncpreloadmod1b.
 ($(objpfx)reldep6a): New.
 ($(objpfx)reldep6a.out): Likewise.
 (reldep6a-ENV): Likewise.
 ($(objpfx)ifuncpreload1): Likewise.
 ($(objpfx)ifuncpreload1.out): Likewise.
 (ifuncpreload1-ENV): Likewise.
 * elf/ifuncpreload1.c: New file.
 * elf/ifuncpreloadmod1a.c: Likewise.
 * elf/ifuncpreloadmod1b.c: Likewise.
 * elf/reldep6a.c: Likewise.

fw/libm-noprivate-2.27 2018-05-10 10:42:05 UTC
Use custom x86 feature selection in libm

Author: Florian Weimer
Author Date: 2018-05-10 09:50:00 UTC

Use custom x86 feature selection in libm

ibm/2.22/master 2018-04-19 18:21:54 UTC
Merge branch 'release/2.22/master' into ibm/2.22/master

Author: Tulio Magno Quites Machado Filho
Author Date: 2018-04-19 18:21:54 UTC

Merge branch 'release/2.22/master' into ibm/2.22/master

release/2.22/master 2018-04-13 17:30:20 UTC
glob: Fix buffer overflow during GLOB_TILDE unescaping [BZ #22332]

Author: Paul Eggert
Author Date: 2017-10-22 08:00:57 UTC

glob: Fix buffer overflow during GLOB_TILDE unescaping [BZ #22332]

(cherry picked from commit a159b53fa059947cc2548e3b0d5bdcf7b9630ba8)

zack/wip-check-localplt-2 2018-03-26 13:05:19 UTC
WIP finer-grained, more aggressive local PLT call check

Author: Zack Weinberg
Author Date: 2018-03-18 21:01:06 UTC

WIP finer-grained, more aggressive local PLT call check

zack/wip-pthread-no-dupe-defns 2018-03-26 12:30:46 UTC
[Bug 15368] Move pthread_kill to libc and use it to implement raise.

Author: Zack Weinberg
Author Date: 2018-03-23 13:16:59 UTC

[Bug 15368] Move pthread_kill to libc and use it to implement raise.

The fix for bug #15368 was unnecessarily Linux-specific. To recap,
POSIX specifies raise to be async-signal-safe, but also specifies it
to be equivalent to pthread_kill(pthread_self(), sig), which is not
an async-signal-safe sequence of operations; a signal handler could
run in between pthread_self and pthread_kill, and do something (such
as calling fork, which is also async-signal-safe) that would invalidate
the thread descriptor. This is even true in the hypothetical case of
a port that doesn't implement multithreading: kill(getpid(), sig) will
fire the signal twice if a signal handler runs in between, calls fork,
and then returns on both sides of the fork. I don't see anything in
the standards to forbid that.

The Linux-specific fix was to override the definitions of raise in
both libpthread and libc to the same unitary function that blocks
signals, retrieves TID and PID directly from the kernel, calls tgkill,
and only then unblocks signals. This patch generalizes that to any
port: pthread_kill is moved from libpthread to libc, with a forwarding
stub left behind. The definition of raise in libpthread is also
replaced with a forwarding stub. The Linux-specific definition of
raise is deleted; those ports will now use sysdeps/pthread/raise.c,
which blocks signals first, then calls pthread_self and pthread_kill,
and then unblocks signals. Similarly, sysdeps/posix/raise.c (which
would be used on a port that didn't implement multithreading) blocks
signals, calls getpid and kill, and then unblocks signals. Thus,
ports need only implement the primitives correctly and do not need to
worry about making raise async-signal-safe.

The only wrinkle was that up till now, we did not bother initializing
the ->tid field of the initial thread's descriptor unless libpthread
was loaded; now that raise calls pthread_kill even in a single-
threaded environment, that won't fly. This is abstractly easy to fix;
the tricky part was figuring out _where_ to put the calls (two of
them, as it happens) to __pthread_initialize_pids, and I'd appreciate
careful eyes on those changes.

You might be wondering why it's safe to rely on the TID in the thread
descriptor, rather than calling gettid directly. Since all signals
are blocked from before calling pthread_self until after pthread_kill
uses the TID to call tgkill, the question is whether some _other_
thread could do something that would invalidate the calling thread's
descriptor, and I believe there is no such thing.

While I was at it I fixed another bug: raise was returning an error
code on failure (like pthread_kill does) instead of setting errno as
specified. This is user-visible but I don't think it's worth recording
as a fixed bug, nobody bothers checking whether raise failed anyway.

 * nptl/pt-raise.c
 * sysdeps/unix/sysv/linux/pt-raise.c
 * sysdeps/unix/sysv/linux/raise.c:
 Remove file.

 * sysdeps/unix/sysv/linux/pthread_kill.c: Use __is_internal_signal
 to check for forbidden signals. Use INTERNAL_SYSCALL_CALL to call
 getpid. Provide __libc_pthread_kill, with __pthread_kill as
 strong alias and pthread_kill as weak alias.

 * sysdeps/posix/raise.c: Block signals around the calls to
 __getpid and __kill. Provide __libc_raise, with raise as strong
 alias, libc_hidden_def for raise, and gsignal as weak alias.
 * sysdeps/pthread/raise.c: New file. Implement by blocking
 signals, calling pthread_self and pthread_kill, and then
 unblocking signals again. Provide same symbols as above.

 * sysdeps/generic/internal-signals.h: Define all of the same
 functions that sysdeps/unix/sysv/linux/internal-signals.h does,
 with sensible default definitions.
 * sysdeps/unix/sysv/linux/internal-signals.h: Clarify comments.

 * nptl/pthread_kill.c: Define __libc_pthread_kill, with
 __pthread_kill as strong alias and pthread_kill as weak alias.
 * nptl/pthread_self.c: Define __pthread_self, with
 pthread_self as weak alias.
 * signal/raise.c: Define __libc_raise, with raise as strong alias,
 libc_hidden_def for raise, and gsignal as weak alias.

 * nptl/Makefile: Move pthread_kill from libpthread-routines to
 routines. Remove pt-raise from libpthread-routines.
 * nptl/Versions (libc/GLIBC_2.28): Add pthread_kill.
 (libc/GLIBC_PRIVATE): Add __libc_pthread_kill and __libc_raise.
 * sysdeps/generic/pt-compat-stubs.S: Add stubs for raise and
 pthread_kill.

 * nptl/nptl-init.c (__pthread_initialize_minimal_internal):
 Don't call __pthread_initialize_pids here.
 * csu/libc-tls.c (__libc_setup_tls):
        Call __pthread_initialize_pids after all other setup.
 * elf/rtld.c (init_tls): Likewise.

 * include/pthreadP.h: New forwarder.
 * include/pthread.h: Add multiple inclusion guard. Declare
 __pthread_self.
 * include/signal.h: Declare __pthread_kill.

 * sysdeps/**/libc.abilist (GLIBC_2.28): Add pthread_kill.

mfabian/collation-update-2.27 2018-03-02 10:31:16 UTC
Remove the lines from cmn_TW.UTF-8.in which cannot work at the moment.

Author: Mike FABIAN
Author Date: 2017-12-21 17:56:52 UTC

Remove the lines from cmn_TW.UTF-8.in which cannot work at the moment.

See this bug https://sourceware.org/bugzilla/show_bug.cgi?id=22898

These lines don’t yet work because of a glibc bug, not because of
problems in the locale data. No matter what sorting rules one uses,
these characters cannot be sorted at all at the moment.

As soon as that bug is fixed, these lines should be added back to the
test file.

 * localedata/cmn_TW.UTF-8.in: Remove the lines which cannot
        be sorted correctly at the moment because of a bug.

shebs/clangify 2018-02-07 21:00:02 UTC
Use clang integrated assembler except when asm is output and not required to ...

Author: Stan Shebs
Author Date: 2018-02-07 21:00:02 UTC

Use clang integrated assembler except when asm is output and not required to be valid

ibm/2.24/master 2017-12-19 17:18:07 UTC
Merge branch release/2.24/master into ibm/2.24/master

Author: Gabriel F. T. Gomes
Author Date: 2017-12-19 17:18:07 UTC

Merge branch release/2.24/master into ibm/2.24/master

hjl/pr22353/master 2017-10-30 12:44:19 UTC
Add strcpy-stosb.S

Author: H.J. Lu
Author Date: 2017-10-27 13:31:57 UTC

Add strcpy-stosb.S

hjl/pr22363/master 2017-10-29 21:15:47 UTC
x32: Set GLRO(dl_platform) to "x86_64" by default [BZ #22363]

Author: H.J. Lu
Author Date: 2017-10-29 21:12:01 UTC

x32: Set GLRO(dl_platform) to "x86_64" by default [BZ #22363]

Set dl_platform to "x86_64" for x32 by default since kernel may set it
to "i686". This fixed:

FAIL: elf/tst-platform-1

on x32. Tested on x86-64 and x32.

 [BZ #22363]
 * sysdeps/x86/cpu-features.c (init_cpu_features): Set
 GLRO(dl_platform) to "x86_64" by default for x32.

hjl/pr22362/master 2017-10-29 02:05:09 UTC
Use newly built crt*.o files to build shared objects [BZ #22362]

Author: H.J. Lu
Author Date: 2017-10-29 00:41:16 UTC

Use newly built crt*.o files to build shared objects [BZ #22362]

When multi-lib GCC is used to build glibc, the search order of GCC driver
for crt*.o is -B*/`gcc -print-multi-directory`, the installed diretory,
-B*/. This patch extends multi-lib support from nptl/Makefile to
csu/Makefile so that -B/glibc-build-directory/csu/ will pick up the newly
built crt*.o.

Tested on x86-64 for i686 and x32.

 [BZ #22362]
 * config.make.in (multidir): New.
 * configure.ac (libc_cv_multidir): New. AC_SUBST.
 * configure: Regenerated.
 * csu/Makefile [$(multidir) != .](multilib-extra-objs): New.
 [$(multidir) != .](extra-objs): Add $(multilib-extra-objs).
 [$(multidir) != .]($(addprefix $(objpfx)$(multidir)/, $(install-lib))):
 New target.
 * nptl/Makefile: Don't include multidir.mk.
 ($(objpfx)multidir.mk): Removed.

hjl/pr22298/master 2017-10-15 14:48:58 UTC
Define __PTHREAD_MUTEX_HAVE_PREV only if undefined [BZ #22298]

Author: H.J. Lu
Author Date: 2017-10-15 14:48:58 UTC

Define __PTHREAD_MUTEX_HAVE_PREV only if undefined [BZ #22298]

It is incorrect to define __PTHREAD_MUTEX_HAVE_PREV to 1 only when
__WORDSIZE == 64. For x32, __PTHREAD_MUTEX_HAVE_PREV should be 1, but
it has __WORDSIZE == 32. This patch defines __PTHREAD_MUTEX_HAVE_PREV
based on __WORDSIZE only if it is undefined. __PTHREAD_MUTEX_HAVE_PREV
check is changed from "#ifdef" to "#if" to support values of 0 or 1.

 [BZ #22298]
 * nptl/allocatestack.c (allocate_stack): Check if
 __PTHREAD_MUTEX_HAVE_PREV is non-zero, instead if
 __PTHREAD_MUTEX_HAVE_PREV is defined.
 * nptl/descr.h (pthread): Likewise.
 * nptl/nptl-init.c (__pthread_initialize_minimal_internal):
 Likewise.
 * nptl/pthread_create.c (START_THREAD_DEFN): Likewise.
 * sysdeps/nptl/fork.c (__libc_fork): Likewise.
 * sysdeps/nptl/pthread.h (PTHREAD_MUTEX_INITIALIZER): Likewise.
 * sysdeps/nptl/bits/thread-shared-types.h
 (__PTHREAD_MUTEX_HAVE_PREV): Define only if it is undefined.
 (__pthread_internal_list): Check __pthread_internal_list instead
 of __WORDSIZE.
 (__PTHREAD_SPINS_DATA): Likewise.
 (__PTHREAD_SPINS): Likewise.
 (__pthread_mutex_s): Likewise.
 * sysdeps/x86/nptl/bits/pthreadtypes-arch.h
 (__PTHREAD_MUTEX_HAVE_PREV): Defined.

hjl/nsz/math 2017-09-30 02:39:47 UTC
i386: Replace assembly versions of e_powf with generic e_powf.c

Author: H.J. Lu
Author Date: 2017-09-30 02:39:47 UTC

i386: Replace assembly versions of e_powf with generic e_powf.c

This patch replaces i386 assembly versions of e_powf with generic
e_powf.c.

 * sysdeps/i386/fpu/e_powf.S: Removed.
 * sysdeps/i386/fpu/e_powf_log2_data.c: Likewise.
 * sysdeps/i386/fpu/w_powf.c: Likewise.
 * sysdeps/i386/fpu/libm-test-ulps: Updated for generic e_powf.c.
 * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Likewise.
 * sysdeps/i386/i686/fpu/multiarch/Makefile (libm-sysdep_routines):
 Add e_powf-sse2.
 (CFLAGS-e_powf-sse2.c): New.
 * sysdeps/i386/i686/fpu/multiarch/e_powf-sse2.c: New file.
 * sysdeps/i386/i686/fpu/multiarch/e_powf.c: Likewise.

nsz/math 2017-09-29 10:51:12 UTC
Do not wrap logf, log2f and powf

Author: Szabolcs Nagy
Author Date: 2017-09-13 17:14:26 UTC

Do not wrap logf, log2f and powf

The new generic logf, log2f and powf code don't need wrappers any more,
they set errno inline so only use the wrappers on targets that need it.

2017-09-19 Szabolcs Nagy <szabolcs.nagy@arm.com>

 * sysdeps/ieee754/flt-32/e_log2f.c (__log2f): Define without wrapper.
 * sysdeps/ieee754/flt-32/e_logf.c (__logf): Likewise
 * sysdeps/ieee754/flt-32/e_powf.c (__powf): Likewise
 * sysdeps/ieee754/flt-32/w_log2f.c: New file.
 * sysdeps/ieee754/flt-32/w_logf.c: New file.
 * sysdeps/ieee754/flt-32/w_powf.c: New file.
 * sysdeps/i386/fpu/w_log2f.c: New file.
 * sysdeps/i386/fpu/w_logf.c: New file.
 * sysdeps/i386/fpu/w_powf.c: New file.
 * sysdeps/m68k/m680x0/fpu/w_log2f.c: New file.
 * sysdeps/m68k/m680x0/fpu/w_logf.c: New file.
 * sysdeps/m68k/m680x0/fpu/w_powf.c: New file.

hjl/pr22053/master 2017-08-31 13:49:37 UTC
Remove zero terminator for .eh_frame in libc.so [BZ #22053]

Author: H.J. Lu
Author Date: 2017-08-31 13:49:37 UTC

Remove zero terminator for .eh_frame in libc.so [BZ #22053]

elf/sofini.c has a zero terminator for .eh_frame in libc.so. It was
added before -eh-frame-hdr is added to ld. Since -eh-frame-hdr is
always used to build libc.so, zero terminator in elf/sofini.c can be
removed.

 [BZ #22053]
 * elf/sofini.c (__FRAME_END__): Removed.

hjl/fma/master 2017-08-28 15:14:40 UTC
Mention x86-64 FMA optimization in NEWS

Author: H.J. Lu
Author Date: 2017-08-16 15:56:24 UTC

Mention x86-64 FMA optimization in NEWS

 * NEWS: Mention x86-64 FMA optimization.

hjl/pr21967/master 2017-08-25 18:44:24 UTC
x86: Add MathVec_Prefer_No_AVX512 to cpu-features [BZ #21967]

Author: H.J. Lu
Author Date: 2017-08-25 18:01:03 UTC

x86: Add MathVec_Prefer_No_AVX512 to cpu-features [BZ #21967]

AVX512 functions in mathvec are used on machines with AVX512. An AVX2
wrapper is also provided and it can be used when the AVX512 version
isn't profitable. MathVec_Prefer_No_AVX512 is addded to cpu-features.
If glibc.tune.hwcaps=MathVec_Prefer_No_AVX512 is set in GLIBC_TUNABLES
environment variable, the AVX2 wrapper will be used.

 [BZ #21967]
 * sysdeps/x86/cpu-features.h (bit_arch_MathVec_Prefer_No_AVX512):
 New.
 (index_arch_MathVec_Prefer_No_AVX512): Likewise.
 * sysdeps/x86/cpu-tunables.c (TUNABLE_CALLBACK (set_hwcaps)):
 Handle MathVec_Prefer_No_AVX512.

zack/anon-unions 2017-08-23 11:42:53 UTC
RFC: Use anonymous union for siginfo_t

Author: Zack Weinberg
Author Date: 2017-08-11 13:43:59 UTC

RFC: Use anonymous union for siginfo_t

C2011 officially includes an 'anonymous union' feature, and GCC has
supported it for many years. It makes sub-fields of a union that's a
struct field appear to be fields of the parent struct. If we use this
in the definition of siginfo_t, we don't need to define lots of
innocuous-looking identifiers like 'si_pid' as macros expanding to
chains of field accessors. The catch, however, is that the compiler
used to compile *programs that use glibc* - not just glibc itself -
must accept the use of this feature (in system headers) even when
running in an older conformance mode.

This patch only touches siginfo_t, but if people like the idea, we
could also do it for several other types:

netinet/in.h (in6_addr)
sys/stat.h (stat)
utmp.h (utmp)
signal.h (sigaction, sigevent_t)
ucontext.h (ucontext_t)

and maybe also - these use names in the user namespace for the fields
that would be removed:

net/if.h (ifaddr)
ifaddrs.h (ifaddrs)
netinet/in6.h (ip6_hdr) (really should be bitfields instead)
netinet/icmp6.h (many)
net/if_ppp.h (ifpppstatsreq, ifpppcstatsreq)
net/if_shaper.h (shaperconf)
a.out.h (exec) (only some versions)
sys/quota.h (dqblk?) (the dq_* macros refer to a field that doesn't exist?!)

There are still more hits in sunrpc and nis, but since hopefully that
code is going to go away, I don't propose to mess with them. And
there may be even more that aren't caught by grepping for
'#define IDENT IDENT.IDENT'.

As a side note (and this could be split for commit if felt
appropriate), the siginfo_t field aliases 'si_int' and 'si_ptr' are
not in POSIX. There are a few uses of these within glibc itself, and
a handful more in third-party software (not glibc, not uclibc, and not
linux) so I have preserved them, but put them under __USE_MISC and
added a deprecation warning.

This passes the glibc testsuite on x86-64-linux, which probably
*doesn't* test the case where someone is compiling a program in
an older conformance mode that uses siginfo_t
(-std=c99 -D_XOPEN_SOURCE=600, perhaps).

What do you think?

zw

 * sysdeps/unix/sysv/linux/bits/types/siginfo_t.h (siginfo_t):
 Use C2011 anonymous union and anonymous struct-in-union features
 to define this type. Rename some public fields with their
 official names.
 (si_pid, si_uid, si_timerid, si_overrun, si_status, si_utime)
 (si_stime, si_value, si_addr, si_addr_lsb, si_lower, si_upper)
 (si_pkey, si_band, si_fd, si_call_addr, si_syscall, si_arch):
 Do not define as macros.
 (si_int, si_ptr): Define only when __USE_MISC, with deprecation
 warnings.
 * sysdeps/unix/sysv/linux/ia64/bits/siginfo-arch.h
 * sysdeps/unix/sysv/linux/sparc/bits/siginfo-arch.h
 * sysdeps/unix/sysv/linux/tile/bits/siginfo-arch.h
 (__SI_SIGFAULT_ADDL): Define all fields with their public names
 when __USE_GNU, or with impl-namespace names otherwise.
 (si_imm, si_segvflags, si_isr, si_trapno): Do not define as macros.

 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread)
 Use si_value.sival_ptr instead of si_ptr.
 * sysdeps/unix/sysv/linux/tst-getpid1.c (do_test):
 Use si_value.sival_int instead of si_int.

hjl/gmp 2017-08-22 12:02:20 UTC
rshift.c: Replace assert with DEBUG and abort

Author: H.J. Lu
Author Date: 2017-08-22 00:07:36 UTC

rshift.c: Replace assert with DEBUG and abort

assert in stdlib/rshift.c should be for debug purpose only and there is
no such check in any rshift assembly implementations nor in lshift.c.
This patch replaces assert with DEBUG and abort, similar to lshift.c
so that generic GMP codes from libc.a can be linked with libc.so in
atest-exp, atest-exp2 and atest-sincos, which depend on the GMP
implementation in glibc.

 * stdlib/rshift.c (mpn_rshift): Replace ssert with DEBUG and
 abort.

hjl/fma/2.26 2017-08-16 15:46:05 UTC
x86-64: Optimize e_expf with FMA [BZ #21912]

Author: H.J. Lu
Author Date: 2017-08-16 15:43:35 UTC

x86-64: Optimize e_expf with FMA [BZ #21912]

FMA optimized e_expf improves performance by more than 50% on Skylake.

 [BZ #21912]
 * sysdeps/x86_64/fpu/multiarch/Makefile (libm-sysdep_routines):
 Add e_expf-fma.
 * sysdeps/x86_64/fpu/multiarch/e_expf-fma.S: New file.
 * sysdeps/x86_64/fpu/multiarch/e_expf.c: Likewise.
 * sysdeps/x86_64/fpu/multiarch/ifunc-fma.h: Likewise.

(cherry picked from commit 24a2e6588d2e0c91b4003878b0625d4a9360e8f3)

fw/tst-gmon 2017-08-15 11:44:56 UTC
gmon: Add test for basic mcount/gprof functionality

Author: Florian Weimer
Author Date: 2017-08-15 11:44:56 UTC

gmon: Add test for basic mcount/gprof functionality

hjl/pr21864/master 2017-08-13 16:58:33 UTC
Don't compile non-lib modules as lib modules [BZ #21864]

Author: H.J. Lu
Author Date: 2017-07-30 04:04:09 UTC

Don't compile non-lib modules as lib modules [BZ #21864]

Some programs have more than one source files. These non-lib modules
should not be compiled with -DMODULE_NAME=libc. This patch puts these
non-lib modules in $(others-extras) and adds $(others-extras) to
all-nonlib.

 [BZ #21864]
 * Makerules (all-nonlib): Add $(others-extras).
 * catgets/Makefile (others-extras): New.
 * elf/Makefile (others-extras): Likewise.
 * nss/Makefile (others-extras): Likewise.

hjl/pr21913/master 2017-08-07 20:05:12 UTC
i386: Add <startup.h> [BZ #21913]

Author: H.J. Lu
Author Date: 2017-07-19 21:32:42 UTC

i386: Add <startup.h> [BZ #21913]

On Linux/i386, there are 3 ways to make a system call:

1. call *%gs:SYSINFO_OFFSET. This requires TLS initialization.
2. call *_dl_sysinfo. This requires relocation of _dl_sysinfo.
3. int $0x80. This is slower than #2 and #3, but works everywhere.

When an object file is compiled with PIC, #1 is prefered since it is
faster than #3 and doesn't require relocation of _dl_sysinfo. For
dynamic executables, ld.so initializes TLS. However, for static
executables, before TLS is initialized by __libc_setup_tls, #3 should
be used for syscalls.

This patch adds <startup.h> which defines _startup_fatal and defaults
it to __libc_fatal. It replaces __libc_fatal with _startup_fatal in
static executables where it is called before __libc_setup_tls is called.
This header file is included in all files containing functions which are
called before __libc_setup_tls is called. On Linux/i386, when PIE is
enabled by default, _startup_fatal is turned into ABORT_INSTRUCTION and
I386_USE_SYSENTER is defined to 0 so that "int $0x80" is used for system
calls before __libc_setup_tls is called.

 [BZ #21913]
 * config.h.in (BUILD_PIE_DEFAULT): New.
 * csu/libc-tls.c: Include <startup.h>.
 * elf/dl-tunables.c: Likewise.
 * sysdeps/unix/sysv/linux/i386/brk.c: Likewise.
 * csu/libc-tls.c: Include <startup.h>.
 (__libc_setup_tls): Call _startup_fatal instead of __libc_fatal.
 * sysdeps/generic/startup.h: New file.
 * sysdeps/unix/sysv/linux/i386/startup.h: Likewise.

hjl/pr21815/master 2017-08-02 14:50:15 UTC
Compile tst-prelink.c without PIE [BZ #21815]

Author: H.J. Lu
Author Date: 2017-07-19 19:04:14 UTC

Compile tst-prelink.c without PIE [BZ #21815]

tst-prelink.c checks for conflict with GLOB_DAT relocation against
stdout. On i386, there is no GLOB_DAT relocation against stdout with
PIE. Compile tst-prelink.c without PIE to generate GLOB_DAT relocation.

 [BZ #21815]
 * elf/Makefile (CFLAGS-tst-prelink.c): New.
 (LDFLAGS-tst-prelink): Likewise.

hjl/pr21752/master 2017-07-19 18:10:31 UTC
Avoid accessing corrupted stack from __stack_chk_fail [BZ #21752]

Author: H.J. Lu
Author Date: 2017-07-19 17:56:19 UTC

Avoid accessing corrupted stack from __stack_chk_fail [BZ #21752]

__libc_argv[0] points to address on stack and __libc_secure_getenv
accesses environment variables which are on stack. We should avoid
accessing stack when stack is corrupted.

This patch also renames function argument in __fortify_fail_abort
from do_backtrace to need_backtrace to avoid confusion with do_backtrace
from enum __libc_message_action.

 [BZ #21752]
 * debug/fortify_fail.c (__fortify_fail_abort): Don't pass down
 __libc_argv[0] if we aren't doing backtrace. Rename do_backtrace
 to need_backtrace.
 * sysdeps/posix/libc_fatal.c (__libc_message): Don't call
 __libc_secure_getenv if we aren't doing backtrace.

hjl/pr21666/2.25 2017-07-19 10:39:49 UTC
Avoid .symver on common symbols [BZ #21666]

Author: H.J. Lu
Author Date: 2017-06-23 21:38:46 UTC

Avoid .symver on common symbols [BZ #21666]

The .symver directive on common symbol just creates a new common symbol,
not an alias and the newer assembler with the bug fix for

https://sourceware.org/bugzilla/show_bug.cgi?id=21661

will issue an error. Before the fix, we got

$ readelf -sW libc.so | grep "loc[12s]"
  5109: 00000000003a0608 8 OBJECT LOCAL DEFAULT 36 loc1
  5188: 00000000003a0610 8 OBJECT LOCAL DEFAULT 36 loc2
  5455: 00000000003a0618 8 OBJECT LOCAL DEFAULT 36 locs
  6575: 00000000003a05f0 8 OBJECT GLOBAL DEFAULT 36 locs@GLIBC_2.2.5
  7156: 00000000003a05f8 8 OBJECT GLOBAL DEFAULT 36 loc1@GLIBC_2.2.5
  7312: 00000000003a0600 8 OBJECT GLOBAL DEFAULT 36 loc2@GLIBC_2.2.5

in libc.so. The versioned loc1, loc2 and locs have the wrong addresses.
After the fix, we got

$ readelf -sW libc.so | grep "loc[12s]"
  6570: 000000000039e3b8 8 OBJECT GLOBAL DEFAULT 34 locs@GLIBC_2.2.5
  7151: 000000000039e3c8 8 OBJECT GLOBAL DEFAULT 34 loc1@GLIBC_2.2.5
  7307: 000000000039e3c0 8 OBJECT GLOBAL DEFAULT 34 loc2@GLIBC_2.2.5

 [BZ #21666]
 * misc/regexp.c (loc1): Add __attribute__ ((nocommon));
 (loc2): Likewise.
 (locs): Likewise.

(cherry picked from commit 388b4f1a02f3a801965028bbfcd48d905638b797)

linaro/2.23/master 2017-07-13 14:36:20 UTC
Ignore and remove LD_HWCAP_MASK for AT_SECURE programs (bug #21209)

Author: Siddhesh Poyarekar
Author Date: 2017-03-07 15:22:04 UTC

Ignore and remove LD_HWCAP_MASK for AT_SECURE programs (bug #21209)

The LD_HWCAP_MASK environment variable may alter the selection of
function variants for some architectures. For AT_SECURE process it
means that if an outdated routine has a bug that would otherwise not
affect newer platforms by default, LD_HWCAP_MASK will allow that bug
to be exploited.

To be on the safe side, ignore and disable LD_HWCAP_MASK for setuid
binaries.

 [BZ #21209]
 * elf/rtld.c (process_envvars): Ignore LD_HWCAP_MASK for
 AT_SECURE processes.
 * sysdeps/generic/unsecvars.h: Add LD_HWCAP_MASK.

(cherry picked from commit 1c1243b6fc33c029488add276e56570a07803bfd)

hjl/pr21120/2.24 2017-06-30 16:53:31 UTC
i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120]

Author: H.J. Lu
Author Date: 2017-06-30 16:11:08 UTC

i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120]

GCC 7 changed the definition of max_align_t on i386:

https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9b5c49ef97e63cc63f1ffa13baf771368105ebe2

As a result, glibc malloc no longer returns memory blocks which are as
aligned as max_align_t requires.

This causes malloc/tst-malloc-thread-fail to fail with an error like this
one:

error: allocation function 0, size 144 not aligned to 16

This patch moves the MALLOC_ALIGNMENT definition to <malloc-alignment.h>
and increases the malloc alignment to 16 for i386.

 [BZ #21120]
 * malloc/malloc.c (MALLOC_ALIGNMENT): Moved to ...
 * sysdeps/generic/malloc-alignment.h: Here. New file.
 * sysdeps/i386/malloc-alignment.h: Likewise.
 * sysdeps/generic/malloc-machine.h: Include <malloc-alignment.h>.

(cherry picked from commit 4e61a6be446026c327aa70cef221c9082bf0085d)

hjl/pr21120/2.25 2017-06-30 16:19:29 UTC
i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120]

Author: H.J. Lu
Author Date: 2017-06-30 16:11:08 UTC

i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120]

GCC 7 changed the definition of max_align_t on i386:

https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9b5c49ef97e63cc63f1ffa13baf771368105ebe2

As a result, glibc malloc no longer returns memory blocks which are as
aligned as max_align_t requires.

This causes malloc/tst-malloc-thread-fail to fail with an error like this
one:

error: allocation function 0, size 144 not aligned to 16

This patch moves the MALLOC_ALIGNMENT definition to <malloc-alignment.h>
and increases the malloc alignment to 16 for i386.

 [BZ #21120]
 * malloc/malloc-internal.h (MALLOC_ALIGNMENT): Moved to ...
 * sysdeps/generic/malloc-alignment.h: Here. New file.
 * sysdeps/i386/malloc-alignment.h: Likewise.
 * sysdeps/generic/malloc-machine.h: Include <malloc-alignment.h>.

(cherry picked from commit 4e61a6be446026c327aa70cef221c9082bf0085d)

hjl/pr21120/master 2017-06-30 14:43:58 UTC
i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120]

Author: H.J. Lu
Author Date: 2017-06-29 17:26:04 UTC

i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120]

GCC 7 changed the definition of max_align_t on i386:

https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9b5c49ef97e63cc63f1ffa13baf771368105ebe2

As a result, glibc malloc no longer returns memory blocks which are as
aligned as max_align_t requires.

This causes malloc/tst-malloc-thread-fail to fail with an error like this
one:

error: allocation function 0, size 144 not aligned to 16

This patch moves the MALLOC_ALIGNMENT definition to <malloc-alignment.h>
and increases the malloc alignment to 16 for i386.

 [BZ #21120]
 * malloc/malloc-internal.h (MALLOC_ALIGNMENT): Moved to ...
 * sysdeps/generic/malloc-alignment.h: Here. New file.
 * sysdeps/i386/malloc-alignment.h: Likewise.
 * sysdeps/generic/malloc-machine.h: Include <malloc-alignment.h>.

hjl/pr14995 2017-06-28 18:13:24 UTC
Check linker support for INSERT in linker script

Author: H.J. Lu
Author Date: 2017-06-26 19:46:08 UTC

Check linker support for INSERT in linker script

Since gold doesn't support INSERT in linker script:

https://sourceware.org/bugzilla/show_bug.cgi?id=15373

tst-split-dynreloc fails to link with gold. Check if linker supports
INSERT in linker script before using it.

 * config.make.in (have-insert): New.
 * configure.ac (libc_cv_insert): New. Set to yes if linker
 supports INSERT in linker script.
 (AC_SUBST(libc_cv_insert): New.
 * configure: Regenerated.
 * sysdeps/x86_64/Makefile (tests): Add tst-split-dynreloc only
 if $(have-insert) == yes.

hjl/pr21666/master 2017-06-23 18:29:38 UTC
x86-64: Optimize L(between_2_3) in memcmp-avx2-movbe.S

Author: H.J. Lu
Author Date: 2017-06-23 18:29:38 UTC

x86-64: Optimize L(between_2_3) in memcmp-avx2-movbe.S

Turn

 movzbl -1(%rdi, %rdx), %edi
 movzbl -1(%rsi, %rdx), %esi
 orl %edi, %eax
 orl %esi, %ecx

into

 movb -1(%rdi, %rdx), %al
 movb -1(%rsi, %rdx), %cl

 * sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S (between_2_3):
 Replace movzbl and orl with movb.

zack/errno-prettyprint 2017-06-22 22:28:45 UTC
Add pretty-printer for errno.

Author: Zack Weinberg
Author Date: 2017-06-22 22:28:45 UTC

Add pretty-printer for errno.

This patch adds the actual pretty-printer for errno. I could have
used Python's built-in errno module to get the symbolic names for the
constants, but it seemed better to do something entirely under our
control, so there's a .pysym file generated from errnos.texi, with a
hook that allows the Hurd to add additional constants. Then a .py
module is generated from that plus errno.h in the usual manner; many
thanks to the authors of the .pysym mechanism.

There is also a test which verifies that the .py file (not the .pysym
file) covers all of the constants defined in errno.h.

hurd-add-errno-constants.awk has been manually tested, but the
makefile logic that runs it has not been tested.

 * stdlib/errno-printer.py: New pretty-printer.
 * stdlib/test-errno-constants.py: New special test.
 * stdlib/test-errno-printer.c, stdlib/test-errno-printer.py:
 New pretty-printer test.
 * stdlib/make-errno-constants.awk: New script to generate the
 .pysym file needed by errno-printer.py.
 * stdlib/Makefile: Install, run, and test all of the above, as
 appropriate.

 * sysdeps/mach/hurd/hurd-add-errno-constants.awk: New script to
 add Mach/Hurd-specific errno constants to the .pysym file used by
 stdlib/errno-printer.py.
 * sysdeps/mach/hurd/Makefile: Hook hurd-add-errno-constants.awk
 into the generation of that .pysym file.

zack/build-layout-experiment 2017-06-08 19:39:03 UTC
Prepare for radical source tree reorganization.

Author: Zack Weinberg
Author Date: 2017-06-08 19:39:03 UTC

Prepare for radical source tree reorganization.

All top-level files and directories are moved into a temporary storage
directory, REORG.TODO, except for files that will certainly still
exist in their current form at top level when we're done (COPYING,
COPYING.LIB, LICENSES, NEWS, README), all old ChangeLog files (which
are moved to the new directory OldChangeLogs, instead), and the
generated file INSTALL (which is just deleted; in the new order, there
will be no generated files checked into version control).

zack/build-experiments 2017-06-01 12:47:44 UTC
Experimenting with alternatives to VPATH.

Author: Zack Weinberg
Author Date: 2017-06-01 12:47:44 UTC

Experimenting with alternatives to VPATH.

tuliom/float128 2017-05-25 19:14:47 UTC
powerpc64le: Enable float128

Author: Paul E. Murphy
Author Date: 2016-08-09 21:48:54 UTC

powerpc64le: Enable float128

Add ulps for the float128 type, bits/floatn.h, and float128-abi.h.

Likewise, sqrt is not implemented in libgcc. The sfp-machine.h
header is taken from libgcc, and used to build a P7/P8 soft-fp
sqrtf128.

 * sysdeps/powerpc/fpu/libm-test-ulps: Regenerated.
 * sysdeps/powerpc/fpu/math_private.h:
 (__ieee754_sqrtf128): New inline override.
 * sysdeps/powerpc/powerpc64le/Implies-before: New file.
 * sysdeps/powerpc/powerpc64le/Makefile: New file.
 * sysdeps/powerpc/powerpc64le/bits/floatn.h: New file.
 * sysdeps/powerpc/powerpc64le/fpu/e_sqrtf128.c: New file.
 * sysdeps/powerpc/powerpc64le/fpu/sfp-machine.h: New file.
 * sysdeps/powerpc/powerpc64le/power9/fpu/e_sqrtf128.c: New file.

 * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist:
 Regenerated.
 * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist:
 Likewise.

 * sysdeps/unix/sysv/linux/powerpc/powerpc64le/float128-abi.h
 New file.

hjl/cacheinfo/master 2017-05-24 13:35:25 UTC
x86: Add cache info to cpu_features

Author: H.J. Lu
Author Date: 2017-05-24 03:22:13 UTC

x86: Add cache info to cpu_features

This patch adds cache info to cpu_features to support tunables for both
cache info as well as CPU features in a single x86 namespace. Since
init_cacheinfo is in libc.so and cpu_features is in ld.so, cache info
and CPU features must be in a place for tunables.

 * sysdeps/x86/cacheinfo.c (init_cacheinfo): Use data_size,
 shared_size and non_temporal_threshold from cpu_features if
 they aren't zero.
 * sysdeps/x86/cpu-features.h (cache_info): New.
 (cpu_features): Add cache.

dj/malloc-tcache 2017-05-11 21:27:35 UTC
Tweak Makefile, asserts, comments.

Author: DJ Delorie
Author Date: 2017-05-11 21:25:10 UTC

Tweak Makefile, asserts, comments.

* Un-Wundef-ify -DUSE_TCACHE
* More asserts in tcache get/put functions
* Clarify redundancy in tcache structure

linaro/2.21/master 2017-04-21 13:07:56 UTC
Make io/ftwtest-sh remove temporary files on early exit.

Author: Joseph Myers
Author Date: 2015-10-21 21:18:21 UTC

Make io/ftwtest-sh remove temporary files on early exit.

The test io/ftwtest-sh creates a directory that at some points during
the test does not have execute permission. To avoid leaving behind
such a directory that prevents the build directory from being removed
with a simple "rm -rf", it traps various signals to make the directory
executable and remove it before exit. However, this doesn't cover the
case where one of the tests simply fails (which happens with cross
testing if testing on a remote system where the path to the build
directory involves a symlink, or if that remote system fell over
during testing - I think the latter is the case where the directory is
left behind with bad permissions).

This patch makes that test also trap signal 0 (exit) so that the
directory gets properly removed in such failure cases as well.

Tested in both configurations where the test passes and where it fails
to verify that the result of the test is unchanged but the directory
is no longer left behind where it was previously left behind.

 * io/ftwtest-sh: Also trap on exit to remove temporary files.

hjl/pr21258/2.23 2017-04-20 14:55:44 UTC
x86-64: Improve branch predication in _dl_runtime_resolve_avx512_opt [BZ #21258]

Author: H.J. Lu
Author Date: 2017-03-21 17:59:31 UTC

x86-64: Improve branch predication in _dl_runtime_resolve_avx512_opt [BZ #21258]

On Skylake server, _dl_runtime_resolve_avx512_opt is used to preserve
the first 8 vector registers. The code layout is

  if only %xmm0 - %xmm7 registers are used
     preserve %xmm0 - %xmm7 registers
  if only %ymm0 - %ymm7 registers are used
     preserve %ymm0 - %ymm7 registers
  preserve %zmm0 - %zmm7 registers

Branch predication always executes the fallthrough code path to preserve
%zmm0 - %zmm7 registers speculatively, even though only %xmm0 - %xmm7
registers are used. This leads to lower CPU frequency on Skylake
server. This patch changes the fallthrough code path to preserve
%xmm0 - %xmm7 registers instead:

  if whole %zmm0 - %zmm7 registers are used
    preserve %zmm0 - %zmm7 registers
  if only %ymm0 - %ymm7 registers are used
     preserve %ymm0 - %ymm7 registers
  preserve %xmm0 - %xmm7 registers

Tested on Skylake server.

 [BZ #21258]
 * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_resolve_opt):
 Define only if _dl_runtime_resolve is defined to
 _dl_runtime_resolve_sse_vex.
 * sysdeps/x86_64/dl-trampoline.h (_dl_runtime_resolve_opt):
 Fallthrough to _dl_runtime_resolve_sse_vex.

(cherry picked from commit c15f8eb50cea7ad1a4ccece6e0982bf426d52c00)

hjl/hwcap/master 2017-04-07 15:09:47 UTC
x86: Set dl_hwcap from CPU features

Author: H.J. Lu
Author Date: 2017-04-05 22:24:30 UTC

x86: Set dl_hwcap from CPU features

On x86, the usage of AT_HWCAP in glibc is obsolete since addition of
dl_x86_cpu_features. dl_hwcap, which was set from AT_HWCAP, is used by
dynamic linker to build an array of hardware capability names, which are
added to search path when loading shared object. dl_hwcap was unused on
x86-64 and only SSE2 was used on i386.

This patch sets dl_hwcap with new hardware capabilities from CPU
features. Currently, 2 capabilities, SSE2 and AVX2, are supported.
The maximum number of hardware capabilities is 64. Since x86-64
includes SSE2, SSE2 is skipped on x86-64. dl_x86_cap_flags is kepted
for i386 and is used by _dl_show_auxv. dl_x86_hwcap_flags is added
for new hardware capabilities.

 * sysdeps/i386/dl-hwcap.h: New file.
 * sysdeps/x86/dl-hwcap.h: Likewise.
 * sysdeps/x86_64/dl-hwcap.h: Likewise.
 * sysdeps/x86_64/dl-procinfo.h: Likewise.
 * sysdeps/i386/dl-procinfo.c (_dl_x86_hwcap_flags): New.
 * sysdeps/i386/dl-procinfo.h: Include <dl-hwcap.h>.
 (_DL_HWCAP_COUNT): Removed.
 (HWCAP_I386_XXX): Likewise.
 (HWCAP_IMPORTANT): Likewise.
 (_dl_procinfo): Likewise.
 (_dl_hwcap_string): Likewise.
 (_dl_string_hwcap): Likewise.
 * sysdeps/unix/sysv/linux/i386/dl-procinfo.h (_dl_procinfo):
 Replace _DL_HWCAP_COUNT with 32.
 * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h [!IS_IN (ldconfig)]:
 Include <sysdeps/x86_64/dl-procinfo.h>.
 * sysdeps/x86/cpu-features.c: Include <dl-hwcap.h>.
 (init_cpu_features): Set dl_hwcap and dl_hwcap_mask.
 * sysdeps/x86_64/dl-procinfo.c (_dl_x86_hwcap_flags): New.

gentoo/2.25 2017-03-20 14:57:14 UTC
posix_spawn: fix stack setup on ia64 [BZ #21275]

Author: Mike Frysinger
Author Date: 2017-03-20 08:47:56 UTC

posix_spawn: fix stack setup on ia64 [BZ #21275]

The ia64-specific clone2 call expects the base of the stack mapping and
the stack size as sep arguments, not an initial stack value as on other
stack-grows-down architectures. Reuse the stack-grows-up macro so we
pass in the right stack base.

Reported-by: Matt Turner <mattst88@gentoo.org>
(cherry picked from commit ddc3fb333469c2997798742dc0509dc1e3201d91)
(cherry picked from commit 27ab0d9518746dfb59ed2ba59daefc981dc10e38)

gentoo/2.24 2017-03-20 14:56:52 UTC
posix_spawn: fix stack setup on ia64 [BZ #21275]

Author: Mike Frysinger
Author Date: 2017-03-20 08:47:56 UTC

posix_spawn: fix stack setup on ia64 [BZ #21275]

The ia64-specific clone2 call expects the base of the stack mapping and
the stack size as sep arguments, not an initial stack value as on other
stack-grows-down architectures. Reuse the stack-grows-up macro so we
pass in the right stack base.

Reported-by: Matt Turner <mattst88@gentoo.org>
(cherry picked from commit ddc3fb333469c2997798742dc0509dc1e3201d91)
(cherry picked from commit 7043946c7921c0e3850dd2b3d948336624bb0f62)

fw/bug16145 2017-03-09 15:34:11 UTC
WIP reorganization to improve scalability of localtime

Author: Florian Weimer
Author Date: 2017-03-09 15:33:57 UTC

WIP reorganization to improve scalability of localtime

release/2.19/master 2017-02-20 21:04:52 UTC
Fix powerpc software sqrt (bug 17964).

Author: Joseph Myers
Author Date: 2015-02-12 23:05:37 UTC

Fix powerpc software sqrt (bug 17964).

As Adhemerval noted in
<https://sourceware.org/ml/libc-alpha/2015-01/msg00451.html>, the
powerpc sqrt implementation for when _ARCH_PPCSQ is not defined is
inaccurate in some cases.

The problem is that this code relies on fused multiply-add, and relies
on the compiler contracting a * b + c to get a fused operation. But
sysdeps/ieee754/dbl-64/Makefile disables contraction for e_sqrt.c,
because the implementation in that directory relies on *not* having
contracted operations.

While it would be possible to arrange makefiles so that an earlier
sysdeps directory can disable the setting in
sysdeps/ieee754/dbl-64/Makefile, it seems a lot cleaner to make the
dependence on fused operations explicit in the .c file. GCC 4.6
introduced support for __builtin_fma on powerpc and other
architectures with such instructions, so we can rely on that; this
patch duly makes the code use __builtin_fma for all such fused
operations.

Tested for powerpc32 (hard float).

2015-02-12 Joseph Myers <joseph@codesourcery.com>

 [BZ #17964]
 * sysdeps/powerpc/fpu/e_sqrt.c (__slow_ieee754_sqrt): Use
 __builtin_fma instead of relying on contraction of a * b + c.

(cherry picked from commit e8bd5286c68bc35be3b41e94c15c4387dcb3bec9)

fw/math-split-tests 2017-02-17 07:22:29 UTC
RFC: Run libm tests separately for each function

Author: Joseph Myers
Author Date: 2017-02-16 23:08:20 UTC

RFC: Run libm tests separately for each function

At present, libm tests for each function get built into a single
executable (for each floating point type, for each of normal / inline
/ finite-math-only functions, plus vector variants) and run together,
resulting in a single PASS or FAIL (for each of those nine variants
plus vector variants). Building this executable involves reading
about 40 MB of libm-test-*.c sources, which would grow to maybe 70 or
80 MB when the complex inverse trig and hyperbolic functions move to
the auto-libm-test-* mechanism (that move is practical now that tests
for all functions don't need regenerating for any change to
auto-libm-test-in but you can instead regenerate each
auto-libm-test-out-* file independently; auto-libm-test-out-casin and
auto-libm-test-out-casinh take about 38 minutes each to generate on my
system after such a move, auto-libm-test-out-cacos and
auto-libm-test-out-cacosh take about 80 minutes each).

This patch arranges for tests of each function to be run separately
from the makefiles instead. There are 121 functions being tested for
each (type, variant pair) (actually 126, but run as 121 from the
Makefile because each of the pairs (exp10, pow10), (isfinite, finite),
(lgamma, gamma), (remainder, drem), (scalbn, ldexp), shares a table of
test results and so is run together), so 1089 separate tests run from
the Makefile, plus 48 vector tests on x86_64 (six functions for eight
vector variants). Each test only involves a libm-test-<func>.c file
of no more than about 4 MB, rather than all such files taking about 40
MB. With tests run separately, test summaries will indicate which
functions actually have problems (of course, those problems may just
be out-of-date libm-test-ulps files if the file hasn't been updated
for the architecture in question recently).

All the .c files for the 1089+48 tests are generated automatically
from the Makefiles. Various checked-in boilerplate .c files are
removed as no longer needed. CFLAGS definitions for the different
kinds of tests are generated using makefile iterators to apply
target-specific variable settings. libm-have-vector-test.h is no
longer needed; the list of functions to test for each vector type is
now in the sysdeps Makefile.

This should remove the amount of boilerplate needed for float128
testing support; test-float128.h will still be needed, but not various
.c files or Makefile CFLAGS definitions. The logic for creating
dependencies on libm-test-support-*.o files should also render
<https://sourceware.org/ml/libc-alpha/2017-02/msg00279.html>
unnecessary.

Any comments? Especially regarding the use of iterators; there is
existing precedent (in elf/Makefile) for using o-iterator.mk as a
generic iterator with object-suffixes-left set to something other than
a list of object suffixes, but maybe there should be a differently
named iterator for such generic uses?

2017-02-16 Joseph Myers <joseph@codesourcery.com>

 * math/Makefile (libm-tests-generated): Remove variable.
 (libm-tests-base-normal): New variable.
 (libm-tests-base-finite): Likewise.
 (libm-tests-base-inline): Likewise.
 (libm-tests-base): Likewise.
 (libm-tests-normal): Likewise.
 (libm-tests-finite): Likewise.
 (libm-tests-inline): Likewise.
 (libm-tests-vector): Likewise.
 (libm-tests): Define in terms of these new variables.
 (libm-tests-for-type): New variable.
 (libm-tests.o): Move definition.
 (tests): Move addition of $(libm-tests).
 (generated): Update for new and removed libm test files.
 ($(objpfx)libm-test.c): Remove target.
 ($(objpfx)libm-have-vector-test.h): Likewise.
 (CFLAGS-test-double-vlen2.c): Remove variable.
 (CFLAGS-test-double-vlen4.c): Likewise.
 (CFLAGS-test-double-vlen8.c): Likewise.
 (CFLAGS-test-float-vlen4.c): Likewise.
 (CFLAGS-test-float-vlen8.c): Likewise.
 (CFLAGS-test-float-vlen16.c): Likewise.
 (CFLAGS-test-float.c): Likewise.
 (CFLAGS-test-float-finite.c): Likewise.
 (CFLAGS-libm-test-support-float.c): Likewise.
 (CFLAGS-test-double.c): Likewise.
 (CFLAGS-test-double-finite.c): Likewise.
 (CFLAGS-libm-test-support-double.c): Likewise.
 (CFLAGS-test-ldouble.c): Likewise.
 (CFLAGS-test-ldouble-finite.c): Likewise.
 (CFLAGS-libm-test-support-ldouble.c): Likewise.
 (libm-test-inline-cflags): New variable.
 (CFLAGS-test-ifloat.c): Remove variable.
 (CFLAGS-test-idouble.c): Likewise.
 (CFLAGS-test-ildouble.c): Likewise.
 ($(addprefix $(objpfx), $(libm-tests.o))): Move target and update
 dependencies.
 ($(foreach t,$(libm-tests-normal),$(objpfx)$(t).c)): New rule.
 ($(foreach t,$(libm-tests-finite),$(objpfx)$(t).c)): Likewise.
 ($(foreach t,$(libm-tests-inline),$(objpfx)$(t).c)): Likewise.
 ($(foreach t,$(libm-tests-vector),$(objpfx)$(t).c)): Likewise.
 ($(foreach t,$(types),$(objpfx)libm-test-support-$(t).c)):
 Likewise.
 (dependencies on libm-test-support-*.o): Remove.
 ($(foreach f,$(libm-test-funcs-all),$(objpfx)$(o)-$(f).o)): New
 rules using iterators.
 ($(addprefix $(objpfx),$(call libm-tests-for-type,$(o)))):
 Likewise.
 ($(objpfx)libm-test-support-$(o).o): Likewise.
 ($(addprefix $(objpfx),$(filter-out $(tests-static)
 $(libm-vec-tests),$(tests)))): Filter out $(libm-tests-vector)
 instead.
 ($(addprefix $(objpfx), $(libm-vec-tests))): Use iterator to
 define rule instead.
 * math/README.libm-test: Update.
 * math/libm-test-acos.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-acosh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-asin.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-asinh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-atan.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-atan2.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-atanh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cabs.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cacos.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cacosh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-canonicalize.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-carg.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-casin.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-casinh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-catan.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-catanh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cbrt.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ccos.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ccosh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ceil.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cexp.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cimag.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-clog.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-clog10.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-conj.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-copysign.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cos.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cosh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cpow.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-cproj.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-creal.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-csin.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-csinh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-csqrt.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ctan.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ctanh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-erf.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-erfc.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-exp.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-exp10.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-exp2.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-expm1.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fabs.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fdim.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-floor.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fma.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fmax.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fmaxmag.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fmin.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fminmag.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fmod.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fpclassify.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-frexp.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fromfp.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-fromfpx.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-getpayload.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-hypot.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ilogb.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-iscanonical.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-iseqsig.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isfinite.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isgreater.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isgreaterequal.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isinf.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isless.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-islessequal.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-islessgreater.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isnan.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isnormal.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-issignaling.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-issubnormal.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-isunordered.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-iszero.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-j0.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-j1.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-jn.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-lgamma.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-llogb.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-llrint.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-llround.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-log.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-log10.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-log1p.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-log2.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-logb.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-lrint.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-lround.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-modf.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-nearbyint.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-nextafter.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-nextdown.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-nexttoward.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-nextup.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-pow.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-remainder.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-remquo.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-rint.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-round.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-roundeven.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-scalb.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-scalbln.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-scalbn.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-setpayload.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-setpayloadsig.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-signbit.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-significand.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-sin.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-sincos.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-sinh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-sqrt.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-tan.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-tanh.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-tgamma.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-totalorder.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-totalordermag.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-trunc.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ufromfp.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-ufromfpx.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-y0.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-y1.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-yn.inc: Include libm-test-driver.c.
 (do_test): New function.
 * math/libm-test-driver.c: Do not include libm-have-vector-test.h.
 (HAVE_VECTOR): Remove macro.
 (START): Do not call HAVE_VECTOR.
 * math/test-double-vlen2.h (FUNC_TEST): Remove macro.
 * math/test-double-vlen4.h (FUNC_TEST): Remove macro.
 * math/test-double-vlen8.h (FUNC_TEST): Remove macro.
 * math/test-float-vlen16.h (FUNC_TEST): Remove macro.
 * math/test-float-vlen4.h (FUNC_TEST): Remove macro.
 * math/test-float-vlen8.h (FUNC_TEST): Remove macro.
 * math/test-math-vector.h (FUNC_TEST): New macro.
 (WRAPPER_DECL): Rename to WRAPPER_DECL_f.
 * sysdeps/x86_64/fpu/Makefile (double-vlen2-funcs): New variable.
 (double-vlen4-funcs): Likewise.
 (double-vlen4-avx2-funcs): Likewise.
 (double-vlen8-funcs): Likewise.
 (float-vlen4-funcs): Likewise.
 (float-vlen8-funcs): Likewise.
 (float-vlen8-avx2-funcs): Likewise.
 (float-vlen16-funcs): Likewise.
 (CFLAGS-test-double-vlen4-avx2.c): Remove variable.
 (CFLAGS-test-float-vlen8-avx2.c): Likewise.
 * sysdeps/x86_64/fpu/test-double-vlen4.h (TEST_VECTOR_cos): Remove
 macro.
 (TEST_VECTOR_sin): Likewise.
 (TEST_VECTOR_sincos): Likewise.
 (TEST_VECTOR_log): Likewise.
 (TEST_VECTOR_exp): Likewise.
 (TEST_VECTOR_pow): Likewise.
 * sysdeps/x86_64/fpu/test-double-vlen8.h (TEST_VECTOR_cos):
 Likewise.
 (TEST_VECTOR_sin): Likewise.
 (TEST_VECTOR_sincos): Likewise.
 (TEST_VECTOR_log): Likewise.
 (TEST_VECTOR_exp): Likewise.
 (TEST_VECTOR_pow): Likewise.
 * sysdeps/x86_64/fpu/test-float-vlen16.h (TEST_VECTOR_cosf):
 Likewise.
 (TEST_VECTOR_sinf): Likewise.
 (TEST_VECTOR_sincosf): Likewise.
 (TEST_VECTOR_logf): Likewise.
 (TEST_VECTOR_expf): Likewise.
 (TEST_VECTOR_powf): Likewise.
 * sysdeps/x86_64/fpu/test-float-vlen8.h (TEST_VECTOR_cosf):
 Likewise.
 (TEST_VECTOR_sinf): Likewise.
 (TEST_VECTOR_sincosf): Likewise.
 (TEST_VECTOR_logf): Likewise.
 (TEST_VECTOR_expf): Likewise.
 (TEST_VECTOR_powf): Likewise.
 * math/gen-libm-have-vector-test.sh: Remove file.
 * math/libm-test.inc: Likewise.
 * math/libm-test-support-double.c: Likewise.
 * math/libm-test-support-float.c: Likewise.
 * math/libm-test-support-ldouble.c: Likewise.
 * math/test-double-finite.c: Likewise.: Likewise.
 * math/test-double.c: Likewise.
 * math/test-float-finite.c: Likewise.
 * math/test-float.c: Likewise.
 * math/test-idouble.c: Likewise.
 * math/test-ifloat.c: Likewise.
 * math/test-ildouble.c: Likewise.
 * math/test-ldouble-finite.c: Likewise.
 * math/test-ldouble.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-vlen2.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-vlen2.h: Likewise.
 * sysdeps/x86_64/fpu/test-double-vlen4-avx2.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-vlen4.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-vlen8.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-vlen16.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-vlen4.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-vlen4.h: Likewise.
 * sysdeps/x86_64/fpu/test-float-vlen8-avx2.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-vlen8.c: Likewise.

fw/bug21041 2017-01-24 17:32:30 UTC
WIP delayed IFUNC relocation

Author: Florian Weimer
Author Date: 2017-01-24 17:32:30 UTC

WIP delayed IFUNC relocation

gentoo/2.23 2016-12-08 05:38:41 UTC
alpha: fix trunc for big input values

Author: Aurelien Jarno
Author Date: 2016-08-02 07:18:59 UTC

alpha: fix trunc for big input values

The alpha specific version of trunc and truncf always add and subtract
0x1.0p23 or 0x1.0p52 even for big values. This causes this kind of
errors in the testsuite:

  Failure: Test: trunc_towardzero (0x1p107)
  Result:
   is: 1.6225927682921334e+32 0x1.fffffffffffffp+106
   should be: 1.6225927682921336e+32 0x1.0000000000000p+107
   difference: 1.8014398509481984e+16 0x1.0000000000000p+54
   ulp : 0.5000
   max.ulp : 0.0000

Change this by returning the input value when its absolute value is
greater than 0x1.0p23 or 0x1.0p52. NaN have to go through the add and
subtract operations to get possibly silenced.

Finally remove the code to handle inexact exception, trunc should never
generate such an exception.

Changelog:
 * sysdeps/alpha/fpu/s_trunc.c (__trunc): Return the input value
 when its absolute value is greater than 0x1.0p52.
 [_IEEE_FP_INEXACT] Remove.
 * sysdeps/alpha/fpu/s_truncf.c (__truncf): Return the input value
 when its absolute value is greater than 0x1.0p23.
 [_IEEE_FP_INEXACT] Remove.

(cherry picked from commit b74d259fe793499134eb743222cd8dd7c74a31ce)
(cherry picked from commit 3a5aa2ee4ffc515c8e7e615ea38d6b3b20ed0a30)

dj/malloc 2016-11-10 21:08:28 UTC
Updates to trace2wl

Author: DJ Delorie
Author Date: 2016-11-10 21:08:28 UTC

Updates to trace2wl

* command line option -p to show progress
* command line option -f to use file-based buffers
* reduced memory footprint
* more 32/64-bit fixes

ibm/2.19/master 2016-07-11 17:16:01 UTC
Merge branch 'release/2.19/master' into ibm/2.19/master

Author: Tulio Magno Quites Machado Filho
Author Date: 2016-07-11 17:16:01 UTC

Merge branch 'release/2.19/master' into ibm/2.19/master

Conflicts:
 NEWS

hjl/pr20309/master 2016-06-29 14:38:22 UTC
X86-64: Properly align stack in _dl_tlsdesc_dynamic

Author: H.J. Lu
Author Date: 2016-06-29 11:01:58 UTC

X86-64: Properly align stack in _dl_tlsdesc_dynamic

Since _dl_tlsdesc_dynamic is called via PLT, we need to add 8 bytes for
push in the PLT entry to align the stack.

 [BZ #20309]
 * configure.ac (have-mtls-dialect-gnu2): Set to yes if
 -mtls-dialect=gnu2 works.
 * configure: Regenerated.
 * elf/Makefile [have-mtls-dialect-gnu2 = yes]
 (tests): Add tst-gnu2-tls1.
 (modules-names): Add tst-gnu2-tls1mod.
 ($(objpfx)tst-gnu2-tls1): New.
 (tst-gnu2-tls1mod.so-no-z-defs): Likewise.
 (CFLAGS-tst-gnu2-tls1mod.c): Likewise.
 * elf/tst-gnu2-tls1.c: New file.
 * elf/tst-gnu2-tls1mod.c: Likewise.
 * sysdeps/x86_64/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Add 8
 bytes for push in the PLT entry to align the stack.

hjl/erms/2.23 2016-06-06 20:34:29 UTC
Count number of logical processors sharing L2 cache

Author: H.J. Lu
Author Date: 2016-05-27 22:16:22 UTC

Count number of logical processors sharing L2 cache

For Intel processors, when there are both L2 and L3 caches, SMT level
type should be ued to count number of available logical processors
sharing L2 cache. If there is only L2 cache, core level type should
be used to count number of available logical processors sharing L2
cache. Number of available logical processors sharing L2 cache should
be used for non-inclusive L2 and L3 caches.

 * sysdeps/x86/cacheinfo.c (init_cacheinfo): Count number of
 available logical processors with SMT level type sharing L2
 cache for Intel processors.

hjl/erms/2.22 2016-06-06 20:23:12 UTC
Count number of logical processors sharing L2 cache

Author: H.J. Lu
Author Date: 2016-05-27 22:16:22 UTC

Count number of logical processors sharing L2 cache

For Intel processors, when there are both L2 and L3 caches, SMT level
type should be ued to count number of available logical processors
sharing L2 cache. If there is only L2 cache, core level type should
be used to count number of available logical processors sharing L2
cache. Number of available logical processors sharing L2 cache should
be used for non-inclusive L2 and L3 caches.

 * sysdeps/x86/cacheinfo.c (init_cacheinfo): Count number of
 available logical processors with SMT level type sharing L2
 cache for Intel processors.

hjl/erms/ifunc 2016-05-25 17:10:45 UTC
X86-64: Add dummy memcopy.h and wordcopy.c

Author: H.J. Lu
Author Date: 2016-04-01 21:01:24 UTC

X86-64: Add dummy memcopy.h and wordcopy.c

Since x86-64 doesn't use memory copy functions, add dummy memcopy.h and
wordcopy.c to reduce code size. It reduces the size of libc.so by about
1 KB.

 * sysdeps/x86_64/memcopy.h: New file.
 * sysdeps/x86_64/wordcopy.c: Likewise.

ibm/2.20/master 2016-05-25 13:04:06 UTC
Merge release/2.20/master into ibm/2.20/master

Author: Gabriel F. T. Gomes
Author Date: 2016-05-25 13:04:06 UTC

Merge release/2.20/master into ibm/2.20/master

Conflicts:
 NEWS

release/2.20/master 2016-05-24 21:08:55 UTC
CVE-2016-3075: Stack overflow in _nss_dns_getnetbyname_r [BZ #19879]

Author: Florian Weimer
Author Date: 2016-03-29 10:57:56 UTC

CVE-2016-3075: Stack overflow in _nss_dns_getnetbyname_r [BZ #19879]

The defensive copy is not needed because the name may not alias the
output buffer.

(cherry picked from commit 317b199b4aff8cfa27f2302ab404d2bb5032b9a4)
(cherry picked from commit f5b3338d70a7a2c626331ac4589b6deb2f610432)

hjl/cache/master 2016-05-20 21:57:00 UTC
Count number of logical processors sharing L2 cache

Author: H.J. Lu
Author Date: 2016-05-13 20:26:37 UTC

Count number of logical processors sharing L2 cache

For Intel processors, when there are both L2 and L3 caches, SMT level
type should be ued to count number of available logical processors
sharing L2 cache. If there is only L2 cache, core level type should
be used to count number of available logical processors sharing L2
cache. Number of available logical processors sharing L2 cache should
be used for non-inclusive L2 and L3 caches.

 * sysdeps/x86/cacheinfo.c (init_cacheinfo): Count number of
 available logical processors with SMT level type sharing L2
 cache for Intel processors.

hjl/ld.so/master 2016-05-14 16:19:01 UTC
X86: Add cache info to _dl_x86_cpu_features

Author: H.J. Lu
Author Date: 2016-05-10 12:42:49 UTC

X86: Add cache info to _dl_x86_cpu_features

This patch adds cache info to _dl_x86_cpu_features to allow a processor
to override cache info derived from CPUID.

Tested on x86 and x86-64.

 * sysdeps/x86/cacheinfo.c: Skip if not in libc.
 (init_cacheinfo): Use raw_data_size, raw_shared_size and
 shared_non_temporal_threshold from _dl_x86_cpu_features if
 not zero.
 * sysdeps/x86/cpu-features.h (cache_info): New.
 (cpu_features): Add cache.

release/2.21/master 2016-05-09 13:03:50 UTC
Suppress GCC 6 warning about ambiguous 'else' with -Wparentheses

Author: Yvan Roux
Author Date: 2016-04-15 11:29:26 UTC

Suppress GCC 6 warning about ambiguous 'else' with -Wparentheses

Backport of df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c.

 * stdlib/setenv.c (unsetenv): Fix ambiguous 'else'.
 * nis/nis_call.c (nis_server_cache_add): Likewise.

hjl/2.17/memset 2016-05-05 13:29:28 UTC
Faster memset on x64

Author: Ondrej Bilka
Author Date: 2013-05-20 06:26:00 UTC

Faster memset on x64

This implementation speed up memset in several ways. First is
avoiding expensive computed jump. Second is using fact that arguments
of memset are most of time aligned to 8 bytes.

Benchmark results on:

kam.mff.cuni.cz/~ondra/benchmark_string/memset_profile_result27_04_13.tar.bz2

(cherry picked from commit b2b671b677d92429a3d41bf451668f476aa267ed)

hjl/cacheline/ifunc 2016-04-25 15:32:09 UTC
X86-64: Add dummy memcopy.h and wordcopy.c

Author: H.J. Lu
Author Date: 2016-04-01 21:01:24 UTC

X86-64: Add dummy memcopy.h and wordcopy.c

Since x86-64 doesn't use memory copy functions, add dummy memcopy.h and
wordcopy.c to reduce code size. It reduces the size of libc.so by about
1 KB.

 * sysdeps/x86_64/memcopy.h: New file.
 * sysdeps/x86_64/wordcopy.c: Likewise.

hjl/cacheline/master 2016-04-25 15:13:42 UTC
Skip simple and builtin memory implementations

Author: H.J. Lu
Author Date: 2016-04-07 15:27:12 UTC

Skip simple and builtin memory implementations

hjl/erms/nt 2016-04-25 11:57:38 UTC
Skip simple and builtin memory implementations

Author: H.J. Lu
Author Date: 2016-04-07 15:27:12 UTC

Skip simple and builtin memory implementations

release/2.18/master 2016-04-22 19:53:46 UTC
resolv: Always set *resplen2 out parameter in send_dg [BZ #19791]

Author: Florian Weimer
Author Date: 2016-04-22 15:38:15 UTC

resolv: Always set *resplen2 out parameter in send_dg [BZ #19791]

Since commit 44d20bca52ace85850012b0ead37b360e3ecd96e (Implement
second fallback mode for DNS requests), there is a code path which
returns early, before *resplen2 is initialized. This happens if the
name server address is immediately recognized as invalid (because of
lack of protocol support, or if it is a broadcast address such
255.255.255.255, or another invalid address).

If this happens and *resplen2 was non-zero (which is the case if a
previous query resulted in a failure), __libc_res_nquery would reuse
an existing second answer buffer. This answer has been previously
identified as unusable (for example, it could be an NXDOMAIN
response). Due to the presence of a second answer, no name server
switching will occur. The result is a name resolution failure,
although a successful resolution would have been possible if name
servers have been switched and queries had proceeded along the search
path.

The above paragraph still simplifies the situation. Before glibc
2.23, if the second answer needed malloc, the stub resolver would
still attempt to reuse the second answer, but this is not possible
because __libc_res_nsearch has freed it, after the unsuccessful call
to __libc_res_nquerydomain, and set the buffer pointer to NULL. This
eventually leads to an assertion failure in __libc_res_nquery:

 /* Make sure both hp and hp2 are defined */
 assert((hp != NULL) && (hp2 != NULL));

If assertions are disabled, the consequence is a NULL pointer
dereference on the next line.

Starting with glibc 2.23, as a result of commit
e9db92d3acfe1822d56d11abcea5bfc4c41cf6ca (CVE-2015-7547: getaddrinfo()
stack-based buffer overflow (Bug 18665)), the second answer is always
allocated with malloc. This means that the assertion failure happens
with small responses as well because there is no buffer to reuse, as
soon as there is a name resolution failure which triggers a search for
an answer along the search path.

This commit addresses the issue by ensuring that *resplen2 is
initialized before the send_dg function returns.

This commit also addresses a bug where an invalid second reply is
incorrectly returned as a valid to the caller.

(cherry picked from commit b66d837bb5398795c6b0f651bd5a5d66091d8577)

ibm/2.18/master 2016-04-20 14:18:20 UTC
NEWS: Add 18665 and 19791 to fixed bug list.

Author: Paul E. Murphy
Author Date: 2016-04-20 14:18:20 UTC

NEWS: Add 18665 and 19791 to fixed bug list.

gentoo/2.22 2016-04-10 00:13:40 UTC
configure: fix `test ==` usage

Author: Mike Frysinger
Author Date: 2016-04-10 00:02:48 UTC

configure: fix `test ==` usage

POSIX defines the = operator, but not ==. Fix the few places where we
incorrectly used ==.

(cherry picked from commit b2d4456b333970ab4cb01ed8045b9a8d2c4832f3)
(cherry picked from commit e2c17de539da301c96afa4181347c63eb94d99b1)

hjl/erms/master 2016-03-31 16:00:47 UTC
Add memmove/memset-avx512-unaligned-erms-no-vzeroupper.S

Author: H.J. Lu
Author Date: 2016-03-13 08:26:57 UTC

Add memmove/memset-avx512-unaligned-erms-no-vzeroupper.S

hjl/erms/i386 2016-03-28 13:11:19 UTC
Add 32-bit Enhanced REP MOVSB/STOSB (ERMS) memcpy/memset

Author: H.J. Lu
Author Date: 2011-09-21 22:21:28 UTC

Add 32-bit Enhanced REP MOVSB/STOSB (ERMS) memcpy/memset

Add and test 32-bit memcpy/memset with Enhanced REP MOVSB/STOSB (ERMS).

 * sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add
 bcopy-erms, memcpy-erms, memmove-erms, mempcpy-erms, bzero-erms
 and memset-erms.
 * sysdeps/i386/i686/multiarch/bcopy-erms.S: New file.
 * sysdeps/i386/i686/multiarch/bzero-erms.S: Likewise.
 * sysdeps/i386/i686/multiarch/memcpy-erms.S: Likewise.
 * sysdeps/i386/i686/multiarch/memmove-erms.S: Likewise.
 * sysdeps/i386/i686/multiarch/mempcpy-erms.S: Likewise.
 * sysdeps/i386/i686/multiarch/memset-erms.S: Likewise.
 * sysdeps/i386/i686/multiarch/ifunc-impl-list.c
 (__libc_ifunc_impl_list): Add __bcopy_erms, __bzero_erms,
 __memmove_chk_erms, __memmove_erms, __memset_chk_erms,
 __memset_erms, __memcpy_chk_erms, __memcpy_erms,
 __mempcpy_chk_erms and __mempcpy_erms.

hjl/pr19583 2016-03-23 17:56:38 UTC
[x86] Add a feature bit: Fast_Unaligned_Copy

Author: H.J. Lu
Author Date: 2016-03-23 17:33:19 UTC

[x86] Add a feature bit: Fast_Unaligned_Copy

On AMD processors, memcpy optimized with unaligned SSE load is
slower than emcpy optimized with aligned SSSE3 while other string
functions are faster with unaligned SSE load. A feature bit,
Fast_Unaligned_Copy, is added to select memcpy optimized with
unaligned SSE load.

 [BZ #19583]
 * sysdeps/x86/cpu-features.c (init_cpu_features): Set
 Fast_Unaligned_Copy with Fast_Unaligned_Load for Intel
 processors. Set Fast_Copy_Backward for AMD Excavator
 processors.
 * sysdeps/x86/cpu-features.h (bit_arch_Fast_Unaligned_Copy):
 New.
 (index_arch_Fast_Unaligned_Copy): Likewise.
 * sysdeps/x86_64/multiarch/memcpy.S (__new_memcpy): Check
 Fast_Unaligned_Copy instead of Fast_Unaligned_Load.

hjl/mempcpy 2016-03-04 13:44:17 UTC
Add a comment in sysdeps/x86_64/Makefile

Author: H.J. Lu
Author Date: 2016-03-04 13:44:17 UTC

Add a comment in sysdeps/x86_64/Makefile

Mention recursive calls when ENTRY is used in _mcount.S.

 * sysdeps/x86_64/Makefile (sysdep_noprof): Add a comment.

hjl/plt/2.22 2016-02-23 19:21:45 UTC
[x86_64] Set DL_RUNTIME_UNALIGNED_VEC_SIZE to 8

Author: H.J. Lu
Author Date: 2016-02-22 17:32:57 UTC

[x86_64] Set DL_RUNTIME_UNALIGNED_VEC_SIZE to 8

Due to GCC bug:

   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066

__tls_get_addr may be called with 8-byte stack alignment. Although
this bug has been fixed in GCC 4.9.4, 5.3 and 6, we can't assume
that stack will be always aligned at 16 bytes. Since SSE optimized
memory/string functions with aligned SSE register load and store are
used in the dynamic linker, we must set DL_RUNTIME_UNALIGNED_VEC_SIZE
to 8 so that _dl_runtime_resolve_sse will align the stack before
calling _dl_fixup:

Dump of assembler code for function _dl_runtime_resolve_sse:
   0x00007ffff7deea90 <+0>: push %rbx
   0x00007ffff7deea91 <+1>: mov %rsp,%rbx
   0x00007ffff7deea94 <+4>: and $0xfffffffffffffff0,%rsp
                                ^^^^^^^^^^^ Align stack to 16 bytes
   0x00007ffff7deea98 <+8>: sub $0x100,%rsp
   0x00007ffff7deea9f <+15>: mov %rax,0xc0(%rsp)
   0x00007ffff7deeaa7 <+23>: mov %rcx,0xc8(%rsp)
   0x00007ffff7deeaaf <+31>: mov %rdx,0xd0(%rsp)
   0x00007ffff7deeab7 <+39>: mov %rsi,0xd8(%rsp)
   0x00007ffff7deeabf <+47>: mov %rdi,0xe0(%rsp)
   0x00007ffff7deeac7 <+55>: mov %r8,0xe8(%rsp)
   0x00007ffff7deeacf <+63>: mov %r9,0xf0(%rsp)
   0x00007ffff7deead7 <+71>: movaps %xmm0,(%rsp)
   0x00007ffff7deeadb <+75>: movaps %xmm1,0x10(%rsp)
   0x00007ffff7deeae0 <+80>: movaps %xmm2,0x20(%rsp)
   0x00007ffff7deeae5 <+85>: movaps %xmm3,0x30(%rsp)
   0x00007ffff7deeaea <+90>: movaps %xmm4,0x40(%rsp)
   0x00007ffff7deeaef <+95>: movaps %xmm5,0x50(%rsp)
   0x00007ffff7deeaf4 <+100>: movaps %xmm6,0x60(%rsp)
   0x00007ffff7deeaf9 <+105>: movaps %xmm7,0x70(%rsp)

 [BZ #19679]
 * sysdeps/x86_64/dl-trampoline.S (DL_RUNIME_UNALIGNED_VEC_SIZE):
 Renamed to ...
 (DL_RUNTIME_UNALIGNED_VEC_SIZE): This. Set to 8.
 (DL_RUNIME_RESOLVE_REALIGN_STACK): Renamed to ...
 (DL_RUNTIME_RESOLVE_REALIGN_STACK): This. Updated.
 (DL_RUNIME_RESOLVE_REALIGN_STACK): Renamed to ...
 (DL_RUNTIME_RESOLVE_REALIGN_STACK): This.
 * sysdeps/x86_64/dl-trampoline.h
 (DL_RUNIME_RESOLVE_REALIGN_STACK): Renamed to ...
 (DL_RUNTIME_RESOLVE_REALIGN_STACK): This.

hjl/pr19679/2.23 2016-02-19 23:52:31 UTC
[x86_64] Set DL_RUNTIME_UNALIGNED_VEC_SIZE to 8

Author: H.J. Lu
Author Date: 2016-02-19 23:43:45 UTC

[x86_64] Set DL_RUNTIME_UNALIGNED_VEC_SIZE to 8

Due to GCC bug:

   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066

__tls_get_addr may be called with 8-byte stack alignment. Although
this bug has been fixed in GCC 4.9.4, 5.3 and 6, we can't assume
that stack will be always aligned at 16 bytes. Since SSE optimized
memory/string functions with aligned SSE register load and store are
used in the dynamic linker, we must set DL_RUNTIME_UNALIGNED_VEC_SIZE
to 8 so that _dl_runtime_resolve_sse will align the stack before
calling _dl_fixup:

Dump of assembler code for function _dl_runtime_resolve_sse:
   0x00007ffff7deea90 <+0>: push %rbx
   0x00007ffff7deea91 <+1>: mov %rsp,%rbx
   0x00007ffff7deea94 <+4>: and $0xfffffffffffffff0,%rsp
                                ^^^^^^^^^^^ Align stack to 16 bytes
   0x00007ffff7deea98 <+8>: sub $0x100,%rsp
   0x00007ffff7deea9f <+15>: mov %rax,0xc0(%rsp)
   0x00007ffff7deeaa7 <+23>: mov %rcx,0xc8(%rsp)
   0x00007ffff7deeaaf <+31>: mov %rdx,0xd0(%rsp)
   0x00007ffff7deeab7 <+39>: mov %rsi,0xd8(%rsp)
   0x00007ffff7deeabf <+47>: mov %rdi,0xe0(%rsp)
   0x00007ffff7deeac7 <+55>: mov %r8,0xe8(%rsp)
   0x00007ffff7deeacf <+63>: mov %r9,0xf0(%rsp)
   0x00007ffff7deead7 <+71>: movaps %xmm0,(%rsp)
   0x00007ffff7deeadb <+75>: movaps %xmm1,0x10(%rsp)
   0x00007ffff7deeae0 <+80>: movaps %xmm2,0x20(%rsp)
   0x00007ffff7deeae5 <+85>: movaps %xmm3,0x30(%rsp)
   0x00007ffff7deeaea <+90>: movaps %xmm4,0x40(%rsp)
   0x00007ffff7deeaef <+95>: movaps %xmm5,0x50(%rsp)
   0x00007ffff7deeaf4 <+100>: movaps %xmm6,0x60(%rsp)
   0x00007ffff7deeaf9 <+105>: movaps %xmm7,0x70(%rsp)

 [BZ #19679]
 * sysdeps/x86_64/dl-trampoline.S (DL_RUNIME_UNALIGNED_VEC_SIZE):
 Renamed to ...
 (DL_RUNTIME_UNALIGNED_VEC_SIZE): This. Set to 8.
 (DL_RUNIME_RESOLVE_REALIGN_STACK): Renamed to ...
 (DL_RUNTIME_RESOLVE_REALIGN_STACK): This. Updated.
 (DL_RUNIME_RESOLVE_REALIGN_STACK): Renamed to ...
 (DL_RUNTIME_RESOLVE_REALIGN_STACK): This.
 * sysdeps/x86_64/dl-trampoline.h
 (DL_RUNIME_RESOLVE_REALIGN_STACK): Renamed to ...
 (DL_RUNTIME_RESOLVE_REALIGN_STACK): This.

andros/pr19654 2016-02-18 11:17:51 UTC
Added tests to ensure link with *_finite aliases from libmvec (BZ #19654 fix).

Author: Andrew Senkevich
Author Date: 2016-02-18 11:17:51 UTC

Added tests to ensure link with *_finite aliases from libmvec (BZ #19654 fix).

 [BZ #19654]
 * sysdeps/x86_64/fpu/Makefile: Added new tests.
 * sysdeps/x86_64/fpu/test-double-libmvec-alias-avx-main.c: New.
 * sysdeps/x86_64/fpu/test-double-libmvec-alias-avx-mod.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-libmvec-alias-avx.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-libmvec-alias-avx2-main.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-libmvec-alias-avx2-mod.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-libmvec-alias-avx2.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-libmvec-alias-avx512-main.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-libmvec-alias-avx512-mod.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-libmvec-alias-avx512.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-libmvec-alias-main.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-libmvec-alias-mod.c: Likewise.
 * sysdeps/x86_64/fpu/test-double-libmvec-alias.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-alias-avx-main.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-alias-avx-mod.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-alias-avx.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-alias-avx2-main.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-alias-avx2-mod.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-alias-avx2.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-alias-avx512-main.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-alias-avx512-mod.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-alias-avx512.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-alias-main.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-alias-mod.c: Likewise.
 * sysdeps/x86_64/fpu/test-float-libmvec-alias.c: Likewise.
 * sysdeps/x86_64/fpu/test-libmvec-alias-mod.c: Likewise.

gentoo/2.21 2016-02-17 16:18:58 UTC
Fix parallel build error

Author: Andreas Schwab
Author Date: 2015-03-02 14:47:56 UTC

Fix parallel build error

https://bugs.gentoo.org/74948

(cherry picked from commit e8b6be0016f131c2ac72bf3213eabdb59800e63b)
(cherry picked from commit e04da210f7cd564c46a8db0e15a0c6e726f3977e)

hjl/pr19590 2016-02-16 20:20:37 UTC
Remove test-double-libmvec-alias-*-wrappers.c

Author: H.J. Lu
Author Date: 2016-02-16 20:20:37 UTC

Remove test-double-libmvec-alias-*-wrappers.c

rth/execl 2016-02-09 11:27:56 UTC
alpha: Implement execl{,e,p} without double stack allocation

Author: Richard Henderson
Author Date: 2016-02-09 02:43:08 UTC

alpha: Implement execl{,e,p} without double stack allocation

andros/avx512f-mem 2016-01-15 20:03:44 UTC
Tuned loops with non-temporal access.

Author: Andrew Senkevich
Author Date: 2016-01-15 20:03:44 UTC

Tuned loops with non-temporal access.

    * sysdeps/x86_64/multiarch/memcpy-avx512-no-vzeroupper.S: Tuned
    prefetch.

hjl/pr19463 2016-01-15 16:43:07 UTC
Avoid strdup/strndup/strsep

Author: H.J. Lu
Author Date: 2016-01-13 23:03:46 UTC

Avoid strdup/strndup/strsep

hjl/pr19363/2.22 2016-01-04 16:15:26 UTC
Provide x32 times

Author: H.J. Lu
Author Date: 2015-12-17 19:46:49 UTC

Provide x32 times

Since times returns 64-bit clock_t on x32, we need to provide x32 times
by redefining INTERNAL_SYSCALL_NCS and INTERNAL_SYSCALL_ERROR_P with
64-bit return type for syscall. All system calls returning 64-bit
integer, which are lseek, time and times, must be handled specially for
x32. lseek is handled by x32 lseek.S and time doesn't check syscall
return. times is the only missed one. Before this patch, there are

0000000 <__times>:
   0: b8 64 00 00 40 mov $0x40000064,%eax
   5: 0f 05 syscall
   7: 48 63 d0 movslq %eax,%rdx
                                ^^^^^^^^^^ Incorrect signed extension
   a: 48 83 fa f2 cmp $0xfffffffffffffff2,%rdx
   e: 75 07 jne 17 <__times+0x17>
  10: 3d 00 f0 ff ff cmp $0xfffff000,%eax
                                ^^^^^^^^^^^^^^^^^^^^^ 32-bit compare
  15: 77 11 ja 28 <__times+0x28>
  17: 48 83 fa ff cmp $0xffffffffffffffff,%rdx
  1b: b8 00 00 00 00 mov $0x0,%eax
  20: 48 0f 45 c2 cmovne %rdx,%rax
  24: c3 retq

After this patch, there are

00000000 <__times>:
   0: b8 64 00 00 40 mov $0x40000064,%eax
   5: 0f 05 syscall
   7: 48 83 f8 f2 cmp $0xfffffffffffffff2,%rax
   b: 75 08 jne 15 <__times+0x15>
   d: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax
  13: 77 13 ja 28 <__times+0x28>
  15: 48 83 f8 ff cmp $0xffffffffffffffff,%rax
  19: ba 00 00 00 00 mov $0x0,%edx
  1e: 48 0f 44 c2 cmove %rdx,%rax
  22: c3 retq

The incorrect signed extension and 32-bit compare are gone.

 [BZ #19363]
 * sysdeps/unix/sysv/linux/x86_64/x32/times.c: New file.

hjl/pr19371/master 2015-12-16 14:50:42 UTC
Properly handle x32 syscall

Author: H.J. Lu
Author Date: 2015-12-16 14:50:42 UTC

Properly handle x32 syscall

X32 syscall() may return 64-bit integer as lseek, time and times. Its
return type should be __syscall_slong_t instead of long int. We need
to properly return 64-bit error value.

Before the patch:

Dump of assembler code for function syscall:
   0x000dab20 <+0>: mov %rdi,%rax
   0x000dab23 <+3>: mov %rsi,%rdi
   0x000dab26 <+6>: mov %rdx,%rsi
   0x000dab29 <+9>: mov %rcx,%rdx
   0x000dab2c <+12>: mov %r8,%r10
   0x000dab2f <+15>: mov %r9,%r8
   0x000dab32 <+18>: mov 0x8(%rsp),%r9
   0x000dab37 <+23>: syscall
   0x000dab39 <+25>: cmp $0xfffffffffffff001,%rax
   0x000dab3f <+31>: jae 0xdab42 <syscall+34>
   0x000dab41 <+33>: retq
   0x000dab42 <+34>: mov 0x2b3367(%rip),%rcx # 0x38deb0
   0x000dab49 <+41>: neg %eax
   0x000dab4b <+43>: mov %eax,%fs:(%rcx)
   0x000dab4e <+46>: or $0xffffffff,%eax
                        ^^^^^^^^^^^^^^^^^^ This is 32-bit error return.
   0x000dab51 <+49>: retq
End of assembler dump.

After the patch:

Dump of assembler code for function syscall:
   0x000daaf0 <+0>: mov %rdi,%rax
   0x000daaf3 <+3>: mov %rsi,%rdi
   0x000daaf6 <+6>: mov %rdx,%rsi
   0x000daaf9 <+9>: mov %rcx,%rdx
   0x000daafc <+12>: mov %r8,%r10
   0x000daaff <+15>: mov %r9,%r8
   0x000dab02 <+18>: mov 0x8(%rsp),%r9
   0x000dab07 <+23>: syscall
   0x000dab09 <+25>: cmp $0xfffffffffffff001,%rax
   0x000dab0f <+31>: jae 0xdab12 <syscall+34>
   0x000dab11 <+33>: retq
   0x000dab12 <+34>: mov 0x2b3397(%rip),%rcx # 0x38deb0
   0x000dab19 <+41>: neg %eax
   0x000dab1b <+43>: mov %eax,%fs:(%rcx)
   0x000dab1e <+46>: or $0xffffffffffffffff,%rax
   0x000dab22 <+50>: retq
End of assembler dump.

 [BZ #19371]
 * posix/unistd.h (syscall): Use __syscall_slong_t for return
 type.
 * sysdeps/unix/sysv/linux/x86_64/x32/syscall.S: New file.

hjl/pr19363/master 2015-12-16 13:46:20 UTC
Use INTERNAL_SYSCALL_TIMES* macros for Linux times

Author: H.J. Lu
Author Date: 2015-12-15 03:09:13 UTC

Use INTERNAL_SYSCALL_TIMES* macros for Linux times

The Linux times function, which returns clock_t, is implemented with
INTERNAL_SYSCALL_DECL, INTERNAL_SYSCALL, INTERNAL_SYSCALL_ERROR_P and
INTERNAL_SYSCALL_ERRNO. Since INTERNAL_SYSCALL* macros use 32-bit
integer and clock_t is 64-bit on x32, this is a mismatch on x32. All
system calls returning 64-bit integer, which are lseek, time and times,
must be handled specially for x32. lseek is handled by x32 lseek.S and
time doesn't check syscall return. times is the only missed one.

This patch replaces INTERNAL_SYSCALL* macros in Linux times.c with
INTERNAL_SYSCALL_TIMES* macros which are default to INTERNAL_SYSCALL*
macros and provides x32 times.c with proper INTERNAL_SYSCALL_TIMES*
macros.

There is no code change on times for i686 nor x86-64. For x32, before
this patch, there are

0000000 <__times>:
   0: b8 64 00 00 40 mov $0x40000064,%eax
   5: 0f 05 syscall
   7: 48 63 d0 movslq %eax,%rdx
                                ^^^^^^^^^^ Incorrect signed extension
   a: 48 83 fa f2 cmp $0xfffffffffffffff2,%rdx
   e: 75 07 jne 17 <__times+0x17>
  10: 3d 00 f0 ff ff cmp $0xfffff000,%eax
                                ^^^^^^^^^^^^^^^^^^^^^ 32-bit compare
  15: 77 11 ja 28 <__times+0x28>
  17: 48 83 fa ff cmp $0xffffffffffffffff,%rdx
  1b: b8 00 00 00 00 mov $0x0,%eax
  20: 48 0f 45 c2 cmovne %rdx,%rax
  24: c3 retq

After this patch, there are

00000000 <__times>:
   0: b8 64 00 00 40 mov $0x40000064,%eax
   5: 0f 05 syscall
   7: 48 83 f8 f2 cmp $0xfffffffffffffff2,%rax
   b: 75 08 jne 15 <__times+0x15>
   d: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax
  13: 77 13 ja 28 <__times+0x28>
  15: 48 83 f8 ff cmp $0xffffffffffffffff,%rax
  19: ba 00 00 00 00 mov $0x0,%edx
  1e: 48 0f 44 c2 cmove %rdx,%rax
  22: c3 retq

The incorrect signed extension and 32-bit compare are gone.

 [BZ #19363]
 * sysdeps/unix/sysv/linux/times.c (INTERNAL_SYSCALL_TIMES_DECL):
 New.
 (INTERNAL_SYSCALL_TIMES): Likewise.
 (INTERNAL_SYSCALL_TIMES_ERROR_P): Likewise.
 (INTERNAL_SYSCALL_TIMES_ERRNO): Likewise.
 (__times): Replace INTERNAL_SYSCALL* macros with
 INTERNAL_SYSCALL_TIMES* macros.
 * sysdeps/unix/sysv/linux/x86_64/x32/times.c: New file.

hjl/32bit/2.22 2015-12-15 21:45:12 UTC
Add Prefer_MAP_32BIT_EXEC to map executable pages with MAP_32BIT

Author: H.J. Lu
Author Date: 2015-10-21 21:44:23 UTC

Add Prefer_MAP_32BIT_EXEC to map executable pages with MAP_32BIT

According to Silvermont software optimization guide, for 64-bit
applications, branch prediction performance can be negatively impacted
when the target of a branch is more than 4GB away from the branch. Add
the Prefer_MAP_32BIT_EXEC bit so that mmap will try to map executable
pages with MAP_32BIT first. NB: MAP_32BIT will map to lower 2GB, not
lower 4GB, address. Prefer_MAP_32BIT_EXEC reduces bits available for
address space layout randomization (ASLR), which is always disabled for
SUID programs and can only be enabled by setting environment variable,
LD_PREFER_MAP_32BIT_EXEC.

On Fedora 23, this patch speeds up GCC 5 testsuite by 3% on Silvermont.

 [BZ #19367]
 * sysdeps/unix/sysv/linux/wordsize-64/mmap.c: New file.
 * sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h: Likewise.
 * sysdeps/unix/sysv/linux/x86_64/64/mmap.c: Likewise.
 * sysdeps/x86/cpu-features.h (bit_Prefer_MAP_32BIT_EXEC): New.
 (index_Prefer_MAP_32BIT_EXEC): Likewise.

(cherry picked from commit b9eb92ab05204df772eb4929eccd018637c9f3e9)

hjl/32bit/master 2015-12-15 21:16:02 UTC
Add Prefer_MAP_32BIT_EXEC to map executable pages with MAP_32BIT

Author: H.J. Lu
Author Date: 2015-10-21 21:44:23 UTC

Add Prefer_MAP_32BIT_EXEC to map executable pages with MAP_32BIT

According to Silvermont software optimization guide, for 64-bit
applications, branch prediction performance can be negatively impacted
when the target of a branch is more than 4GB away from the branch. Add
the Prefer_MAP_32BIT_EXEC bit so that mmap will try to map executable
pages with MAP_32BIT first. NB: MAP_32BIT will map to lower 2GB, not
lower 4GB, address. Prefer_MAP_32BIT_EXEC reduces bits available for
address space layout randomization (ASLR), which is always disabled for
SUID programs and can only be enabled by setting environment variable,
LD_PREFER_MAP_32BIT_EXEC.

On Fedora 23, this patch speeds up GCC 5 testsuite by 3% on Silvermont.

 [BZ #19367]
 * sysdeps/unix/sysv/linux/wordsize-64/mmap.c: New file.
 * sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h: Likewise.
 * sysdeps/unix/sysv/linux/x86_64/64/mmap.c: Likewise.
 * sysdeps/x86/cpu-features.h (bit_Prefer_MAP_32BIT_EXEC): New.
 (index_Prefer_MAP_32BIT_EXEC): Likewise.

hjl/pr19363/clobber 2015-12-15 04:35:51 UTC
Use REGISTERS_CLOBBERED_BY_SYSCALL

Author: H.J. Lu
Author Date: 2015-12-15 04:35:51 UTC

Use REGISTERS_CLOBBERED_BY_SYSCALL

hjl/pr19178/master 2015-11-10 23:54:22 UTC
Run tst-prelink test for GLOB_DAT reloc

Author: H.J. Lu
Author Date: 2015-11-10 23:54:22 UTC

Run tst-prelink test for GLOB_DAT reloc

Run tst-prelink test on targets with GLOB_DAT relocaton.

 * config.make.in (have-glob-dat-reloc): New.
 * configure.ac (libc_cv_has_glob_dat): New. Set to yes if
 target supports GLOB_DAT relocaton. AC_SUBST.
 * configure: Regenerated.
 * elf/Makefile (tests): Add tst-prelink.
 (tests-special): Add $(objpfx)tst-prelink-cmp.out.
 (tst-prelink-ENV): New.
 ($(objpfx)tst-prelink-conflict.out): Likewise.
 ($(objpfx)tst-prelink-cmp.out): Likewise.
 * sysdeps/x86/tst-prelink.c: Moved to ...
 * elf/tst-prelink.c: Here.
 * sysdeps/x86/tst-prelink.exp: Moved to ...
 * elf/tst-prelink.exp: Here.
 * sysdeps/x86/Makefile (tests): Don't add tst-prelink.
 (tst-prelink-ENV): Removed.
 ($(objpfx)tst-prelink-conflict.out): Likewise.
 ($(objpfx)tst-prelink-cmp.out): Likewise.
 (tests-special): Don't add $(objpfx)tst-prelink-cmp.out.

hjl/pr19122 2015-10-20 12:43:19 UTC
Mark internal unistd functions hidden in ld.so

Author: H.J. Lu
Author Date: 2015-10-14 22:21:55 UTC

Mark internal unistd functions hidden in ld.so

Since internal unistd functions are only used internally in ld.so and
libc.so, they can be made hidden. Some functions can't be hidden in
ld.so on Hurd since they will be preempted by the ones in libc.so after
bootstrap.

 [BZ #19122]
 * include/unistd.h [IS_IN (rtld)]: Include <dl-unistd.h>.
 * sysdeps/generic/dl-unistd.h: New file.
 * sysdeps/mach/hurd/dl-unistd.h: Likewise.

hjl/i386/master 2015-10-19 17:45:25 UTC
Avoid reading errno in syscall implementations

Author: H.J. Lu
Author Date: 2015-08-21 21:46:05 UTC

Avoid reading errno in syscall implementations

Reading errno is expensive for x86 PIC. With INTERNAL_SYSCALL,
INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO and
INLINE_SYSCALL_ERROR_RETURN_VALUE, we can avoid reading errno.

There are no code changes on x86-64. On i686, libc.so sizes in bytes
show:

        text data bss dec
after 1748495 11380 11132 1771007
before 1748403 11380 11132 1770915

 * sysdeps/unix/sysv/linux/eventfd.c (eventfd): Use
 INTERNAL_SYSCALL, INTERNAL_SYSCALL_ERROR_P and
 INTERNAL_SYSCALL_ERRNO to avoid reading errno.
 * sysdeps/unix/sysv/linux/fstatfs64.c (__fstatfs64): Likewise.
 * sysdeps/unix/sysv/linux/getrlimit64.c (__getrlimit64):
 Likewise.
 * sysdeps/unix/sysv/linux/setrlimit64.c (setrlimit64):
 Likewise.
 * sysdeps/unix/sysv/linux/signalfd.c (signalfd): Likewise.
 * sysdeps/unix/sysv/linux/statfs64.c (__statfs64): Likewise.

hjl/pthread/2.22 2015-09-23 16:03:45 UTC
Use STB_SECONDARY on pthread functions in libc

Author: H.J. Lu
Author Date: 2012-09-13 13:01:04 UTC

Use STB_SECONDARY on pthread functions in libc

Use STB_SECONDARY binding on pthread functions in libc so that they will
be preempted by definitions in libpthread at link-time as well as at
run-time.

 * csu/libc-tls.c (__pthread_initialize_minimal): Mark it
 secondary if HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 * misc/error.c (error): Replace pthread_setcancelstate with
 __pthread_setcancelstate.
 (error_at_line): Likewise.
 * posix/wordexp.c (parse_comm): Likewise.
 * stdlib/fmtmsg.c (fmtmsg): Likewise.
 * nptl/Makefile:
 (routines): Add libc-pthread-secondary.
 (CFLAGS-libc-pthread-secondary.c): New.
 * nptl/Versions [HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_2.0):
 Add pthread_once.
 [HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_PRIVATE): Add
 _pthread_cleanup_pop_restore, _pthread_cleanup_push_defer,
 __pthread_getspecific, __pthread_setspecific,
 __pthread_key_create, __pthread_mutex_lock,
 __pthread_mutex_unlock, __pthread_once,
 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock,
 __pthread_rwlock_unlock and __pthread_unwind.
 [HAVE_ASM_SECONDARY_DIRECTIVE] (libpthread:GLIBC_PRIVATE):
 Likewise.
 * cleanup_defer_compat.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 _pthread_cleanup_pop_restore and _pthread_cleanup_push_defer.
 * nptl/forward.c [HAVE_ASM_SECONDARY_DIRECTIVE] (FORWARD2): New.
 (FORWARD_NORETURN): Likewise.
 (pthread_setcancelstate): Renamed to ...
 (__pthread_setcancelstate): This.
 (pthread_setcancelstate): Add an alias.
 * nptl/libc-pthread-secondary.c: New file.
 * nptl/nptl-init.c (pthread_functions): Don't include secondary
 pthread functions in libc if HAVE_ASM_SECONDARY_DIRECTIVE is
 defined. Replace ptr_pthread_setcancelstate with
 ptr___pthread_setcancelstate.
 * sysdeps/nptl/pthread-functions.h (pthread_functions): Likewise.
 * nptl/pthread_getspecific.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_getspecific.
 * nptl/pthread_key_create.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_key_create.
 * nptl/pthread_mutex_lock.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_mutex_lock.
 * nptl/pthread_mutex_unlock.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_mutex_unlock.
 * nptl/pthread_once.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_once.
 * nptl/pthread_rwlock_rdlock.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_rwlock_rdlock.
 * nptl/pthread_rwlock_unlock.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_rwlock_unlock.
 * nptl/pthread_rwlock_wrlock.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_rwlock_wrlock.
 * nptl/pthread_setspecific.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_setspecific.
 * nptl/pthreadP.h (__pthread_unwind): Don't mark it weak if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 (__pthread_cond_broadcast_2_0): Declare only if not in libc.
 (__pthread_cond_destroy_2_0): Likewise.
 (__pthread_cond_init_2_0): Likewise.
 (__pthread_cond_signal_2_0): Likewise.
 (__pthread_cond_timedwait_2_0): Likewise.
 (__pthread_cond_wait_2_0): Likewise.
 * scripts/abilist.awk: Support secondary symbols.
 * sysdeps/generic/localplt.data: Add __pthread_getspecific,
 __pthread_key_create, __pthread_once, __pthread_rwlock_rdlock,
 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
 __pthread_setcancelstate, __pthread_setspecific,
 __pthread_unwind. _pthread_cleanup_pop_restore and
 _pthread_cleanup_push_defer.
 * sysdeps/unix/sysv/linux/i386/localplt.data: Likewise.
 * sysdeps/x86_64/localplt.data: Likewise.
 * sysdeps/nptl/bits/libc-lockP.h (PTFAVAIL): Defined as 1 if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 (__libc_maybe_call): Always call FUNC if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 (__libc_ptf_call): Likewise.
 (__libc_ptf_call_always): Likewise.
 (__pthread_mutex_init): Don't mark it weak if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 (__pthread_mutex_destroy): Likewise.
 (__pthread_mutex_lock): Likewise.
 (__pthread_mutex_trylock): Likewise.
 (__pthread_mutex_unlock): Likewise.
 (__pthread_mutexattr_init): Likewise.
 (__pthread_mutexattr_destroy): Likewise.
 (__pthread_mutexattr_settype): Likewise.
 (__pthread_rwlock_destroy): Likewise.
 (__pthread_rwlock_rdlock): Likewise.
 (__pthread_rwlock_tryrdlock): Likewise.
 (__pthread_rwlock_wrlock): Likewise.
 (__pthread_rwlock_trywrlock): Likewise.
 (__pthread_rwlock_unlock): Likewise.
 (__pthread_key_create): Likewise.
 (__pthread_setspecific): Likewise.
 (__pthread_getspecific): Likewise.
 (__pthread_once): Likewise.
 (__pthread_initialize): Likewise.
 (__pthread_atfork): Likewise.
 (_pthread_cleanup_push_defer): Likewise.
 (_pthread_cleanup_pop_restore): Likewise.
 (__pthread_setcancelstate): New prototype.
 (pthread_setcancelstate): Renamed to ...
 (__pthread_setcancelstate): This. Don't mark it weak if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 * sysdeps/nptl/jmp-unwind.c: Include <bits/libc-lock.h>
 instead of <nptl/pthreadP.h>.
 (__pthread_cleanup_upto): Don't mark it weak if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 (_longjmp_unwind): Use __libc_ptf_call.
 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
 * sysdeps/unix/sysv/linux/fatal-prepare.h (FATAL_PREPARE): Always
 call __pthread_setcancelstate if HAVE_ASM_SECONDARY_DIRECTIVE is
 defined. Replace pthread_setcancelstate with
 __pthread_setcancelstate.
 * sysdeps/unix/sysv/linux/i386/libc.abilist: Add pthread_once.
 * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Make
 __lll_lock_wait_private and __lll_unlock_wake_private weak in
 libc.a.
 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
 * sysdeps/unix/sysv/linux/x86_64/cancellation.S (__pthread_unwind):
 Don't mark it weak if HAVE_ASM_SECONDARY_DIRECTIVE is defined.

carlos/dlmopen 2015-09-18 04:12:22 UTC
Initial implemenation of full dlmopen support.

Author: Carlos O'Donell
Author Date: 2015-09-18 04:12:22 UTC

Initial implemenation of full dlmopen support.

hjl/pthread/2.21 2015-09-16 20:00:11 UTC
Use STB_SECONDARY on pthread functions in libc

Author: H.J. Lu
Author Date: 2012-09-13 13:01:04 UTC

Use STB_SECONDARY on pthread functions in libc

Use STB_SECONDARY binding on pthread functions in libc so that they will
be preempted by definitions in libpthread at link-time as well as at
run-time.

 * csu/libc-tls.c (__pthread_initialize_minimal): Mark it
 secondary if HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 * misc/error.c (error): Replace pthread_setcancelstate with
 __pthread_setcancelstate.
 (error_at_line): Likewise.
 * posix/wordexp.c (parse_comm): Likewise.
 * stdlib/fmtmsg.c (fmtmsg): Likewise.
 * nptl/Makefile: Include ../Makeconfig.
 (libc-libpthread-routines): New macro.
 (libc-libpthread-static-only-routines): Likewise.
 (static-only-routines): Add $(libc-libpthread-static-only-routines)
 if $(have-secondary) is yes.
 (routines): Add $(libc-libpthread-routines) if $(have-secondary)
 is yes.
 (CFLAGS-libc-pthread_unwind.c): New.
 * nptl/Versions [HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_2.0):
 Add _pthread_cleanup_pop_restore, _pthread_cleanup_push_defer,
 __pthread_getspecific, __pthread_setspecific,
 __pthread_key_create, pthread_once, __pthread_once,
 __pthread_mutex_lock and __pthread_mutex_unlock.
 [HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_2.2): Add
 __pthread_rwlock_init, __pthread_rwlock_destroy,
 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock and
 __pthread_rwlock_unlock.
 [HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_PRIVATE): Add
 __pthread_unwind and __pthread_setcancelstate.
 [HAVE_ASM_SECONDARY_DIRECTIVE] (libpthread:GLIBC_PRIVATE): Add
 __pthread_setcancelstate.
 * nptl/forward.c [HAVE_ASM_SECONDARY_DIRECTIVE] (FORWARD2): New.
 (FORWARD_NORETURN): Likewise.
 (pthread_setcancelstate): Renamed to ...
 (__pthread_setcancelstate): This. Don't define if
 (__pthread_unwind): Don't define if HAVE_ASM_SECONDARY_DIRECTIVE
 is defined.
 * nptl/libc-cleanup_defer_compat.c: New file.
 * nptl/libc-pthread_getspecific.c: Likewise.
 * nptl/libc-pthread_key_create.c: Likewise.
 * nptl/libc-pthread_mutex_lock.c: Likewise.
 * nptl/libc-pthread_mutex_unlock.c: Likewise.
 * nptl/libc-pthread_once.c: Likewise.
 * nptl/libc-pthread_rwlock_destroy.c: Likewise.
 * nptl/libc-pthread_rwlock_init.c: Likewise.
 * nptl/libc-pthread_rwlock_rdlock.c: Likewise.
 * nptl/libc-pthread_rwlock_unlock.c: Likewise.
 * nptl/libc-pthread_rwlock_wrlock.c: Likewise.
 * nptl/libc-pthread_setcancelstate.c: Likewise.
 * nptl/libc-pthread_setspecific.c: Likewise.
 * nptl/libc-pthread_unwind.c: Likewise.
 * nptl/nptl-init.c (pthread_functions): Don't include secondary
 pthread functions in libc if HAVE_ASM_SECONDARY_DIRECTIVE is
 defined. Replace ptr_pthread_setcancelstate with
 ptr___pthread_setcancelstate.
 * sysdeps/nptl/pthread-functions.h (pthread_functions): Likewise.
 * nptl/pthreadP.h (__pthread_unwind): Don't mark it weak if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 (__pthread_cond_broadcast_2_0): Declare only if not in libc.
 (__pthread_cond_destroy_2_0): Likewise.
 (__pthread_cond_init_2_0): Likewise.
 (__pthread_cond_signal_2_0): Likewise.
 (__pthread_cond_timedwait_2_0): Likewise.
 (__pthread_cond_wait_2_0): Likewise.
 * scripts/abilist.awk: Support secondary symbols.
 * sysdeps/generic/localplt.data: Allow pthread functions.
 * sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/i386/localplt.data: Likewise.
 * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.
 * sysdeps/nptl/bits/libc-lockP.h (PTFAVAIL): Defined as 1 if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 (__libc_maybe_call): Always call FUNC if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 (__libc_ptf_call): Likewise.
 (__libc_ptf_call_always): Likewise.
 (__pthread_mutex_init): Don't mark it weak if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 (__pthread_mutex_destroy): Likewise.
 (__pthread_mutex_lock): Likewise.
 (__pthread_mutex_trylock): Likewise.
 (__pthread_mutex_unlock): Likewise.
 (__pthread_mutexattr_init): Likewise.
 (__pthread_mutexattr_destroy): Likewise.
 (__pthread_mutexattr_settype): Likewise.
 (__pthread_rwlock_destroy): Likewise.
 (__pthread_rwlock_rdlock): Likewise.
 (__pthread_rwlock_tryrdlock): Likewise.
 (__pthread_rwlock_wrlock): Likewise.
 (__pthread_rwlock_trywrlock): Likewise.
 (__pthread_rwlock_unlock): Likewise.
 (__pthread_key_create): Likewise.
 (__pthread_setspecific): Likewise.
 (__pthread_getspecific): Likewise.
 (__pthread_once): Likewise.
 (__pthread_initialize): Likewise.
 (__pthread_atfork): Likewise.
 (_pthread_cleanup_push_defer): Likewise.
 (_pthread_cleanup_pop_restore): Likewise.
 (__pthread_setcancelstate): New prototype.
 (pthread_setcancelstate): Renamed to ...
 (__pthread_setcancelstate): This. Don't mark it weak if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 * sysdeps/unix/sysv/linux/x86_64/cancellation.S (__pthread_unwind):
 Likewise.
 * sysdeps/unix/sysv/linux/fatal-prepare.h (FATAL_PREPARE): Always
 call __pthread_setcancelstate if HAVE_ASM_SECONDARY_DIRECTIVE is
 defined. Replace pthread_setcancelstate with
 __pthread_setcancelstate.
 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Make
 __lll_lock_wait_private and __lll_unlock_wake_private weak in
 libc.a.
 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.

hjl/unaligned 2015-08-28 13:02:43 UTC
Make strcmp with unaligned load/store the default

Author: H.J. Lu
Author Date: 2015-08-25 18:01:20 UTC

Make strcmp with unaligned load/store the default

Since strcmp_sse2_unaligned performs better on current Intel and AMD
processors, this patch makes it the default.

 * sysdeps/x86_64/strcmp.S: Moved to ...
 * sysdeps/x86_64/multiarch/strcmp-sse2.S: Here. Remove
 "#if !IS_IN (libc)". Remove libc_hidden_builtin_def (STRCMP).
 (STRCMP): Defined to __strcmp_sse2 if not defined.
 * sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S: Moved to ...
 * sysdeps/x86_64/strcmp.S: Here. Remove "#if IS_IN (libc)".
 Add .text. Add libc_hidden_builtin_def (strcmp).
 (__strcmp_sse2_unaligned): Renamed to ...
 (strcmp): This.
 * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
 strcmp-sse2.
 * sysdeps/x86_64/multiarch/strcasecmp_l-ssse3.S: Include
 strcmp-sse2.S instead of ../strcmp.S.
 * sysdeps/x86_64/multiarch/strcmp-ssse3.S: Likewise.
 * sysdeps/x86_64/multiarch/strncase_l-ssse3.S: Likewise.
 * sysdeps/x86_64/multiarch/strncmp-ssse3.S: Likewise.
 * sysdeps/x86_64/multiarch/strcmp.S
 [USE_AS_STRCMP] (STRCMP_SSE2): Set to __strcmp_sse2_unaligned.
 [USE_AS_STRCMP] (STRCMP): Load __strcmp_sse2 instead of
 STRCMP_SSE2.
 [USE_AS_STRCMP] (strcmp): Defined __strcmp_sse2_unaligned if
 in libc.
 [!USE_AS_STRCMP]: Include strcmp-sse2S instead of ../strcmp.S.
 * sysdeps/x86_64/strcasecmp_l.S: Include multiarch/strcmp-sse2.S
 instead of strcmp.S. Add libc_hidden_builtin_def (STRCMP).
 * sysdeps/x86_64/strncase_l.S: Likewise.
 * sysdeps/x86_64/strncmp.S: Likewise.

hjl/i486/multiarch 2015-08-27 16:35:12 UTC
Add i386 math multiarch functions

Author: H.J. Lu
Author Date: 2015-08-26 11:20:42 UTC

Add i386 math multiarch functions

fedora/master 2015-08-27 16:06:44 UTC
Detect and select i586/i686 implementation at run-time

Author: H.J. Lu
Author Date: 2015-08-27 16:06:26 UTC

Detect and select i586/i686 implementation at run-time

We detect i586 and i686 features at run-time by checking CX8 and CMOV
CPUID features bits. We can use these information to select the best
implementation in ix86 multiarch. HAS_I586/HAS_I686 is true if i586/i686
instructions are available on the processor.

Due to the reordering and the other nifty extensions in i686, it is not
really good to use heavily i586 optimized code on an i686. It's better
to use i486 code if it isn't an i586. USE_I586/USE_I686 is true if
i586/i686 implementation should be used for the processor. USE_I586
is true only if i686 instructions aren't available. If i686 instructions
are available, we always choose i686 or i486 implementation, in that order,
and we never choose i586 implementation for i686-class processors.

 * sysdeps/i386/init-arch.h: New file.
 * sysdeps/i386/i586/init-arch.h: Likewise.
 * sysdeps/i386/i686/init-arch.h: Likewise.
 * sysdeps/x86/cpu-features.c (init_cpu_features): Set bit_I586
 bit if CX8 is available. Set bit_I686 bit if CMOV is available.
 * sysdeps/x86/cpu-features.h (bit_I586): New.
 (bit_I686): Likewise.
 (bit_CX8): Likewise.
 (bit_CMOV): Likewise.
 (index_CX8): Likewise.
 (index_CMOV): Likewise.
 (index_I586): Likewise.
 (index_I686): Likewise.
 (reg_CX8): Likewise.
 (reg_CMOV): Likewise.
 (HAS_I586): Defined as HAS_ARCH_FEATURE (I586) if i586 isn't
 available at compile-time.
 (HAS_I686): Defined as HAS_ARCH_FEATURE (I686) if i686 isn't
 available at compile-time.
 * sysdeps/x86/init-arch.h (USE_I586): New macro.
 (USE_I686): Likewise.

101200 of 324 results
This repository contains Public information 
Everyone can see this information.

Subscribers