On Linux/x86-64, I got [hjl@gnu-tools-1 pr15228]$ cat x.c extern int a; extern void bar (void); int main() { bar (); if (a != 30) __builtin_abort(); return 0; } [hjl@gnu-tools-1 pr15228]$ cat bar.c int a; __attribute__((visibility("protected"))) int a; void bar () { a = 30; } [hjl@gnu-tools-1 pr15228]$ make all gcc -B/bin/ -c -o x.o x.c gcc -B/bin/ -fPIC -c -o bar.o bar.c ./ld -shared -o libbar.so bar.o gcc -B/bin/ -o x x.o libbar.so -Wl,-rpath,. ./x make: *** [all] Aborted (core dumped) [hjl@gnu-tools-1 pr15228]$ Should it be disallowed by linker?
On Sun, Dec 14, 2014 at 12:43:50PM +0000, hjl.tools at gmail dot com wrote: > https://sourceware.org/bugzilla/show_bug.cgi?id=17711 > > Bug ID: 17711 > Summary: copy relocations against protected symbols don't work > Product: glibc > Version: 2.21 > Status: NEW > Severity: normal > Priority: P2 > Component: dynamic-link > Assignee: unassigned at sourceware dot org > Reporter: hjl.tools at gmail dot com > > On Linux/x86-64, I got > > [hjl@gnu-tools-1 pr15228]$ cat x.c > extern int a; > > extern void bar (void); > > int main() > { > bar (); > if (a != 30) > __builtin_abort(); > return 0; > } > [hjl@gnu-tools-1 pr15228]$ cat bar.c > int a; > > __attribute__((visibility("protected"))) int a; > > void > bar () > { > a = 30; > } > [hjl@gnu-tools-1 pr15228]$ make all > gcc -B/bin/ -c -o x.o x.c > gcc -B/bin/ -fPIC -c -o bar.o bar.c > ./ld -shared -o libbar.so bar.o > gcc -B/bin/ -o x x.o libbar.so -Wl,-rpath,. > ./x > make: *** [all] Aborted (core dumped) > [hjl@gnu-tools-1 pr15228]$ > What commit does git bisect report?
(In reply to Ondrej Bilka from comment #1) > What commit does git bisect report? I don't think it ever worked.
Ld doesn't set it up properly for ld.so to handle it.
It is related to PR ld/17709. I think protected data symbol is totally broken on targets with copy relocation for both ld and ld.so. We should either disallow protected data symbol or make it to work with copy relocation. Otherwise, we can't update a DSO which has a normal data, FOO, to a DSO which has a protected data, FOO. The main problem is when building a DSO with a protected data, FOO, we don't know if FOO will be accessed via copy relocation or not.
To properly support protected data in a DSO with copy relocation, we need to keep track if a symbol has been copy relocated. We can add an array of DSOes indexed with symbol index to record the original DSOs for copy relocation. This array will be created only for DSOs with protected data on targets with copy relocation. But it still incurs run-time and memory overhead. Do we really want to do it?
This blocks the current binutils: /usr/local/bin/ld: copy reloc against protected `protvaritcpt' is invalid /usr/local/bin/ld: failed to set dynamic section sizes: Bad value collect2: error: ld returned 1 exit status make[4]: *** [/export/build/gnu/glibc/build-x86_64-linux/elf/vismain] Error 1
A patch is posted at https://sourceware.org/ml/libc-alpha/2015-02/msg00777.html
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, master has been updated via ef4ad06fe5a615af9550d74b1b6d546b9dc0a64d (commit) from 2ca725c594e0c186d928dc0823be7d8b5976112c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ef4ad06fe5a615af9550d74b1b6d546b9dc0a64d commit ef4ad06fe5a615af9550d74b1b6d546b9dc0a64d Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Feb 27 13:56:44 2015 -0800 Compile vismain with -fPIE and link with -pie Protocted symbol in shared library can only be accessed from PIE or shared library. Linker in binutils 2.26 enforces it. We must compile vismain with -fPIE and link it with -pie. [BZ #17711] * elf/Makefile (tests): Add vismain only if PIE is enabled. (tests-pie): Add vismain. (CFLAGS-vismain.c): New. * elf/vismain.c: Add comments for PIE requirement. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 8 ++++++++ NEWS | 8 ++++---- elf/Makefile | 5 ++++- elf/vismain.c | 5 +++++ 4 files changed, 21 insertions(+), 5 deletions(-)
Fixed for 2.22.
I have a patch to make it to work.
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/pr17711 has been created at d8d75473ab676234034d4be65f388db8911be2ee (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d8d75473ab676234034d4be65f388db8911be2ee commit d8d75473ab676234034d4be65f388db8911be2ee Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Check if linker support for protected data symbol Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value Avoid tests for protected data symbol if linker is broken. [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=91da680526cb0c45764dabb8062aaa4db707546f commit 91da680526cb0c45764dabb8062aaa4db707546f Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Mar 4 10:24:25 2015 -0800 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 With copy relocation, address of protected data defined in the shared library may be external. When there is a relocation against the protected data symbol within the shared library, we need to check if we should the definion in the executable copied from this protected data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x will skip the data definion in the executable from copy reloc. [BZ #17711] * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA): New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined, otherwise to 0. * sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. -----------------------------------------------------------------------
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/pr17711 has been created at 46d7b8634cb39843da59a10e2485d509ce654730 (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=46d7b8634cb39843da59a10e2485d509ce654730 commit 46d7b8634cb39843da59a10e2485d509ce654730 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Mar 6 04:55:56 2015 -0800 Replace __attribute__((visibility("protected"))) With copy relocation, address of protected data defined in the shared library may be external. Compiler shouldn't asssume protected data will be local. But due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 __attribute__((visibility("protected"))) doesn't work correctly, we need to use asm (".protected xxx") instead. * elf/ifuncdep2.c (global): Replace __attribute__((visibility("protected"))) with asm (".protected xxx"). * elf/ifuncmod1.c (global): Likewise. * elf/ifuncmod5.c (global): Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0f9f3163dc86c805f2f949d93814792d1bca8068 commit 0f9f3163dc86c805f2f949d93814792d1bca8068 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0352c3c94c5758e4b534c8f576251c9b5bf1f773 commit 0352c3c94c5758e4b534c8f576251c9b5bf1f773 Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Mar 4 10:24:25 2015 -0800 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 With copy relocation, address of protected data defined in the shared library may be external. When there is a relocation against the protected data symbol within the shared library, we need to check if we should skip the definition in the executable copied from the protected data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x will skip the data definition in the executable from copy reloc. [BZ #17711] * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA): New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined, otherwise to 0. * sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. -----------------------------------------------------------------------
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/pr17711 has been created at 83855bc9ae7fbd647dfa5ce274cf7106d10bbdf2 (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=83855bc9ae7fbd647dfa5ce274cf7106d10bbdf2 commit 83855bc9ae7fbd647dfa5ce274cf7106d10bbdf2 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Mar 6 04:55:56 2015 -0800 Replace __attribute__((visibility("protected"))) With copy relocation, address of protected data defined in the shared library may be external. Compiler shouldn't asssume protected data will be local. But due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 __attribute__((visibility("protected"))) doesn't work correctly, we need to use asm (".protected xxx") instead. * elf/ifuncdep2.c (global): Replace __attribute__((visibility("protected"))) with asm (".protected xxx"). * elf/ifuncmod1.c (global): Likewise. * elf/ifuncmod5.c (global): Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6696be8d29f80d4414bfd4b112b92dad43532516 commit 6696be8d29f80d4414bfd4b112b92dad43532516 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. * elf/tst-protected1a.c: New file. * elf/tst-protected1b.c: Likewise. * elf/tst-protected1mod.h: Likewise. * elf/tst-protected1moda.c: Likewise. * elf/tst-protected1modb.c: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0352c3c94c5758e4b534c8f576251c9b5bf1f773 commit 0352c3c94c5758e4b534c8f576251c9b5bf1f773 Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Mar 4 10:24:25 2015 -0800 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 With copy relocation, address of protected data defined in the shared library may be external. When there is a relocation against the protected data symbol within the shared library, we need to check if we should skip the definition in the executable copied from the protected data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x will skip the data definition in the executable from copy reloc. [BZ #17711] * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA): New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined, otherwise to 0. * sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. -----------------------------------------------------------------------
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/pr17711 has been created at 470cbd0616ae9fe4607680193a75f67ba5b5d1f0 (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=470cbd0616ae9fe4607680193a75f67ba5b5d1f0 commit 470cbd0616ae9fe4607680193a75f67ba5b5d1f0 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Mar 6 04:55:56 2015 -0800 Replace __attribute__((visibility("protected"))) With copy relocation, address of protected data defined in the shared library may be external. Compiler shouldn't asssume protected data will be local. But due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 __attribute__((visibility("protected"))) doesn't work correctly, we need to use asm (".protected xxx") instead. * elf/ifuncdep2.c (global): Replace __attribute__((visibility("protected"))) with asm (".protected xxx"). * elf/ifuncmod1.c (global): Likewise. * elf/ifuncmod5.c (global): Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ab16864ad041c68a3ae514fc1e9b62e69a037ea2 commit ab16864ad041c68a3ae514fc1e9b62e69a037ea2 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. * elf/tst-protected1a.c: New file. * elf/tst-protected1b.c: Likewise. * elf/tst-protected1mod.h: Likewise. * elf/tst-protected1moda.c: Likewise. * elf/tst-protected1modb.c: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c39f722201776ac88bf6ed250be5c2490cb56aad commit c39f722201776ac88bf6ed250be5c2490cb56aad Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Mar 4 10:24:25 2015 -0800 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 With copy relocation, address of protected data defined in the shared library may be external. When there is a relocation against the protected data symbol within the shared library, we need to check if we should skip the definition in the executable copied from the protected data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x will skip the data definition in the executable from copy reloc. [BZ #17711] * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA): New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined, otherwise to 0. * sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. -----------------------------------------------------------------------
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/pr17711 has been created at d7648b9bfd8b5dc1857249dc28fddde08a48629e (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d7648b9bfd8b5dc1857249dc28fddde08a48629e commit d7648b9bfd8b5dc1857249dc28fddde08a48629e Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Mar 6 04:55:56 2015 -0800 Replace __attribute__((visibility("protected"))) With copy relocation, address of protected data defined in the shared library may be external. Compiler shouldn't asssume protected data will be local. But due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 __attribute__((visibility("protected"))) doesn't work correctly, we need to use asm (".protected xxx") instead. * elf/ifuncdep2.c (global): Replace __attribute__((visibility("protected"))) with asm (".protected " __SYMBOL_PREFIX "global"). * elf/ifuncmod1.c (global): Likewise. * elf/ifuncmod5.c (global): Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8b6742da84e216b1ad4104162c76a5e89b07aa64 commit 8b6742da84e216b1ad4104162c76a5e89b07aa64 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. * elf/tst-protected1a.c: New file. * elf/tst-protected1b.c: Likewise. * elf/tst-protected1mod.h: Likewise. * elf/tst-protected1moda.c: Likewise. * elf/tst-protected1modb.c: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c39f722201776ac88bf6ed250be5c2490cb56aad commit c39f722201776ac88bf6ed250be5c2490cb56aad Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Mar 4 10:24:25 2015 -0800 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 With copy relocation, address of protected data defined in the shared library may be external. When there is a relocation against the protected data symbol within the shared library, we need to check if we should skip the definition in the executable copied from the protected data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x will skip the data definition in the executable from copy reloc. [BZ #17711] * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA): New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined, otherwise to 0. * sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. -----------------------------------------------------------------------
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/pr17711 has been created at e351d116a1900cfe75cb11737c787817b524d9c2 (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e351d116a1900cfe75cb11737c787817b524d9c2 commit e351d116a1900cfe75cb11737c787817b524d9c2 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Mar 6 04:55:56 2015 -0800 Replace __attribute__((visibility("protected"))) With copy relocation, address of protected data defined in the shared library may be external. Compiler shouldn't asssume protected data will be local. But due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 __attribute__((visibility("protected"))) doesn't work correctly, we need to use asm (".protected xxx") instead. * elf/ifuncdep2.c (global): Replace __attribute__((visibility("protected"))) with asm (".protected global"). * elf/ifuncmod1.c (global): Likewise. * elf/ifuncmod5.c (global): Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9ea148bb4763326b8dd62e8b5e076257884334ba commit 9ea148bb4763326b8dd62e8b5e076257884334ba Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. * elf/tst-protected1a.c: New file. * elf/tst-protected1b.c: Likewise. * elf/tst-protected1mod.h: Likewise. * elf/tst-protected1moda.c: Likewise. * elf/tst-protected1modb.c: Likewise. -----------------------------------------------------------------------
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/pr17711 has been created at b3f3e110aefbb41da9acc553891cdfcd6f2c50f0 (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b3f3e110aefbb41da9acc553891cdfcd6f2c50f0 commit b3f3e110aefbb41da9acc553891cdfcd6f2c50f0 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Mar 6 04:55:56 2015 -0800 Replace __attribute__((visibility("protected"))) With copy relocation, address of protected data defined in the shared library may be external. Compiler shouldn't asssume protected data will be local. But due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 __attribute__((visibility("protected"))) doesn't work correctly, we need to use asm (".protected xxx") instead. * elf/ifuncdep2.c (global): Replace __attribute__((visibility("protected"))) with asm (".protected global"). * elf/ifuncmod1.c (global): Likewise. * elf/ifuncmod5.c (global): Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=88af4693bd32e3658206b73c121de9a36c510f6b commit 88af4693bd32e3658206b73c121de9a36c510f6b Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. * elf/tst-protected1a.c: New file. * elf/tst-protected1b.c: Likewise. * elf/tst-protected1mod.h: Likewise. * elf/tst-protected1moda.c: Likewise. * elf/tst-protected1modb.c: Likewise. -----------------------------------------------------------------------
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/pr17711 has been created at 42c245172822ed1228ce4f02a14612e28c805980 (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=42c245172822ed1228ce4f02a14612e28c805980 commit 42c245172822ed1228ce4f02a14612e28c805980 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. * elf/tst-protected1a.c: New file. * elf/tst-protected1b.c: Likewise. * elf/tst-protected1mod.h: Likewise. * elf/tst-protected1moda.c: Likewise. * elf/tst-protected1modb.c: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4c4d74be73833c65ab314d088e10450d8e01663d commit 4c4d74be73833c65ab314d088e10450d8e01663d Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Mar 4 10:24:25 2015 -0800 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 With copy relocation, address of protected data defined in the shared library may be external. When there is a relocation against the protected data symbol within the shared library, we need to check if we should skip the definition in the executable copied from the protected data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x will skip the data definition in the executable from copy reloc. [BZ #17711] * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA): New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined, otherwise to 0. * sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. -----------------------------------------------------------------------
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/pr17841/master has been created at 25de905e5c9280002501af20ac4836795ae8146f (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=25de905e5c9280002501af20ac4836795ae8146f commit 25de905e5c9280002501af20ac4836795ae8146f Author: H.J. Lu <hjl.tools@gmail.com> Date: Mon Mar 2 14:53:11 2015 -0800 Compile archives with -fno-pie When compiler defaults to PIE, we compile archives with -fno-pie. Since archives won't be used with PIE, compile them with -fpie isn't necessary. [BZ #17841] * Makeconfig (no-pie-ccflag): New. Set to -fno-pie. (pic-default): Don't define if $(no-pie-ccflag) is -fno-pie. (test-object-suffix): New. * Makerules (archive-objects): New. Set before including extra-lib.mk. ($(archive-objects)): New. New rule to append $(no-pie-ccflag) to CFLAGS. * extra-lib.mk (archive-objects): New. * crypt/Makefile ($(objpfx)md5test): Replace ".o" with $(test-object-suffix). ($(objpfx)md5test-giant): Likewise. ($(objpfx)sha256test): Likewise. ($(objpfx)sha512test): Likewise. * math/Makefile (LDFLAGS-atest-exp): New. (LDFLAGS-atest-sincos): Likewise. (LDFLAGS-atest-exp2): Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=01181d5beae0edc4cb7abbc8bb94098a2bea2366 commit 01181d5beae0edc4cb7abbc8bb94098a2bea2366 Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Jan 14 06:29:04 2015 -0800 Support compilers defaulting to PIE If PIE is the default, we need to build programs as PIE. [BZ #17841] * Makeconfig (no-pie-ldflag): New. (+link): Set to $(+link-pie) if default to PIE. (+link-tests): Set to $(+link-pie-tests) if default to PIE. * config.make.in (build-pie-default): New. * configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE is default. AC_SUBST. * configure: Regenerated. * elf/Makefile (LDFLAGS-tst-dlopen-aout): New. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4ba31feb73f4f700d93e7005e50bdb4835839623 commit 4ba31feb73f4f700d93e7005e50bdb4835839623 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. * elf/tst-protected1a.c: New file. * elf/tst-protected1b.c: Likewise. * elf/tst-protected1mod.h: Likewise. * elf/tst-protected1moda.c: Likewise. * elf/tst-protected1modb.c: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6df34771a51884b8cfdc8216e9d07883979ebf84 commit 6df34771a51884b8cfdc8216e9d07883979ebf84 Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Mar 4 10:24:25 2015 -0800 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 With copy relocation, address of protected data defined in the shared library may be external. When there is a relocation against the protected data symbol within the shared library, we need to check if we should skip the definition in the executable copied from the protected data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x will skip the data definition in the executable from copy reloc. [BZ #17711] * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA): New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined, otherwise to 0. * sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. -----------------------------------------------------------------------
Created attachment 8214 [details] A testcase [hjl@gnu-tools-1 pr17711]$ make gcc -B./ -g -c -o x.o x.c gcc -B./ -g -fPIC -c -o bar.o bar.c ld -shared -o libbar.so bar.o gcc -B./ -o x x.o libbar.so -Wl,-rpath,. ./x Makefile:12: recipe for target 'all' failed make: *** [all] Aborted (core dumped) [hjl@gnu-tools-1 pr17711]$
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, master has been updated via 62da1e3b00b51383ffa7efc89d8addda0502e107 (commit) from 675ddb7184f642263331b13ac7bf726536504f97 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=62da1e3b00b51383ffa7efc89d8addda0502e107 commit 62da1e3b00b51383ffa7efc89d8addda0502e107 Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Mar 31 05:15:43 2015 -0700 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 With copy relocation, address of protected data defined in the shared library may be external. When there is a relocation against the protected data symbol within the shared library, we need to check if we should skip the definition in the executable copied from the protected data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x will skip the data definition in the executable from copy reloc. [BZ #17711] * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA): New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined, otherwise to 0. * sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 20 +++++++++++++ elf/dl-lookup.c | 61 ++++++++++++++++++++++++++++++++++++++++- sysdeps/generic/ldsodefs.h | 12 +++++++- sysdeps/i386/dl-lookupcfg.h | 4 +++ sysdeps/i386/dl-machine.h | 8 ++++- sysdeps/x86_64/dl-lookupcfg.h | 4 +++ sysdeps/x86_64/dl-machine.h | 8 ++++- 7 files changed, 111 insertions(+), 6 deletions(-)
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, master has been updated via 83569fb894050db7430047da2219ca50c68f882a (commit) from 62da1e3b00b51383ffa7efc89d8addda0502e107 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=83569fb894050db7430047da2219ca50c68f882a commit 83569fb894050db7430047da2219ca50c68f882a Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Mar 31 05:20:55 2015 -0700 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. * elf/tst-protected1a.c: New file. * elf/tst-protected1b.c: Likewise. * elf/tst-protected1mod.h: Likewise. * elf/tst-protected1moda.c: Likewise. * elf/tst-protected1modb.c: Likewise. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 19 ++++ config.make.in | 1 + configure | 40 ++++++++ configure.ac | 23 +++++ elf/Makefile | 7 ++ elf/tst-protected1a.c | 236 ++++++++++++++++++++++++++++++++++++++++++++ elf/tst-protected1b.c | 242 ++++++++++++++++++++++++++++++++++++++++++++++ elf/tst-protected1mod.h | 41 ++++++++ elf/tst-protected1moda.c | 92 +++++++++++++++++ elf/tst-protected1modb.c | 62 ++++++++++++ 10 files changed, 763 insertions(+), 0 deletions(-) create mode 100644 elf/tst-protected1a.c create mode 100644 elf/tst-protected1b.c create mode 100644 elf/tst-protected1mod.h create mode 100644 elf/tst-protected1moda.c create mode 100644 elf/tst-protected1modb.c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/pr17711/2.21 has been created at 26b173a5ba1dcb217d2a2f29f8e7c0c4efe4e1b4 (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=26b173a5ba1dcb217d2a2f29f8e7c0c4efe4e1b4 commit 26b173a5ba1dcb217d2a2f29f8e7c0c4efe4e1b4 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. * elf/tst-protected1a.c: New file. * elf/tst-protected1b.c: Likewise. * elf/tst-protected1mod.h: Likewise. * elf/tst-protected1moda.c: Likewise. * elf/tst-protected1modb.c: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9024cd9cf032a49c6e08ec54737430f913409abb commit 9024cd9cf032a49c6e08ec54737430f913409abb Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Mar 31 05:15:43 2015 -0700 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 With copy relocation, address of protected data defined in the shared library may be external. When there is a relocation against the protected data symbol within the shared library, we need to check if we should skip the definition in the executable copied from the protected data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x will skip the data definition in the executable from copy reloc. Cherry-pick from master: 62da1e3b00b51383ffa7efc89d8addda0502e107 [BZ #17711] * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA): New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined, otherwise to 0. * sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. -----------------------------------------------------------------------
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/pr17711/2.21 has been created at 15974929ebe95f25f8617860c14fbefd3a8ea689 (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=15974929ebe95f25f8617860c14fbefd3a8ea689 commit 15974929ebe95f25f8617860c14fbefd3a8ea689 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. Cherry-pick from master: 83569fb894050db7430047da2219ca50c68f882a [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. * elf/tst-protected1a.c: New file. * elf/tst-protected1b.c: Likewise. * elf/tst-protected1mod.h: Likewise. * elf/tst-protected1moda.c: Likewise. * elf/tst-protected1modb.c: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9024cd9cf032a49c6e08ec54737430f913409abb commit 9024cd9cf032a49c6e08ec54737430f913409abb Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Mar 31 05:15:43 2015 -0700 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 With copy relocation, address of protected data defined in the shared library may be external. When there is a relocation against the protected data symbol within the shared library, we need to check if we should skip the definition in the executable copied from the protected data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x will skip the data definition in the executable from copy reloc. Cherry-pick from master: 62da1e3b00b51383ffa7efc89d8addda0502e107 [BZ #17711] * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA): New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined, otherwise to 0. * sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. -----------------------------------------------------------------------
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/pr17711/2.20 has been created at 556b3041f288ede13912ff72bdee59139af7257c (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=556b3041f288ede13912ff72bdee59139af7257c commit 556b3041f288ede13912ff72bdee59139af7257c Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. Cherry-pick from master: 83569fb894050db7430047da2219ca50c68f882a [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. * elf/tst-protected1a.c: New file. * elf/tst-protected1b.c: Likewise. * elf/tst-protected1mod.h: Likewise. * elf/tst-protected1moda.c: Likewise. * elf/tst-protected1modb.c: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d817d6f3d6f3bde4b7e2d85a8d6dccd418d701c7 commit d817d6f3d6f3bde4b7e2d85a8d6dccd418d701c7 Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Mar 31 05:15:43 2015 -0700 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 With copy relocation, address of protected data defined in the shared library may be external. When there is a relocation against the protected data symbol within the shared library, we need to check if we should skip the definition in the executable copied from the protected data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x will skip the data definition in the executable from copy reloc. Cherry-pick from master: 62da1e3b00b51383ffa7efc89d8addda0502e107 [BZ #17711] * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA): New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined, otherwise to 0. * sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. -----------------------------------------------------------------------
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/pr17711/2.19 has been created at b5344eca1895da9192fb4b9c2c470a40e41dda03 (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b5344eca1895da9192fb4b9c2c470a40e41dda03 commit b5344eca1895da9192fb4b9c2c470a40e41dda03 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. Cherry-pick from master: 83569fb894050db7430047da2219ca50c68f882a [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. * elf/tst-protected1a.c: New file. * elf/tst-protected1b.c: Likewise. * elf/tst-protected1mod.h: Likewise. * elf/tst-protected1moda.c: Likewise. * elf/tst-protected1modb.c: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c5cd4843e79d71c2776eac3602ced23ab4e4b8d0 commit c5cd4843e79d71c2776eac3602ced23ab4e4b8d0 Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Mar 31 05:15:43 2015 -0700 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 With copy relocation, address of protected data defined in the shared library may be external. When there is a relocation against the protected data symbol within the shared library, we need to check if we should skip the definition in the executable copied from the protected data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x will skip the data definition in the executable from copy reloc. Cherry-pick from master: 62da1e3b00b51383ffa7efc89d8addda0502e107 [BZ #17711] * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA): New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined, otherwise to 0. * sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. -----------------------------------------------------------------------
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/pr17711/2.18 has been created at 3350e1867c0b82957093fa9e1c52a5f841881377 (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3350e1867c0b82957093fa9e1c52a5f841881377 commit 3350e1867c0b82957093fa9e1c52a5f841881377 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Mar 6 04:55:56 2015 -0800 Replace __attribute__((visibility("protected"))) With copy relocation, address of protected data defined in the shared library may be external. Compiler shouldn't asssume protected data will be local. But due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 __attribute__((visibility("protected"))) doesn't work correctly, we need to use asm (".protected xxx") instead. Cherry-pick from master: e0ed2fb40a0e29c43cf60addc74741dab15f2e05 * elf/ifuncdep2.c (global): Replace __attribute__((visibility("protected"))) with asm (".protected global"). * elf/ifuncmod1.c (global): Likewise. * elf/ifuncmod5.c (global): Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a0f66d616575074b0f569da3f561fa0fe09fa312 commit a0f66d616575074b0f569da3f561fa0fe09fa312 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. Cherry-pick from master: 83569fb894050db7430047da2219ca50c68f882a [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. * elf/tst-protected1a.c: New file. * elf/tst-protected1b.c: Likewise. * elf/tst-protected1mod.h: Likewise. * elf/tst-protected1moda.c: Likewise. * elf/tst-protected1modb.c: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=79bb575bc9160f0be7c6770de56e9240fada34c0 commit 79bb575bc9160f0be7c6770de56e9240fada34c0 Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Mar 31 05:15:43 2015 -0700 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 With copy relocation, address of protected data defined in the shared library may be external. When there is a relocation against the protected data symbol within the shared library, we need to check if we should skip the definition in the executable copied from the protected data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x will skip the data definition in the executable from copy reloc. Cherry-pick from master: 62da1e3b00b51383ffa7efc89d8addda0502e107 [BZ #17711] * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA): New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined, otherwise to 0. * sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. -----------------------------------------------------------------------
Fixed
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, master has been updated via 3bcea719ddd6ce399d7bccb492c40af77d216e42 (commit) via 0910702c4d2cf9e8302b35c9519548726e1ac489 (commit) from a81a00ff94a43af85f7aefceb6d31f3c0f11151d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3bcea719ddd6ce399d7bccb492c40af77d216e42 commit 3bcea719ddd6ce399d7bccb492c40af77d216e42 Author: Szabolcs Nagy <nsz@port70.net> Date: Fri Jul 24 10:05:07 2015 +0100 [ARM][BZ #17711] Fix extern protected data handling Fixes elf/tst-protected1a and elf/tst-protected1b tests. Depends on a gcc patch that makes protected visibility data non-local: https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01871.html and on a binutils patch so R_*_GLOB_DAT relocs are used for it: https://sourceware.org/ml/binutils/2015-07/msg00247.html https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0910702c4d2cf9e8302b35c9519548726e1ac489 commit 0910702c4d2cf9e8302b35c9519548726e1ac489 Author: Szabolcs Nagy <nsz@port70.net> Date: Fri Jul 24 09:57:32 2015 +0100 [AArch64][BZ #17711] Fix extern protected data handling Fixes elf/tst-protected1a and elf/tst-protected1b tests. Depends on a gcc patch that makes protected visibility data non-local: https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01871.html and on a binutils patch so R_*_GLOB_DAT relocs are used for it: https://sourceware.org/ml/binutils/2015-07/msg00246.html ----------------------------------------------------------------------- Summary of changes: ChangeLog | 10 ++++++++++ sysdeps/aarch64/dl-machine.h | 3 ++- sysdeps/aarch64/dl-sysdep.h | 2 ++ sysdeps/arm/dl-machine.h | 10 +++++++--- sysdeps/arm/dl-sysdep.h | 2 ++ 5 files changed, 23 insertions(+), 4 deletions(-)
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, hjl/plt/2.21 has been created at 555186f0c71fee41e33ad72cb38be974221b2e3c (commit) - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=555186f0c71fee41e33ad72cb38be974221b2e3c commit 555186f0c71fee41e33ad72cb38be974221b2e3c Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Jul 29 04:49:38 2015 -0700 Use SSE optimized strcmp in x86-64 ld.so Since ld.so preserves vector registers now, we can SSE optimized strcmp in x86-64 ld.so. * sysdeps/x86_64/strcmp.S: Remove "#if !IS_IN (libc)". https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=40258193697061c87e5cfe285cd04adcf1ae655f commit 40258193697061c87e5cfe285cd04adcf1ae655f Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Jul 29 03:56:14 2015 -0700 Remove x86-64 rtld-xxx.c and rtld-xxx.S Since ld.so preserves vector registers now, we can use the regular, non-ifunc string and memory functions in ld.so. * sysdeps/x86_64/rtld-memcmp.c: Removed. * sysdeps/x86_64/rtld-memset.S: Likewise. * sysdeps/x86_64/rtld-strchr.S: Likewise. * sysdeps/x86_64/rtld-strlen.S: Likewise. * sysdeps/x86_64/multiarch/rtld-memcmp.c: Likewise. * sysdeps/x86_64/multiarch/rtld-memset.S: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a687fe847371d763d6fef546bd8efe82a8f88d40 commit a687fe847371d763d6fef546bd8efe82a8f88d40 Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Jul 29 03:47:54 2015 -0700 Replace %xmm8 with %xmm0 Since ld.so preserves vector registers now, we can use %xmm0 to avoid the REX prefix. * sysdeps/x86_64/memset.S: Replace %xmm8 with %xmm0. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5ad67d1f4b30eada1bf262566213dcca2e3893f7 commit 5ad67d1f4b30eada1bf262566213dcca2e3893f7 Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Jul 29 03:44:39 2015 -0700 Replace %xmm[8-12] with %xmm[0-4] Since ld.so preserves vector registers now, we can use %xmm[0-4] to avoid the REX prefix. * sysdeps/x86_64/strlen.S: Replace %xmm[8-12] with %xmm[0-4]. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=fb086134f5eba610a4020e655dce46b75302d81c commit fb086134f5eba610a4020e655dce46b75302d81c Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Jul 28 18:56:18 2015 -0700 Don't disable SSE in x86-64 ld.so Since ld.so preserves vector registers now, we can use SSE in ld.so. * sysdeps/i386/Makefile [$(subdir) == elf] (CFLAGS-.os): Add -mno-sse -mno-mmx for $(all-rtld-routines). [$(subdir) == elf] (tests-special): Add $(objpfx)tst-ld-sse-use.out. [$(subdir) == elf] ($(objpfx)tst-ld-sse-use.out): New rule. * sysdeps/x86/Makefile [$(subdir) == elf] (CFLAGS-.os): Removed. [$(subdir) == elf] (tests-special): Likewise. [$(subdir) == elf] ($(objpfx)tst-ld-sse-use.out): Likewise. * sysdeps/x86_64/Makefile [$(subdir) == elf] (CFLAGS-.os): Add -mno-mmx for $(all-rtld-routines). https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c229191cffc809ede2574232fd1bef4f03e2c62f commit c229191cffc809ede2574232fd1bef4f03e2c62f Author: H.J. Lu <hjl.tools@gmail.com> Date: Sat Jul 11 13:25:25 2015 -0700 Save and restore vector registers in x86-64 ld.so This patch initiaizes GLRO(dl_x86_xstate) in dl_platform_init to indicate if the processor supports SSE, AVX or AVX512. It uses this information to properly save and restore vector registers in ld.so. Now we can use SSE in ld.so and delete FOREIGN_CALL macros. We can also retire the rtld_must_xmm_save field and remove the rtld_savespace_sse field in tcbhead_t. It is safe since they are internal to glibc. [BZ #15128] * sysdeps/x86_64/Makefile [$(subdir) == elf] (tests): Add ifuncmain8. (modules-names): Add ifuncmod8. ($(objpfx)ifuncmain8): New rule. * sysdeps/x86_64/dl-machine.h: Include <dl-procinfo.h> and <cpuid.h>. (elf_machine_runtime_setup): Use _dl_runtime_resolve_sse, _dl_runtime_resolve_avx, or _dl_runtime_resolve_avx512, _dl_runtime_profile_sse, _dl_runtime_profile_avx, or _dl_runtime_profile_avx512, based on HAS_ARCH_FEATURE. * sysdeps/x86_64/dl-trampoline.S: Rewrite. * sysdeps/x86_64/dl-trampoline.h: Likewise. * sysdeps/x86_64/ifuncmain8.c: New file. * sysdeps/x86_64/ifuncmod8.c: Likewise. * sysdeps/x86_64/nptl/tcb-offsets.sym (RTLD_SAVESPACE_SSE): Removed. * sysdeps/x86_64/nptl/tls.h (__128bits): Removed. (tcbhead_t): CHange rtld_must_xmm_save to __glibc_unused1. Remove rtld_savespace_sse and __padding. (RTLD_CHECK_FOREIGN_CALL): Removed. (RTLD_ENABLE_FOREIGN_CALL): Likewise. (RTLD_PREPARE_FOREIGN_CALL): Likewise. (RTLD_FINALIZE_FOREIGN_CALL): Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bac692ed46c2ff69ac859358b771fd1db6951800 commit bac692ed46c2ff69ac859358b771fd1db6951800 Author: H.J. Lu <hjl.tools@gmail.com> Date: Sun Jul 12 14:41:20 2015 -0700 Align stack when calling __errno_location We should align stack to 16 bytes when calling __errno_location. [BZ #18661] * sysdeps/x86_64/fpu/s_cosf.S (__cosf): Align stack to 16 bytes when calling __errno_location. * sysdeps/x86_64/fpu/s_sincosf.S (__sincosf): Likewise. * sysdeps/x86_64/fpu/s_sinf.S (__sinf): Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b9645f91a56d5892a18cb521e195f924292e1367 commit b9645f91a56d5892a18cb521e195f924292e1367 Author: H.J. Lu <hjl.tools@gmail.com> Date: Sun Jul 12 14:40:25 2015 -0700 Align stack to 16 bytes when calling __gettimeofday Subtract stack by 24 bytes instead of 16 bytes so that stack is aligned to 16 bytes when calling __gettimeofday. [BZ #18661] * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedwait_tid): Align stack to 16 bytes when calling __gettimeofday. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=46eaabd373ca3f77a46089dc1b79b7ca3f9a4fcd commit 46eaabd373ca3f77a46089dc1b79b7ca3f9a4fcd Author: H.J. Lu <hjl.tools@gmail.com> Date: Sun Jul 12 14:38:58 2015 -0700 Align stack to 16 bytes when calling __setcontext Don't use pop to restore %rdi so that stack is aligned to 16 bytes when calling __setcontext. [BZ #18661] * sysdeps/unix/sysv/linux/x86_64/__start_context.S (__start_context): Don't use pop to restore %rdi so that stack is aligned to 16 bytes when calling __setcontext. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a00a8b1dd3507d69077fbacd2cb2503f0ba2e462 commit a00a8b1dd3507d69077fbacd2cb2503f0ba2e462 Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Jul 29 03:41:58 2015 -0700 Compile {memcpy,strcmp}-sse2-unaligned.S only for libc {memcpy,strcmp}-sse2-unaligned.S aren't needed in ld.so. * sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S: Compile only for libc. * sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8b34a808a30703b60ab9416979a32fa83c4e86e2 commit 8b34a808a30703b60ab9416979a32fa83c4e86e2 Author: H.J. Lu <hjl.tools@gmail.com> Date: Sat Aug 1 07:47:16 2015 -0700 Update x86 elision-conf.c for <cpu-features.h> This patch updates x86 elision-conf.c to use the newly defined HAS_CPU_FEATURE from <cpu-features.h>. * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init): Replace HAS_RTM with HAS_CPU_FEATURE (RTM). https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2764863736e437eeba3235a13c58202e269dedbb commit 2764863736e437eeba3235a13c58202e269dedbb Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Jul 31 16:52:19 2015 -0700 Update i686 multiarch functions for <cpu-features.h> This patch updates i686 multiarch functions to use the newly defined HAS_CPU_FEATURE, HAS_ARCH_FEATURE, LOAD_GOT_AND_RTLD_GLOBAL_RO and LOAD_FUNC_GOT_EAX from <cpu-features.h>. * sysdeps/i386/i686/fpu/multiarch/e_expf.c: Replace HAS_XXX with HAS_CPU_FEATURE/HAS_ARCH_FEATURE (XXX). * sysdeps/i386/i686/fpu/multiarch/s_cosf.c: Likewise. * sysdeps/i386/i686/fpu/multiarch/s_cosf.c: Likewise. * sysdeps/i386/i686/fpu/multiarch/s_sincosf.c: Likewise. * sysdeps/i386/i686/fpu/multiarch/s_sinf.c: Likewise. * sysdeps/i386/i686/multiarch/ifunc-impl-list.c: Likewise. * sysdeps/i386/i686/multiarch/s_fma.c: Likewise. * sysdeps/i386/i686/multiarch/s_fmaf.c: Likewise. * sysdeps/i386/i686/multiarch/bcopy.S: Remove __init_cpu_features call. Merge SHARED and !SHARED. Add LOAD_GOT_AND_RTLD_GLOBAL_RO. Use LOAD_FUNC_GOT_EAX to load function address. Replace HAS_XXX with HAS_CPU_FEATURE/HAS_ARCH_FEATURE (XXX). * sysdeps/i386/i686/multiarch/bzero.S: Likewise. * sysdeps/i386/i686/multiarch/memchr.S: Likewise. * sysdeps/i386/i686/multiarch/memcmp.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy_chk.S: Likewise. * sysdeps/i386/i686/multiarch/memmove.S: Likewise. * sysdeps/i386/i686/multiarch/memmove_chk.S: Likewise. * sysdeps/i386/i686/multiarch/mempcpy.S: Likewise. * sysdeps/i386/i686/multiarch/mempcpy_chk.S: Likewise. * sysdeps/i386/i686/multiarch/memrchr.S: Likewise. * sysdeps/i386/i686/multiarch/memset.S: Likewise. * sysdeps/i386/i686/multiarch/memset_chk.S: Likewise. * sysdeps/i386/i686/multiarch/rawmemchr.S: Likewise. * sysdeps/i386/i686/multiarch/strcasecmp.S: Likewise. * sysdeps/i386/i686/multiarch/strcat.S: Likewise. * sysdeps/i386/i686/multiarch/strchr.S: Likewise. * sysdeps/i386/i686/multiarch/strcmp.S: Likewise. * sysdeps/i386/i686/multiarch/strcpy.S: Likewise. * sysdeps/i386/i686/multiarch/strcspn.S: Likewise. * sysdeps/i386/i686/multiarch/strlen.S: Likewise. * sysdeps/i386/i686/multiarch/strncase.S: Likewise. * sysdeps/i386/i686/multiarch/strnlen.S: Likewise. * sysdeps/i386/i686/multiarch/strrchr.S: Likewise. * sysdeps/i386/i686/multiarch/strspn.S: Likewise. * sysdeps/i386/i686/multiarch/wcschr.S: Likewise. * sysdeps/i386/i686/multiarch/wcscmp.S: Likewise. * sysdeps/i386/i686/multiarch/wcscpy.S: Likewise. * sysdeps/i386/i686/multiarch/wcslen.S: Likewise. * sysdeps/i386/i686/multiarch/wcsrchr.S: Likewise. * sysdeps/i386/i686/multiarch/wmemcmp.S: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b846eb01242c35fa60a30cf7950f0a28d3ac3f62 commit b846eb01242c35fa60a30cf7950f0a28d3ac3f62 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Jul 31 13:41:04 2015 -0700 Update x86_64 multiarch functions for <cpu-features.h> This patch updates x86_64 multiarch functions to use the newly defined HAS_CPU_FEATURE, HAS_ARCH_FEATURE and LOAD_RTLD_GLOBAL_RO_RDX from <cpu-features.h>. * sysdeps/x86_64/fpu/multiarch/e_asin.c: Replace HAS_XXX with HAS_CPU_FEATURE/HAS_ARCH_FEATURE (XXX). * sysdeps/x86_64/fpu/multiarch/e_atan2.c: Likewise. * sysdeps/x86_64/fpu/multiarch/e_exp.c: Likewise. * sysdeps/x86_64/fpu/multiarch/e_log.c: Likewise. * sysdeps/x86_64/fpu/multiarch/e_pow.c: Likewise. * sysdeps/x86_64/fpu/multiarch/s_atan.c: Likewise. * sysdeps/x86_64/fpu/multiarch/s_fma.c: Likewise. * sysdeps/x86_64/fpu/multiarch/s_fmaf.c: Likewise. * sysdeps/x86_64/fpu/multiarch/s_sin.c: Likewise. * sysdeps/x86_64/fpu/multiarch/s_tan.c: Likewise. * sysdeps/x86_64/multiarch/ifunc-impl-list.c: Likewise. * sysdeps/x86_64/multiarch/sched_cpucount.c: Likewise. * sysdeps/x86_64/multiarch/strstr.c: Likewise. * sysdeps/x86_64/multiarch/memmove.c: Likewise. * sysdeps/x86_64/multiarch/memmove_chk.c: Likewise. * sysdeps/x86_64/multiarch/test-multiarch.c: Likewise. * sysdeps/x86_64/multiarch/memcmp.S: Remove __init_cpu_features call. Add LOAD_RTLD_GLOBAL_RO_RDX. Replace HAS_XXX with HAS_CPU_FEATURE/HAS_ARCH_FEATURE (XXX). * sysdeps/x86_64/multiarch/memcpy.S: Likewise. * sysdeps/x86_64/multiarch/memcpy_chk.S: Likewise. * sysdeps/x86_64/multiarch/mempcpy.S: Likewise. * sysdeps/x86_64/multiarch/mempcpy_chk.S: Likewise. * sysdeps/x86_64/multiarch/memset.S: Likewise. * sysdeps/x86_64/multiarch/memset_chk.S: Likewise. * sysdeps/x86_64/multiarch/strcat.S: Likewise. * sysdeps/x86_64/multiarch/strchr.S: Likewise. * sysdeps/x86_64/multiarch/strcmp.S: Likewise. * sysdeps/x86_64/multiarch/strcpy.S: Likewise. * sysdeps/x86_64/multiarch/strcspn.S: Likewise. * sysdeps/x86_64/multiarch/strspn.S: Likewise. * sysdeps/x86_64/multiarch/wcscpy.S: Likewise. * sysdeps/x86_64/multiarch/wmemcmp.S: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d55078bafe0a30062c6dd2d95811c9949e0fbd3b commit d55078bafe0a30062c6dd2d95811c9949e0fbd3b Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Jul 31 07:30:04 2015 -0700 Add _dl_x86_cpu_features to rtld_global in ld.so This patch adds _dl_x86_cpu_features to rtld_global in x86 ld.so and initializes it early before __libc_start_main is called so that cpu_features is always available when it is used and we can avoid calling __init_cpu_features in IFUNC selectors. * sysdeps/i386/dl-machine.h: Include <cpu-features.c>. (dl_platform_init): Call init_cpu_features. * sysdeps/i386/dl-procinfo.c (_dl_x86_cpu_features): New. * sysdeps/i386/i686/cacheinfo.c (DISABLE_PREFERRED_MEMORY_INSTRUCTION): Removed. * sysdeps/i386/i686/multiarch/ifunc-defines.sym (KIND_OFFSET): Removed. * sysdeps/i386/ldsodefs.h: Include <cpu-features.h>. * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c: Include <sysdeps/x86_64/dl-procinfo.c> instead of sysdeps/generic/dl-procinfo.c>. * sysdeps/x86/Makefile [$(subdir) == csu] (gen-as-const-headers): Add cpu-features-offsets.sym and rtld-global-offsets.sym. * sysdeps/x86/cpu-features-offsets.sym: New file. * sysdeps/x86/cpu-features.c: Likewise. * sysdeps/x86/cpu-features.h: Likewise. * sysdeps/x86/libc-start.c: Likewise. * sysdeps/x86/rtld-global-offsets.sym: Likewise. * sysdeps/x86_64/dl-procinfo.c: Likewise. * sysdeps/x86_64/cacheinfo.c (__cpuid_count): Removed. Assume USE_MULTIARCH is defined and don't check it. (is_intel): Replace __cpu_features with GLRO(dl_x86_cpu_features). (is_amd): Likewise. (max_cpuid): Likewise. (intel_check_word): Likewise. (__cache_sysconf): Don't call __init_cpu_features. (__x86_preferred_memory_instruction): Removed. (init_cacheinfo): Don't call __init_cpu_features. Replace __cpu_features with GLRO(dl_x86_cpu_features). * sysdeps/x86_64/dl-machine.h: <cpu-features.c>. (dl_platform_init): Call init_cpu_features. * sysdeps/x86_64/ldsodefs.h: Include <cpu-features.h>. * sysdeps/x86_64/multiarch/cacheinfo.c: Removed. * sysdeps/x86_64/multiarch/ifunc-defines.sym (KIND_OFFSET): Removed. * sysdeps/x86_64/multiarch/init-arch.c: Rewrite. * sysdeps/x86_64/multiarch/init-arch.h: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2702b161faaf048300de5c67dad5d1ca2078db60 commit 2702b161faaf048300de5c67dad5d1ca2078db60 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Mar 6 04:55:56 2015 -0800 Replace __attribute__((visibility("protected"))) With copy relocation, address of protected data defined in the shared library may be external. Compiler shouldn't asssume protected data will be local. But due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 __attribute__((visibility("protected"))) doesn't work correctly, we need to use asm (".protected xxx") instead. Cherry-pick from master: e0ed2fb40a0e29c43cf60addc74741dab15f2e05 * elf/ifuncdep2.c (global): Replace __attribute__((visibility("protected"))) with asm (".protected global"). * elf/ifuncmod1.c (global): Likewise. * elf/ifuncmod5.c (global): Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d8700f7fa9a60def973ccdfad24266d91d9ce667 commit d8700f7fa9a60def973ccdfad24266d91d9ce667 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Mar 5 11:36:35 2015 -0800 Add a testcase for copy reloc against protected data Linkers in some versions of binutils 2.25 and 2.26 don't support protected data symbol with error messsage like: /usr/bin/ld: copy reloc against protected `bar' is invalid /usr/bin/ld: failed to set dynamic section sizes: Bad value We check if linker supports copy reloc against protected data symbol to avoid running the test if linker is broken. Cherry-pick from master: 83569fb894050db7430047da2219ca50c68f882a [BZ #17711] * config.make.in (have-protected-data): New. * configure.ac: Check linker support for protected data symbol. * configure: Regenerated. * elf/Makefile (modules-names): Add tst-protected1moda and tst-protected1modb if $(have-protected-data) is yes. (tests): Add tst-protected1a and tst-protected1b if $(have-protected-data) is yes. ($(objpfx)tst-protected1a): New. ($(objpfx)tst-protected1b): Likewise. (tst-protected1modb.so-no-z-defs): Likewise. * elf/tst-protected1a.c: New file. * elf/tst-protected1b.c: Likewise. * elf/tst-protected1mod.h: Likewise. * elf/tst-protected1moda.c: Likewise. * elf/tst-protected1modb.c: Likewise. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=eaf2df74329942e92928162faa72159f33f040a7 commit eaf2df74329942e92928162faa72159f33f040a7 Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Mar 31 05:15:43 2015 -0700 Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 With copy relocation, address of protected data defined in the shared library may be external. When there is a relocation against the protected data symbol within the shared library, we need to check if we should skip the definition in the executable copied from the protected data. This patch adds ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA and defines it for x86. If ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA isn't 0, do_lookup_x will skip the data definition in the executable from copy reloc. Cherry-pick from master: 62da1e3b00b51383ffa7efc89d8addda0502e107 [BZ #17711] * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/generic/ldsodefs.h * (ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA): New. Defined to 4 if DL_EXTERN_PROTECTED_DATA is defined, otherwise to 0. * sysdeps/i386/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-lookupcfg.h (DL_EXTERN_PROTECTED_DATA): New. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. -----------------------------------------------------------------------
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The annotated tag, glibc-2.22 has been created at be75ddf5e4dfab2aa4ceb2428cc146e7ea26a346 (tag) tagging 78bd7499af46d739ce94410eaeea006e874ca9e5 (commit) replaces glibc-2.21 tagged by Carlos O'Donell on Wed Aug 5 02:45:12 2015 -0400 - Log ----------------------------------------------------------------- The GNU C Library ================= The GNU C Library version 2.22 is now available. The GNU C Library is used as *the* C library in the GNU system and in GNU/Linux systems, as well as many other systems that use Linux as the kernel. The GNU C Library is primarily designed to be a portable and high performance C library. It follows all relevant standards including ISO C11 and POSIX.1-2008. It is also internationalized and has one of the most complete internationalization interfaces known. The GNU C Library webpage is at http://www.gnu.org/software/libc/ Packages for the 2.22 release may be downloaded from: http://ftpmirror.gnu.org/libc/ http://ftp.gnu.org/gnu/libc/ The mirror list is at http://www.gnu.org/order/ftp.html NEWS for version 2.22 ===================== * The following bugs are resolved with this release: 438, 4719, 6544, 6792, 11216, 12836, 13028, 13064, 13151, 13152, 14094, 14292, 14841, 14906, 14958, 15319, 15467, 15790, 15969, 16159, 16339, 16350, 16351, 16352, 16353, 16361, 16512, 16526, 16538, 16559, 16560, 16704, 16783, 16850, 17053, 17090, 17195, 17269, 17293, 17322, 17403, 17475, 17523, 17542, 17569, 17581, 17588, 17596, 17620, 17621, 17628, 17631, 17692, 17711, 17715, 17776, 17779, 17792, 17833, 17836, 17841, 17912, 17916, 17930, 17932, 17944, 17949, 17964, 17965, 17967, 17969, 17977, 17978, 17987, 17991, 17996, 17998, 17999, 18007, 18019, 18020, 18029, 18030, 18032, 18034, 18036, 18038, 18039, 18042, 18043, 18046, 18047, 18049, 18068, 18080, 18093, 18100, 18104, 18110, 18111, 18116, 18125, 18128, 18134, 18138, 18185, 18196, 18197, 18206, 18210, 18211, 18217, 18219, 18220, 18221, 18234, 18244, 18245, 18247, 18287, 18319, 18324, 18333, 18346, 18371, 18383, 18397, 18400, 18409, 18410, 18412, 18418, 18422, 18434, 18444, 18457, 18468, 18469, 18470, 18479, 18483, 18495, 18496, 18497, 18498, 18502, 18507, 18508, 18512, 18513, 18519, 18520, 18522, 18527, 18528, 18529, 18530, 18532, 18533, 18534, 18536, 18539, 18540, 18542, 18544, 18545, 18546, 18547, 18549, 18553, 18557, 18558, 18569, 18583, 18585, 18586, 18592, 18593, 18594, 18602, 18612, 18613, 18619, 18633, 18641, 18643, 18648, 18657, 18676, 18694, 18696. * Cache information can be queried via sysconf() function on s390 e.g. with _SC_LEVEL1_ICACHE_SIZE as argument. * A buffer overflow in gethostbyname_r and related functions performing DNS requests has been fixed. If the NSS functions were called with a misaligned buffer, the buffer length change due to pointer alignment was not taken into account. This could result in application crashes or, potentially arbitrary code execution, using crafted, but syntactically valid DNS responses. (CVE-2015-1781) * The time zone file parser has been made more robust against crafted time zone files, avoiding heap buffer overflows related to the processing of the tzh_ttisstdcnt and tzh_ttisgmtcnt fields, and a stack overflow due to large time zone data files. Overly long time zone specifiers in the TZ variable no longer result in stack overflows and crashes. * A powerpc and powerpc64 optimization for TLS, similar to TLS descriptors for LD and GD on x86 and x86-64, has been implemented. You will need binutils-2.24 or later to enable this optimization. * Character encoding and ctype tables were updated to Unicode 7.0.0, using new generator scripts contributed by Pravin Satpute and Mike FABIAN (Red Hat). These updates cause user visible changes, such as the fix for bug 17998. * CVE-2014-8121 The NSS backends shared internal state between the getXXent and getXXbyYY NSS calls for the same database, causing a denial-of-service condition in some applications. * Added vector math library named libmvec with the following vectorized x86_64 implementations: cos, cosf, sin, sinf, sincos, sincosf, log, logf, exp, expf, pow, powf. The library can be disabled with --disable-mathvec. Use of the functions is enabled with -fopenmp -ffast-math starting from -O1 for GCC version >= 4.9.0. Shared library libmvec.so is linked in as needed when using -lm (no need to specify -lmvec explicitly for not static builds). Visit <https://sourceware.org/glibc/wiki/libmvec> for detailed information. * A new fmemopen implementation has been added with the goal of POSIX compliance. The new implementation fixes the following long-standing issues: BZ#6544, BZ#11216, BZ#12836, BZ#13151, BZ#13152, and BZ#14292. The old implementation is still present for use be by existing binaries. * The 32-bit sparc sigaction ABI was inadvertently broken in the 2.20 and 2.21 releases. It has been fixed to match 2.19 and older, but binaries built against 2.20 and 2.21 might need to be recompiled. See BZ#18694. * Port to Native Client running on ARMv7-A (--host=arm-nacl). Contributed by Roland McGrath (Google). Contributors ============ This release was made possible by the contributions of many people. The maintainers are grateful to everyone who has contributed changes or bug reports. These include: Adhemerval Zanella Alan Modra Alexandre Oliva Andreas Schwab Andrew Senkevich Andriy Rysin Arjun Shankar Aurelien Jarno Benno Schulenberg Brad Hubbard Carlos O'Donell Chris Metcalf Christian Schmidt Chung-Lin Tang Cong Wang Cyril Hrubis Daniel Marjamäki David S. Miller Dmitry V. Levin Eric Rannaud Evangelos Foutras Feng Gao Florian Weimer Gleb Fotengauer-Malinovskiy H.J. Lu Igor Zamyatin J William Piggott James Cowgill James Lemke John David Anglin Joseph Myers Kevin Easton Khem Raj Leonhard Holz Mark Wielaard Marko Myllynen Martin Galvan Martin Sebor Matthew Fortune Mel Gorman Mike Frysinger Miroslav Lichvar Nathan Lynch Ondřej Bílka Paul Eggert Paul Pluzhnikov Pavel Kopyl Pravin Satpute Rajalakshmi Srinivasaraghavan Rical Jasan Richard Henderson Roland McGrath Rüdiger Sonderfeld Samuel Thibault Siddhesh Poyarekar Stefan Liebler Steve Ellcey Szabolcs Nagy Torvald Riegel Tulio Magno Quites Machado Filho Vincent Bernat Wilco Dijkstra Yaakov Selkowitz Zack Weinberg -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJVwbEHAAoJECXvCkNsKkr//nwH/RbC+AmWbbrY7POeygVVxZVv 6ww/s4WOx3MJc0VNhQucelDCmRVRfKdoqtiex2bcysOiK2mv6K4efgYV7dkilT5O NhpjENGE2qCvRIeplmDdGDBTLwhxwcQoQXrFYtcayEXpeCHoJjSzY9PyeNWGvmLM eEah8kVPh6FsNf/YD28MXtChCpfoZf5IrVhXvn7+f2zPjUEy1PuHmo2kU9LzoCRu q3xtd8ICpVkAvFCoUnN7YEOITj3g9Qd+zGebfj8LpVL5zoQs9n2egSv+jIdNGQVI XuQ+oVXuMd9ho1p6LayZpTsY19jALxgk8ysnTzBofi+1Zkc8FTEB0fFdplDIwMg= =9uQ7 -----END PGP SIGNATURE----- Adhemerval Zanella (36): powerpc: multiarch Makefile cleanup for powerpc64 powerpc: Simplify bcopy default implementation powerpc: Remove POWER7 wordcopy ifunc powerpc: wordcopy/memmove cleanup for ppc64 powerpc: multiarch Makefile cleanup for powerpc32 powerpc: wordcopy/memmove cleanup for ppc32 powerpc: sysdeps/powerpc configure cleanup powerpc: drop R_PPC_REL16 check powerpc: Fix TABORT encoding for little endian powerpc: Fix memmove static build powerpc: Fix inline feraiseexcept, feclearexcept macros Update powerpc-fpu ULPs. powerpc: Fix incorrect results for pow when using FMA powerpc: Remove HAVE_ASM_GLOBAL_DOT_NAME define powerpc: Fix __wcschr static build libc-vdso.h place consolidation Fix non-portable echo usage in sysdeps/unix/make-syscalls.sh Add BZ #16704 as fixed Fix stdlib/tst-setcontext3 with dash [BZ#18418] i386: Remove six-argument specialized implementations Remove socket.S implementation Consolidate vDSO macros and usage Consolidate gettimeofday across aarch64/s390/tile Update powerpc-fpu libm-test-ulps. Fix ChangeLog entry x86: clock_gettime and timespec_get vDSO cleanup Use inline syscalls for non-cancellable versions nptl: Rewrite cancellation macros Consolidate sched_getcpu x86: Remove vsyscall usage libio: fmemopen rewrite to POSIX compliance libio: Update tst-fmemopen2.c libio: Update powerpc64le libc.abilist Avoid C++ tests when the C++ cannot be linked libio: Fix fmemopen 'w' mode with provided buffer Update powerpc-fpu libm-test-ulps. Alan Modra (5): Fix localplt test breakage with new readelf Remove HAVE_ASM_PPC_REL16 references powerpc64 configure message powerpc __tls_get_addr call optimization Harden powerpc64 elf_machine_fixup_plt Alexandre Oliva (6): Unicode 7.0.0 update; added generator scripts. Amendments to Unicode 7 update. BZ #15969: search locale archive again after alias expansion Fix constness error just introduced in findlocale. Avoid unsafe loc_name type casts with additional variable Fix DTV race, assert, DTV_SURPLUS Static TLS limit, and nptl_db garbage Andreas Schwab (16): Fix value of O_TMPFILE for architectures with non-default O_DIRECTORY (bug 17912) Filter out PTHREAD_MUTEX_NO_ELISION_NP bit in pthread_mutexattr_gettype (BZ #15790) Fix failure of elf/tst-audit2 when compiled with GCC-5 Fix read past end of pattern in fnmatch (bug 18032) Fix parallel build error Don't define __CORRECT_ISO_CPP_STRING_H_PROTO for non-GCC compilers (bug 17631) m68k: fix 64-bit arithmetic in atomic operations (bug 18128) aarch64: Increase MINSIGSTKSZ and SIGSTKSZ (bug 16850) Separate internal state between getXXent and getXXbyYY NSS calls (bug 18007) Simplify handling of nameserver configuration in resolver Record TTL also for DNS PTR queries (bug 18513) Fix buffer overflow for writes to memory buffer stream (bug 18549) Update NEWS m68k: update libm test ULPs Fix spurious conform test failures Properly terminate FDE in makecontext for ix86 (bug 18635) Andrew Senkevich (29): This is the beginning of series of patches with addition Refactoring of START for conditions in individual tests Last part of changes regarding to libm-test.inc: addition This patch adds infrastructure for addition of SIMD This is update for configure, build and install of vector math library. Localplt testing for vector math library and libmvec_hidden_* macro series. This patch adds detection of availability for AVX512F and AVX512DQ ISAs. Start of series of patches with x86_64 vector math functions. Addition of testing infrastructure for vector math functions. Vector cosf for x86_64. This patch adds vector cosf tests. More strict check of AVX512 support in assembler. Vector sin for x86_64 and tests. Vector sinf for x86_64 and tests. Vector log for x86_64 and tests. Vector logf for x86_64 and tests. Vector exp for x86_64 and tests. Vector expf for x86_64 and tests. Vector pow for x86_64 and tests. Vector powf for x86_64 and tests. Vector sincos for x86_64 and tests. Vector sincosf for x86_64 and tests. Fixed powerpc64 build. Combination of data tables for x86_64 vector functions sin, cos and sincos. Combination of data tables for x86_64 vector functions sinf, cosf and sincosf. More correct description of linking with vector math library. Fixed several libmvec bugs found during testing on KNL hardware. Added runtime check for AVX vector math tests. Prevent runtime fail of SSE vector math tests on non SSE4.1 machine. Andriy Rysin (1): Fix sorting order for Ukrainian locale (BZ 17293) Arjun Shankar (4): CVE-2015-1781: resolv/nss_dns/dns-host.c buffer overflow [BZ#18287] Ensure `wint_t' is defined before use in include/stdio.h Modify elf/tst-audit9.c to use test-skeleton.c Modify several tests to use test-skeleton.c Aurelien Jarno (1): Fix ldconfig segmentation fault with corrupted cache (Bug 18093). Benno Schulenberg (1): sprof: Make an error message identical to two others, and more accurate. Brad Hubbard (1): Use calloc to allocate xports (BZ #17542) Carlos O'Donell (15): Open development for 2.22. Fix missing ChangeLog attribution. NEWS: Fix spelling. Use alignment macros, pagesize and powerof2. hppa: Update libm-test-ulps. hppa: Fix feupdateenv and fesetexceptflag (Bug 18111). Enhance nscd's inotify support (Bug 14906). Bug 18125: Call exit after last linked context. Fail locale installation if localedef fails. Add sprintf benchmark. Fix ruserok scalability with large ~/.rhosts file. Add missing Advanced API (RFC3542) (1) defines. Regenerate libc.pot for 2.22 release. Updated translations for 2.22. Update version.h and include/features.h for 2.22 release Chris Metcalf (8): linux-generic: add a README tile: Enable PI_STATIC_AND_HIDDEN tile: use better variable naming in INLINE_SYSCALL math/test-fenvinline: avoid compiler warning tile: Regenerate ULPs. tst-leaks: raise timeout to 5 seconds tile: Fix BZ #18508 (makecontext yield infinite backtrace) tilepro: fix warnings in sysdeps/tile/tilepro/bits/atomic.h Christian Schmidt (1): Update currency_symbol in da_DK Chung-Lin Tang (5): Adjust timeouts for some tests, to accommodate slow processors, Fix order of arguments to rt_sigprocmask syscall when setting the signal mask Update Nios II ulps file. Add #include <string.h> to nptl/tst-join7mod.c to silence GCC warnings. Fixes extern protected data handling testcases elf/tst-protected1a Cong Wang (1): in.h: Coordinate in6_pktinfo and ip6_mtuinfo for kernel and glibc [BZ #15850] Cyril Hrubis (1): Set errno to ENOMEM on overflow in sbrk (bug 18592) Daniel Marjamäki (1): Add __nonnull attribute to wcscpy and wcsncpy [BZ#18265] David S. Miller (7): Update SPARC ulps. Rebuilt fresh sparc ULPS to get rid of removed tests. Convert sparc over to lowlevellock-futex.h Sparc memchr/memcmp/strncmp fixes from Il'ya Malakhov. Update sparc localplt.data Fix sparc build. Regenerate SPARC ULPs. Dmitry V. Levin (3): Prepare for restoration of .interp section in libpthread.so _res_hconf_reorder_addrs: fix typo in comment Fix potential hanging of gethostbyaddr_r/gethostbyname_r Eric Rannaud (1): linux: open and openat ignore 'mode' with O_TMPFILE in flags Evangelos Foutras (1): Fix __memcpy_chk on non-SSE2 CPUs Feng Gao (1): Use "|" instead of "+" when combine the _IO_LINE_BUF and _IO_UNBUFFERED flags Florian Weimer (32): NEWS: Also mention CVE-2015-1473 _nss_nis_initgroups_dyn: Return status instead of NSS_STATUS_SUCCESS vfprintf: Introduce THOUSANDS_SEP_T vfprintf: Introduce JUMP_TABLE_BASE_LABEL vfprintf: Define WORK_BUFFER_SIZE Avoid SIGFPE in wordexp [BZ #18100] pthread_setaffinity (Linux variant): Rewrite to use VLA instead of alloca Define libc_max_align_t for internal use Add struct scratch_buffer and its internal helper functions scratch_buffer_grow_preserve: Add missing #include <string.h> pldd: Use struct scratch_buffer instead of extend_alloca grp: Rewrite to use struct scratch_buffer instead of extend_alloca _nss_compat_initgroups_dyn: Use struct scratch_buffer instead of extend_alloca getnameinfo: Use struct scratch_buffer instead of extend_alloca nscd_getgr_r: Use struct scratch_buffer instead of extend_alloca scratch_buffer: Suppress truncation warning on 32-bit Do not build with -Winline Make time zone file parser more robust [BZ #17715] posix_fallocate, posix_fallocate64 stub: Do not set errno test-skeleton: Support temporary files without memory leaks [BZ#18333] CVE-2014-8121: Do not close NSS files database during iteration [BZ #18007] NEWS: BZ#18319 was fixed in commit ed159672eb3cd650a32b7e5cb4d5ec1fe0e63802 i386: Remove fallocate, fallocate64, posix_fallocate, posix_fallocate64 __ASSUME_FALLOCATE is always true on 32-bit architectures vfprintf: Move jump table definition and the macros out of function vfprintf: Introduce printf_positional function vfprintf: Remove label name switching for the jump table Avoid some aliasing violations in libio Fix indentation to match nesting in previous commit posix_fallocate: Emulation fixes and documentation [BZ #15661] Commit 7fe9e2e089f4990b7d18d0798f591ab276b15f2b fixes [BZ# 17322] pthread_key_create: Fix typo in comment Gleb Fotengauer-Malinovskiy (1): nptl: restore .interp section in libpthread.so H.J. Lu (23): Compile gcrt1.o with -fPIC Compile vismain with -fPIE and link with -pie Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY Replace __attribute__((visibility("protected"))) Preserve bound registers in _dl_runtime_resolve Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 Add a testcase for copy reloc against protected data Limit threads sharing L2 cache to 2 for SLM/KNL Check tzspec_len == 0 in __tzfile_read Remove a trailing `\' in make-syscalls.sh Don't issue an error if DT_PLTRELSZ is missing Make sure that calloc is called at least once Don't issue errors on GDB Python files Align TCB offset to the maximum alignment Support compilers defaulting to PIE Add a testcase for i386 LD_AUDIT Add and use sysdeps/i386/link-defines.sym Add la_symbind32 to x86-64 audit tests Improve bndmov encoding with zero displacement Replace %ld with %jd and cast to intmax_t Sort NEWS Add si_addr_bnd to _sigfault in x86 struct siginfo Extend local PLT reference check Igor Zamyatin (1): Preserve bound registers for pointer pass/return J William Piggott (1): [BZ #17969] James Cowgill (1): [BZ #17930] MIPS: Define SHM_NORESERVE. James Lemke (1): Fix for test "malloc_usable_size: expected 7 but got 11" John David Anglin (2): hppa: fix __O_SYNC to match the kernel hppa: Fix feholdexcpt and fesetenv (Bug 18110). Joseph Myers (162): soft-fp: Support floating-point extensions without quieting sNaNs. soft-fp: Refine FP_EX_DENORM handling for comparisons. soft-fp: Fix _FP_FMA when product is zero and third argument is finite (bug 17932). Remove sysdeps/mips soft-fp subdirectories. Fix sincos errno setting (bug 15467). Fix exp2 spurious underflows (bug 16560). Fix powerpc software sqrt (bug 17964). Fix powerpc software sqrtf (bug 17967). Fix dbl-64/wordsize-64 remquo (bug 17569). Fix MIPS __mips_isa_rev -Werror=undef build. Fix MIPS _COMPILING_NEWLIB -Werror=undef build. Fix MIPS _ABIO64 -Werror=undef build. Fix remquo spurious overflows (bug 17978). Fix sign of remquo zero remainder in round-downward mode (bug 17987). Refine documentation of libm exceptions goals. Fix posix_spawn getrlimit64 namespace (bug 17991). Fix search.h namespace (bug 17996). Fix atan / atan2 missing underflows (bug 15319). Fix scandir scandirat namespace (bug 17999). soft-fp: Adjust call to abort for kernel use. Fix x86/x86_64 scalb (qNaN, -Inf) (bug 16783). Fix ldbl-128ibm acoshl inaccuracy (bug 18019). Fix ldbl-128ibm asinhl inaccuracy (bug 18020). Fix ldbl-128ibm ilogbl near powers of 2 (bug 18029). Fix ldbl-128ibm logbl near powers of 2 (bug 18030). Fix asin missing underflows (bug 16351). Fix ldbl-128/ldbl-128ibm acosl inaccuracy (bug 18038, bug 18039). Avoid uninitialized warnings in Bessel functions. Avoid -Wno-write-strings for k_standard.c. Add comment to CSTR macro in k_standard.c. Fix ldbl-96, ldbl-128ibm atanhl inaccuracy (bug 18046, bug 18047). Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779). soft-fp: Condition sfp-machine.h include path on __KERNEL__. Fix /* in comment in previous commit. soft-fp: Support conditional zero-initialization in declarations. soft-fp: Use multiple-include guards. Add test for bug 18104. soft-fp: Add _FP_UNREACHABLE. soft-fp: Define and use _FP_STATIC_ASSERT. Make sem_timedwait use FUTEX_CLOCK_REALTIME (bug 18138). Note old commit as having resolved bug 11505. Add more tests of log2. Regenerate x86_64, x86 ulps from scratch. Add more tests of cosh, sinh. Add more tests of expm1. Add more tests of acos. Support six-argument syscalls from C for 32-bit x86, use generic lowlevellock-futex.h (bug 18138). Add more tests of asin. Remove unused macros from i386 lowlevellock.h. Add another test of asin. Add more tests of acosh, asinh and atanh. Fix dbl-64 atan in non-default rounding modes (bug 18197). Fix dbl-64 atan2 in non-default rounding modes (bug 18210, bug 18211). Add more tests of cabs. Add more tests of cbrt. Add more tests of atan. Add more tests of atanh. Add more tests of clog and clog10. Fix strtof decimal rounding close to half least subnormal (bug 18247). Fix ldbl-128 roundl for exponents in [31, 47] (bug 18346). Remove MIPS version of waitid.c. Add further tests of cosh and sinh. Add more tests of csqrt. Add more tests of erf, erfc. Add more tests of exp, exp10, exp2, expm1. Add more tests of log, log10, log1p, log2. Add more tests of lgamma. Add another test of pow. Add more tests of cos, sin, sincos. Add more tests of tan. Add more tests of tanh. Add more tests of tgamma. Add more tests of libm functions. Add further tests of libm functions. Add more tests of acosh, atanh, cos, csqrt, erfc, sin, sincos. Add more tests of csqrt, lgamma, log10, sinh. Fix mips16 __fpu_control static linking (bug 18397). Fix linknamespace test handling of architecture-specific st_other. Fix log1p missing underflows (bug 16339). Fix atanf spurious underflows (bug 18196). Fix erfcf spurious underflows (bug 18217). Fix lgammaf spurious underflows (bug 18220). Fix tanf spurious underflows (bug 18221). Fix atanhl missing underflows (bug 16352). Fix i386 atanhl spurious underflows (bug 18049). Fix ldbl-96 remquol (finite, Inf) (bug 18244). conformtest: clean up POSIX expectations for unistd.h. conformtest: correct POSIX expectations for locale.h. conformtest: use proper _POSIX_C_SOURCE value for POSIX. linknamespace: whitelist re_syntax_options. Fix sysdeps/ieee754/dbl-64/mpa.c for -Wuninitialized. Fix lgamma implementations for -Wuninitialized. Fix pathconf basename namespace (bug 18444). Restore _POSIX2_C_VERSION definition (bug 438). Fix ldbl-128 / ldbl-128ibm asinl for -Wuninitialized. Fix ldbl-128 / ldbl-128ibm erfcl for -Wuninitialized Fix ldbl-128 / ldbl-128ibm tanl for -Wuninitialized. Fix soft-fp fma for -Wuninitialized. Fix fnmatch towlower namespace (bug 18469). Use libc_hidden_proto / libc_hidden_def with __strnlen. Use better variable names in MIPS syscall macros. Fix fnmatch wmemchr namespace (bug 18468). Fix fnmatch strnlen namespace (bug 18470). Fix regex wctype namespace (bug 18495). Fix psignal, psiginfo declaration conditions (bug 18483). Fix regex wcrtomb namespace (bug 18496). Fix open_memstream namespace (bug 18498). Say "C++ tests" in comment on __open_memstream declaration. Fix pathconf statvfs namespace (bug 18507). Fix regcomp wcscoll, wcscmp namespace (bug 18497). Fix h_errno namespace (bug 18520). Fix ecvt_r, fcvt_r namespace (bug 18522). Fix aio_* pread namespace (bug 18519). Fix getlogin_r namespace (bug 18527). Fix grp.h endgrent, getgrent namespace (bug 18528). Fix netdb.h addrinfo namespace (bug 18529). Fix syslog fputs_unlocked namespace (bug 18530). Fix linknamespace expectations for in6addr_any, in6addr_loopback. Fix gethostbyaddr in6addr_any, in6addr_loopback namespace (bug 18532). Fix vsyslog namespace (bug 18533). Fix syslog dprintf namespace (bug 18534). Fix sem_* tdelete, tfind, tsearch, twalk namespace (bug 18536). Fix fmtmsg addseverity namespace (bug 18539). Fix getpass fflush_unlocked namespace (bug 18540). Fix swscanf vswscanf namespace (bug 18542). Fix mq_notify pthread_barrier_* namespace (bug 18544). Create hidden aliases for non-libc syscalls automatically. Fix mq_receive, mq_send mq_timed* namespace (bug 18545). Fix mq_notify socket, recv namespace (bug 18546). Fix ttyslot namespace (bug 18547). Fix nice getpriority, setpriority namespace (bug 18553). Remove ldbl-128ibm variants of complex math functions. Fix netinet/in.h MCAST_* namespace (bug 18558). Remove stray spurious-underflow markings from cexp test. Remove include/bits/ipc.h. Fix asinh missing underflows (bug 16350). conformtest: Support xfail markers on individual assertions. conformtest: Fix pselect expectations. Fix x86 / x86_64 expl, exp10l missing underflows (bug 16361). Correct ChangeLog syntax for conditional change within function. Fix x86_64 / x86 expm1l (-min_subnorm) result sign (bug 18569). Fix expm1 missing underflows (bug 16353). Fix exp2, exp2f spurious underflows (bug 18219). Fix csqrt spurious underflows (bug 18371). Fix math/Makefile dependency on libm-test.stmp for libmvec tests. Fix spurious "inexact" exceptions from __kernel_standard_l (bug 18245, bug 18583). Fix sin, sincos missing underflows (bug 16526, bug 16538). Fix ldbl-128 expl missing underflows (bug 18586). Fix csin, csinh overflow in directed rounding modes (bug 18593). Move csin, csinh tests to auto-libm-test-in. Fix cexp, ccos, ccosh, csin, csinh spurious underflows (bug 18594). Refactor libm tests. Use round-to-nearest internally in jn, test with ALL_RM_TEST (bug 18602). Update headers for Linux 4.0, 4.1 definitions. Fix j1, jn missing underflows (bug 16559). Fix ldbl-128 j1l spurious underflows (bug 18612). Improve tgamma accuracy (bug 18613). Regenerate MIPS libm-test-ulps. Regenerate ARM libm-test-ulps. Regenerate powerpc-nofpu libm-test-ulps. Fix ldbl-128 expm1l (-min_subnorm) result sign (bug 18619). Mark bug 2981 (elf/tst-audit* fail on MIPS) as fixed. Kevin Easton (1): Reduce lock contention in __tz_convert() [BZ #16145] (partial fix) Khem Raj (2): Reflect renaming of bh_IN and tu_IN in SUPPORTED file [BZ #17475] locale: Do not define lang_ab for tcy_IN and bhb_IN Leonhard Holz (6): Remove unused definitions Improve strcoll with strdiff. Split locale generation snippet into a separate file Add strcoll benchmark remove now unused idxnow in strcoll remove unnecessary memset in strcoll Mark Wielaard (2): elf.h SHF_EXCLUDE signed int 31 bit shift triggers undefined behaviour. elf.h: Add section compression constants and structures. Marko Myllynen (4): Fix bo_CN and bo_IN. Fix monetary.h comment Remove unused PREDEFINED_CLASSES code locale: Remove obsolete repertoire map references Martin Galvan (2): NPTL: swap comments for THREAD_SETMEM and THREAD_SETMEM_NC for i386 and x86_64 NPTL: Remove duplicate definition of PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP Martin Sebor (4): powerpc: setcontext.S uses power6 mtfsf when not supported [BZ #18116] Attempting to install glibc configured with --prefix=/usr into The C++ 2011 std::call_once function is specified to allow The patch committed to fix bug #18435 caused regressions on aarch64 Matthew Fortune (2): ia64: remove fixed page size macros and others [BZ #17792] Add support for DT_MIPS_RLD_MAP_REL. Mel Gorman (2): malloc: Consistently apply trim_threshold to all heaps [BZ #17195] malloc: Do not corrupt the top of a threaded heap if top chunk is MINSIZE [BZ #18502] Mike Frysinger (27): ia64: drop custom getpagesize hppa: fix build failure with RTLD_PRIVATE_ERRNO add changelog for previous commit alloca: fix buf interaction manual: drop strerror C89 compatibility note hppa: update __O_SYNC fix with [BZ #18068] pwd.h: add __nonnull markings [BZ #18641] nscd: drop selinux/flask.h include tst-tzset: raise timeout to 5 seconds hppa/ia64: _dl_symbol_address: add PLT bypass for rtld hppa/ia64: _dl_unmap: make it hidden sparc: fix sigaction for 32bit builds [BZ #18694] ia64: siginfo.h: delete siginfo name ia64: sifaction.h: change sa_flags to an int ia64: stat.h: rename pad0 to __glibc_reserved0 ia64: msg.h: fix msg_qnum/msg_qbytes types ia64: sigaction.h: fix sa_flags ordering conform/linknamespace: whitelist matherrf/matherrl pwd.h: revert __nonnull markings on putpwent [BZ #18641] ia64: clean up old kernel headers cruft ia64: atomic.h: fix atomic_exchange_and_add 64bit handling ia64: drop __tls_get_addr from expected ld.so plt usage hppa: rewrite INLINE_SYSCALL hppa: fix sysdep.h header setup hppa: sigaction.h: change sa_flags to an int hppa: fix pthreadtypes.h namespace failures hppa: add bz entry for pthreadtypes.h fix Miroslav Lichvar (1): Update timex.h for ADJ_SETOFFSET. Nathan Lynch (1): ARM: VDSO support Ondřej Bílka (2): Handle mblen return code when n is zero. Use strspn/strcspn/strpbrk ifunc in internal calls. Paul Eggert (6): Add ersatz _Static_assert on older C hosts * manual/time.texi (TZ Variable): glibc no longer comes with tzdata. * stdlib/setenv.c (__add_to_environ): * stdlib/setenv.c (__add_to_environ): Revert previous change. Better fix for setenv (..., NULL, ...) Remove obsolete aliases that broke 'locale -a' Paul Pluzhnikov (13): Cleanup: add missing #include's Fix BZ #17269 -- _IO_wstr_overflow integer overflow Fix BZ #17916 - fopen unbounded stack usage for ccs= modes Fix minor formatting violation. Fix BZ 18036 buffer overflow (read past end of buffer) in internal_fnmatch Fix BZ #18043: buffer-overflow (read past the end) in wordexp/parse_dollars/parse_param Cleanup: in preparation for fixing BZ #16734, fix memory leaks exposed by Refactor wordexp-test.c such that words always ends at the edge of Fix off-by-one which caused BZ #18042 and add a test for it. Mention BZ #18042 in NEWS. Fix BZ #18043 (c4): buffer-overflow (read past the end) in wordexp/parse_dollars/parse_param Minor refactoring: Fix BZ #18043 comment # 19: don't call undefined setenv(..., NULL, 1). Pavel Kopyl (1): Add forced deletion support to _dl_close_worker Pravin Satpute (1): Correcting language code for Bhili and Tulu locales (bug 17475) Rajalakshmi Srinivasaraghavan (2): powerpc: POWER7 strncpy optimization for unaligned string powerpc: strstr optimization Rical Jasan (1): manual: complete example in error message documentation Richard Henderson (5): alpha: Unconditionally include dl-sysdep.h in sysdep.h alpha: Update libm-test-ulps math/test-fenvinline: Cast fe_exc to unsigned int before printing alpha: Update libm-test-ulps soft-fp: Fix alpha kernel build problem Roland McGrath (97): Clean up sysdep-dl-routines variable. Exclude rpcent functions and NSS backends for rpc, key when excluding sunrpc. x86: Clean up __vdso_clock_gettime variable. Clean up NPTL fork to be compat-only. Clean up NPTL longjmp to be compat-only. Clean up NPTL system to be compat-only. Clean up nptl/tst-join5 use of nanosleep. Fix nptl/tst-kill5 not to presume SIGRTMAX exists. Fix dirent/tst-fdopendir not to presume O_NOATIME exists. Fix libio/tst-atime not to presume ST_NOATIME exists. Move tst-getlogin to login/ subdirectory. Do not use SA_NOCLDWAIT in tst-pselect. Conditionalize some tests' use of SA_SIGINFO. Use signal rather than sigaction in nptl/tst-cleanup2. NPTL: Build tests using clone directly only for Linux. Don't set unused field in rt/tst-timer2. Conditionalize use of SIGRTMIN in nptl/tst-locale1.c. NPTL: Conditionalize some sanity tests for SIGCANCEL/SIGSETXID. ARM: Add missing sfi_breg in LDR_GLOBAL macro. Clean up math/test-snan. Pointless update in README. Another pointless update in README. Support after-link variable to run a final step on binaries. Use -Werror=undef for assembly code. NPTL: Initializer for .init_array-only configurations. Add placeholder c++-types.data and *.abilist files. Don't crash in iconv setup when getcwd fails. Convert tst-iconv5 to use test-skeleton. Convert tst-iconv3 to use test-skeleton. Convert dlfcn/tststatic2 to use test-skeleton. Deglobalize internal variables in timer_routines.c. Avoid C++ tests when the C++ cannot be linked. Avoid more C++ tests. Conditionalize some test code for SIGRTMIN, SA_SIGINFO. Split rpcent tests out of tst-netdb. Define ETH_ALEN in generic <netinet/if_ether.h>. Avoid re-exec-self in bug-setlocale1. ChangeLog format Document test-wrapper-env-only in INSTALL. Harmonize posix/regcomp.c with gnulib: comment formatting Let tests result in UNSUPPORTED; use that for unbuildable C++ cases ARM: Rewrite sysdeps/arm/tls-macros.h ARM: Fix memcpy & memmove for [ARM_ALWAYS_BX] Minor cleanups in libio/iofdopen.c Convert dlfcn/tststatic to use test-skeleton. Make test-skeleton.c grok TEST_DIRECT magic environment variable. Let non-add-on preconfigure scripts set libc_config_ok. Omit libc-modules.h for all .v.i files. Add arm-nacl port. Fuller check for invalid NSID in _dl_open. Avoid confusing compiler with dynamically impossible statically invalid dereference in _dl_close_worker. ARM: Define PI_STATIC_AND_HIDDEN. NaCl: Make __suseconds_t be long int rather than int32_t. NaCl: Fix symbol names for euidaccess. NaCl: Change clock_t to long int. NaCl: Fix elf_loader file name in nacl-test-wrapper.sh BZ#18383: Add test case for large alignment in TLS blocks. NaCl: Implement gethostname. NaCl: Provide non-default values for uname. Add a test case for scandir. Break __scandir_cancel_handler out into its own file. Refactor scandir/scandirat to use common tail. Nit fixes in last change. NaCl: Make fdopendir skip fcntl check. Refactor opendir. BZ#18434: Fix sem_post EOVERFLOW check for [!__HAVE_64B_ATOMICS]. BZ#18434: Mark fixed in NEWS. Move usleep.c using nanosleep to sysdeps/posix. NaCl: Set tid field to a unique value. Fix nptl-init.c use of INTERNAL_SYSCALL_DECL. Split timed-wait functions out of nptl/lowlevellock.c. NaCl: Add NaCl-specific __lll_timedlock_wait. NaCl: Fix thinko in last change. NaCl: Fix lll_futex_timed_wait timeout calculation. NaCl: Make thread exit wake pthread_join. Fix setenv.c diagnostic pragma to be compatible with GCC 4.6 BZ#18383: Another test case, with TLS refs and defs in separate TUs. NaCl: Implement nacl_interface_ext_supply entry point. Line-wrap some log entries. Print more information in tst-getcpu failure case. NaCl: Fix glob.c build after getlogin_r -> __getlogin_r. Use unsigned types for counters in AIO code. Use unsigned types for counters in getaddrinfo_a code. NPTL: Use unsigned type for setxid_futex. Install a dummy <rpc/netdb.h> when not building sunrpc/. Fix some places to use $(LN_S) makefile variable. BZ#18383: Conditionalize test-xfail-tst-tlsalign{,-static} on ARM assembler bug. PLT avoidance for _exit in rtld. Provide __libc_fatal for rtld. NaCl: Make pthread_condattr_setclock reject CLOCK_MONOTONIC. Factor file identity rules out of generic rtld code. Add abilist files and NEWS item for arm-nacl port. NaCl: Use only nacl_irt_dev_filename, never nacl_irt_filename. NaCl: Fix missing getdtablesize symbol. Add SIGWINCH to generic <bits/signum.h>. Make sysdeps/posix bring in login subdir. NaCl: Remove bogus O_SHLOCK, O_EXLOCK definitions. Rüdiger Sonderfeld (1): Document tv_sec is of type time_t: Samuel Thibault (28): hurd: fix build with pthread aio hurd: fix f?chflags prototypes, declare them and their flags hurd: allow poll() array bigger than FD_SETSIZE hurd: map nice levels 1-to-1 with Mach prio levels hurdselect: Let select get interrupted by signals hurd: fix sigstate locking hurdselect: remove dead code. hurd: support mmap with PROT_NONE hurd: add basic types for ioctls hurd: fix compilation of signal.h in C++ hurd: fix compilation of signal.h in C++ hurd: Ignore bytes beyond sockaddr length for AF_UNIX hurd: fix tls.h build hurd: Fix abi-tag, following ba90e05 Fix time/getdate.c build. add hurd/hurdsocket.h file missing from a5eb23d hurd: fix unwind-resume.c build hurd: fix unwind-resume.c build Add fixed bug numbers to NEWS Revert "hurd: Fix abi-tag, following ba90e05" Fix aio_error thread-safety. hurd: Make libc able to call pthread stubs Add missing dependency Fix warnings Fix visibility of EXTPROC macro Add more exception to local headers list mach: fix typo hurd: permit to use mlock from non-root process Siddhesh Poyarekar (25): Consolidate arena_lookup and arena_lock into a single arena_get Skip logging for DNSSEC responses [BZ 14841] Fix up NEWS merge goof-up Update NEWS Minor changelog fixup Add *.pyc to .gitignore Add envz_remove to the libc manual Succeed if make check does not report any errors Avoid deadlock in malloc on backtrace (BZ #16159) Fix typo in safety annotations in envz_remove Fix monetary.h comment New module to import and process benchmark output benchtest: script to compare two benchmarks Avoid boolean coercion in tst-tls-atexit test case Remove unnecessary mutex locks from tst-tls-atexit test case Whitespace fix in tst-tls-atexit.c Fix up ChangeLog Fix up typo in tst-tls-atexit Set NODELETE flag when opening already open objects with RTLD_NODELETE Whitespace fixup in cxa_thread_atexit_impl.c Add comment to clarify how the test can fail Remove Linuxism from tst-tls-atexit Also use l_tls_dtor_count to decide on object unload (BZ #18657) Mention dl_load_lock by name in the comments Use IE model for static variables in libc.so, libpthread.so and rtld Stefan Liebler (18): S390: Build failure due to nptl/pt-longjmp.c changes. s390: Use generic lowlevellock-futex.h S/390: Regenerate ULPs S/390: Fix setcontext/swapcontext which are not restoring sigmask. Update tst_mbrlen/tst_mbrtowc for mblen change Set errno for log1p on pole/domain error. Use correct signedness in wcsncmp S/390: Get cache information via sysconf S/390: Regenerate ULPs Adjust tst-strfmon1 after da_DK locale change. S/390: Regenerate ULPs Fix timezone tests run in parallel. Fix benchtests build failure after 'add benchmark for strcoll' S390: Fix sem.h conformance test failures. S390: Regenerate ULPs. S390: Fix "backtrace() returns infinitely deep stack frames with makecontext()" [BZ #18508]. S390: Regenerate ULPs i686: Mark stdlib/tst-makecontext as XFAIL. Steve Ellcey (6): 2015-02-13 Steve Ellcey <sellcey@imgtec.com> 2015-02-17 Steve Ellcey <sellcey@imgtec.com> 2015-02-17 Steve Ellcey <sellcey@imgtec.com> 2015-02-18 Steve Ellcey <sellcey@imgtec.com> * inet/rcmd.c (rresvport_af): Change ss to anonymous union * resolv/res_hconf.c (_res_hconf_reorder_addrs): Use a union to Szabolcs Nagy (11): [AArch64] Fix the big endian loader name. [AArch64] Fix inline asm clobber list in tls-macros.h struct stat is not posix conform [BZ 18034][AArch64] Lazy TLSDESC relocation data race fix [AArch64] Fix cfi_adjust_cfa_offset usage in dl-tlsdesc.S Regenerate aarch64 libm-test-ulps [AArch64] make setcontext etc functions consistent with the kernel [AArch64][BZ 18400] fix elf_prpsinfo in procfs.h [AArch64][BZ 18648] change greg_t definition in ucontext.h [AArch64][BZ #17711] Fix extern protected data handling [ARM][BZ #17711] Fix extern protected data handling Torvald Riegel (11): Make error checking effective in nptl/tst-cond25.c. ia64: Remove custom lowlevellock.h Fix lost wake-up when pthread_rwlock_timedrwlock times out. Fix missing wake-ups in pthread_rwlock_rdlock. Fix atomic_full_barrier on x86 and x86_64. Clean up BUSY_WAIT_NOP and atomic_delay. Remove documentation of lowlevellock systemtap probes. Do not create invalid pointers in C code of string functions. Add and use new glibc-internal futex API. Clean up semaphore EINTR handling after Linux futex docs clarification. hppa: Remove custom lowlevellock.h. Tulio Magno Quites Machado Filho (2): BZ #18116: Mark fixed in NEWS. Avoid outputting to TTY after an expected memory corruption in testcase Vincent Bernat (1): time: ensure failing strptime() tests are reported correctly Wilco Dijkstra (14): Rather than using a C implementation of memset, directly call memset, which Rather than using a C implementation of memmove, directly call memmove, which Use __copysign rather than copysign. 2015-05-06 Szabolcs Nagy <szabolcs.nagy@arm.com> Remove various ABS macros and replace uses with fabs (or in one case abs) Add missing math_private includes. 2015-05-28 Wilco Dijkstra <wdijkstr@arm.com> 2015-06-02 Szabolcs Nagy <szabolcs.nagy@arm.com> This patch renames all uses of __isinf*, __isnan*, __finite* and __signbit* to use standard C99 macros. This has no effect on generated code. Replace finite with isfinite. Remove unused file sysdeps/ieee754/support.c Inline __ieee754_sqrt and __ieee754_sqrtf. Also add external definitions. Optimize the strlen implementation by using a page cross check and a fast check Add AArch64 versions of math_opt_barrier and math_force_eval that avoid going via memory. Yaakov Selkowitz (1): manual: fix XPG basename prototype Zack Weinberg (1): Deprecate the use of regexp.h -----------------------------------------------------------------------