glibc:zack/build-experiments

Last commit made on 2017-06-01
Get this branch:
git clone -b zack/build-experiments https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
zack/build-experiments
Repository:
lp:glibc

Recent commits

ef3637b... by Zack Weinberg

Experimenting with alternatives to VPATH.

cfa9bb6... by Andreas Schwab <email address hidden>

Use test-driver in nptl/tst-fork3.c

4158ba0... by Siddhesh Poyarekar <email address hidden>

Delay initialization of CPU features struct in static binaries

Allow the CPU features structure set up to be overridden by tunables
by delaying it to until after tunables are initialized. The
initialization is already delayed in dynamically linked glibc, it is
only in static binaries that the initialization is set early to allow
it to influence IFUNC relocations that happen in libc-start. It is a
bit too early however and there is a good place between tunables
initialization and IFUNC relocations where this can be done.

Verified that this does not regress the testsuite.

 * csu/libc-start.c [!ARCH_INIT_CPU_FEATURES]: Define
 ARCH_INIT_CPU_FEATURES.
 (LIBC_START_MAIN): Call it.
 * sysdeps/unix/sysv/linux/aarch64/libc-start.c
 (__libc_start_main): Remove.
 (ARCH_INIT_CPU_FEATURES): New macro.
 * sysdeps/x86/libc-start.c (__libc_start_main): Remove.
 (ARCH_INIT_CPU_FEATURES): New macro.

2e0bbbf... by =?utf-8?q?Dennis_W=C3=B6lfing?= <email address hidden>

Add reallocarray function

The reallocarray function is an extension from OpenBSD. It is an
integer-overflow-safe replacement for realloc(p, X*Y) and
malloc(X*Y) (realloc(NULL, X*Y)). It can therefore help in preventing
certain security issues in code.

This is an updated version of a patch originally submitted by Rüdiger
Sonderfeld in May 2014 [1].

Checked on i686-linux-gnu and x86_64-linux-gnu.

[1] <https://sourceware.org/ml/libc-alpha/2014-05/msg00481.html>.

2017-05-30 Dennis Wölfing <email address hidden>
            Rüdiger Sonderfeld <email address hidden>

 * include/stdlib.h (__libc_reallocarray): New declaration.
 * malloc/Makefile (routines): Add reallocarray.
 (tests): Add tst-reallocarray.c.
 * malloc/Versions: Add reallocarray and __libc_reallocarray.
 * malloc/malloc-internal.h (check_mul_overflow_size_t): New inline
 function.
 * malloc/malloc.h (reallocarray): New declaration.
 * stdlib/stdlib.h (reallocarray): Likewise.
 * malloc/reallocarray.c: New file.
 * malloc/tst-reallocarray.c: New test file.
 * manual/memory.texi: Document reallocarray.
 * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Add reallocarray.
 * sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist:
 Likewise.
 * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist:
 Likewise.
 * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise.
 * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/tilepro/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.

4f26ef1... by "H.J. Lu" <email address hidden>

x86_64: Remove redundant REX bytes from memchr.S

By x86-64 specification, 32-bit destination registers are zero-extended
to 64 bits. There is no need to use 64-bit registers when only the lower
32 bits are non-zero.

 * sysdeps/x86_64/memchr.S (MEMCHR): Use 32-bit registers for
 the lower 32 bits.

542a347... by Andreas Schwab

m68k: handle default PIE

acf6d57... by "H.J. Lu" <email address hidden>

Add memchr tests for n == 0

 * string/test-memchr.c (test_main): Add tests for n == 0.

6e75b01... by Tulio Magno Quites Machado Filho <email address hidden>

Move tst-mutex*8* to tests-internal

The following tests depend on ENABLE_LOCK_ELISION, which is only
available on tests-internal.

 - nptl/tst-mutex8
 - nptl/tst-mutex8-static
 - nptl/tst-mutexpi8
 - nptl/tst-mutexpi8-static

 * nptl/Makefile (tests): Move nptl/tst-mutex8, nptl/tst-mutex8-static,
 nptl/tst-mutexpi8 and nptl/tst-mutexpi8-static to...
 (tests-internal): ... here.

81efada... by "H.J. Lu" <email address hidden>

Make __tunables_init hidden and avoid PLT

Since __tunables_init is internal to ld.so, we should mark it hidden
to avoid PLT. We should also avoid PLT when calling __tunable_set_val
within ld.so.

2017-05-25 Siddhesh Poyarekar <email address hidden>
      H.J. Lu <email address hidden>

 * elf/dl-tunables.c (__tunable_set_val): Make a hidden alias.
 * elf/dl-tunables.h (__tunables_init): Mark it hidden in rtld.
 (__tunable_set_val): Likewise.

ee8015b... by "H.J. Lu" <email address hidden>

Support dl-tunables.list in subdirectories

We can put processor specific tunables in dl-tunables.list under
sysdeps instead of in elf/dl-tunables.list.

 * Makeconfig ($(common-objpfx)dl-tunable-list.h): Also check
 dl-tunables.list in subdirectories.