2022-01-01 18:54:23 +00:00
|
|
|
# Copyright (C) 1995-2022 Free Software Foundation, Inc.
|
1995-02-21 06:15:34 +00:00
|
|
|
# This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
# The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
1995-02-21 06:15:34 +00:00
|
|
|
|
|
|
|
# The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 04:58:11 +00:00
|
|
|
# Lesser General Public License for more details.
|
1995-02-21 06:15:34 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
# License along with the GNU C Library; if not, see
|
Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 05:40:42 +00:00
|
|
|
# <https://www.gnu.org/licenses/>.
|
1995-02-21 06:15:34 +00:00
|
|
|
|
1998-03-08 15:26:29 +00:00
|
|
|
# Makefile for elf subdirectory of GNU C Library.
|
|
|
|
|
1995-05-02 06:35:55 +00:00
|
|
|
subdir := elf
|
|
|
|
|
2012-10-03 23:13:14 +00:00
|
|
|
include ../Makeconfig
|
|
|
|
|
2022-01-14 19:16:05 +00:00
|
|
|
headers = \
|
|
|
|
bits/elfclass.h \
|
|
|
|
bits/link.h \
|
|
|
|
bits/link_lavcurrent.h \
|
|
|
|
elf.h \
|
|
|
|
link.h \
|
|
|
|
# headers
|
|
|
|
|
|
|
|
routines = \
|
|
|
|
$(all-dl-routines) \
|
|
|
|
dl-addr \
|
|
|
|
dl-addr-obj \
|
2022-05-16 16:41:43 +00:00
|
|
|
dl-early_allocate \
|
2022-01-14 19:16:05 +00:00
|
|
|
dl-error \
|
|
|
|
dl-iteratephdr \
|
|
|
|
dl-libc \
|
|
|
|
dl-origin \
|
|
|
|
dl-profstub \
|
|
|
|
dl-reloc-static-pie \
|
|
|
|
dl-support \
|
|
|
|
dl-sym \
|
|
|
|
dl-sysdep \
|
|
|
|
enbl-secure \
|
|
|
|
libc-dl_find_object \
|
|
|
|
libc_early_init \
|
|
|
|
rtld_static_init \
|
|
|
|
# routines
|
Mon Jun 10 06:14:03 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/mach/hurd/dl-sysdep.c (__open): Define this instead of open.
(__close, __mmap): Likewise define with __ names now.
Mon Jun 10 05:13:18 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/dl-support.c: New file.
* elf/Makefile (CFLAGS-dl-support.c): New variable.
(routines, elide-routines.so): Add dl-support.
* elf/dl-minimal.c (_dl_pagesize): Remove common defn.
* elf/dl-load.c (_dl_pagesize): Define it here.
(_dl_map_object_from_fd): Initialize it if zero.
* elf/link.h (_dl_pagesize): Remove const.
Sun Jun 9 04:04:26 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/Makefile (routines): Add dl-symbol.
* elf/dl-lookup.c (_dl_symbol_value): Moved to ...
* elf/dl-symbol.c: New file.
* elf/elf.h (Elf32_Xword, Elf32_Sxword): New types.
(Elf32_Section, Elf64_Section): New types, 16 bits.
(Elf32_Sym, Elf64_Sym): Use it.
* elf/dl-deps.c (_dl_open): Moved to ...
* elf/dl-open.c: New file.
* Makefile (routines): Add dl-open.
* elf/Makefile (dl-routines): New variable.
(routines): Add $(dl-routines).
(elide-routines.so): New variable, set to $(dl-routines).
(libdl-inhibit-o): Variable removed; build all flavors of -ldl.
(rtld-routines): All but rtld, dl-sysdep, and dl-minimal moved to
$(dl-routines).
* elf/dl-lookup.c (_dl_lookup_symbol): Remove magic symbol grokage.
* elf/dladdr.c: Use ELFW(ST_BIND) in place of ELF32_ST_BIND.
* elf/dl-load.c (open_path): Use __ names for open and close. Avoid
using strdup.
(_dl_map_object): Likewise.
(_dl_map_object_from_fd): Use __ names for mmap, munmap, and mprotect.
* elf/dl-minimal.c (malloc): Likewise.
* elf/dl-reloc.c (_dl_relocate_object): Likewise.
* elf/dl-minimal.c (_dl_pagesize): New variable.
(malloc): Use that instead of a static variable.
* elf/dl-reloc.c (_dl_relocate_object): Use _dl_pagesize instead of
calling getpagesize.
* elf/dl-load.c (_dl_map_object_from_fd): Likewise.
* elf/link.h: Declare _dl_pagesize.
* elf/rtld.c (dl_r_debug): Renamed to _dl_r_debug.
* elf/link.h (struct link_map): Use Half for l_phnum instead of Word.
* elf/rtld.c (dl_main): Use Half for phdr count arg.
(_dl_sysdep_start): Update prototype of DL_MAIN function ptr arg.
* elf/dl-load.c (_dl_map_object_from_fd): Use explicit Elf32_Word to
extract 4-byte magic number, not ElfW(Word). Match EI_CLASS against
native wordsize, either 32 or 64.
* elf/elf.h (Elf64_Byte, Elf64_Section): Typedefs removed. In C a
char is always a byte, no need for a typedef. Section indices are
16-bit quantities in elf64, which already have a typedef Elf64_Half.
Remove partial -lelf implementation. There is now a
separately-distributed `libelf' package that implements it.
* elf/dl-lookup.c: Don't #include <libelf.h> any more.
(_dl_elf_hash): New function, moved from
libelf.h:elf_hash.
(_dl_lookup_symbol): Use it instead of elf_hash.
* elf/libelf.h: File removed.
* elf/elf_hash.c: File removed.
* elf/Makefile (headers): Remove libelf.h.
(extra-libs): Remove libelf.
(libelf-routines): Variable removed.
* elf/Makefile (libdl.so): Remove commands from this target. The
implicit rule commands are correct, this explicit rule just serves to
add some dependencies.
* elf/dl-lookup.c (_dl_lookup_symbol): Use ELFW(ST_TYPE) in place of
ELF32_ST_TYPE. Likewise ST_BIND.
* elf/do-rel.h (elf_dynamic_do_rel): Likewise R_SYM.
* elf/link.h (ElfW): New macro for wordsize-independent ElfXX_* type
naming.
(ELFW): New macro, likewise for ELFXX_* macro naming.
(_ElfW, _ElfW_1): New macros, subroutines of ElfW and ELF.
Sat Jun 8 20:52:38 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/link.h, elf/do-rel.h, elf/dynamic-link.h, elf/dl-deps.c,
elf/dl-init.c, elf/dl-load.c, elf/dl-lookup.c, elf/dl-reloc.c,
elf/dl-runtime.c, elf/dladdr.c, elf/dlclose.c, elf/dlsym.c,
elf/linux-compat.c, elf/rtld.c: Change all uses of `Elf32_XXX' to
`ElfW(XXX)' for wordsize-independence.
Sat Jun 8 20:50:42 1996 Richard Henderson <rth@tamu.edu>
* elf/elf.h: Move Elf64_* types in parity with Elf32 counterparts.
(Elf64_auxv_t): New type.
(EM_ALPHA, R_ALPHA_*): New macros for elf64-alpha format.
1996-06-10 10:18:47 +00:00
|
|
|
|
|
|
|
# The core dynamic linking functions are in libc for the static and
|
|
|
|
# profiled libraries.
|
2022-01-14 19:16:05 +00:00
|
|
|
dl-routines = \
|
|
|
|
dl-call-libc-early-init \
|
|
|
|
dl-close \
|
|
|
|
dl-debug \
|
|
|
|
dl-debug-symbols \
|
|
|
|
dl-deps \
|
|
|
|
dl-exception \
|
|
|
|
dl-execstack \
|
|
|
|
dl-find_object \
|
|
|
|
dl-fini \
|
|
|
|
dl-init \
|
|
|
|
dl-load \
|
|
|
|
dl-lookup \
|
|
|
|
dl-lookup-direct \
|
|
|
|
dl-minimal-malloc \
|
|
|
|
dl-misc \
|
|
|
|
dl-object \
|
|
|
|
dl-open \
|
|
|
|
dl-origin \
|
2022-01-14 19:16:05 +00:00
|
|
|
dl-printf \
|
2022-01-14 19:16:05 +00:00
|
|
|
dl-profile \
|
|
|
|
dl-reloc \
|
|
|
|
dl-runtime \
|
|
|
|
dl-scope \
|
2022-01-18 12:53:11 +00:00
|
|
|
dl-setup_hash \
|
2022-01-14 19:16:05 +00:00
|
|
|
dl-sort-maps \
|
|
|
|
dl-thread_gscope_wait \
|
|
|
|
dl-tls \
|
|
|
|
dl-tls_init_tp \
|
|
|
|
dl-trampoline \
|
|
|
|
dl-version \
|
|
|
|
dl-write \
|
|
|
|
# dl-routines
|
|
|
|
|
2012-10-03 23:13:14 +00:00
|
|
|
ifeq (yes,$(use-ldconfig))
|
|
|
|
dl-routines += dl-cache
|
|
|
|
endif
|
2016-12-31 18:02:17 +00:00
|
|
|
|
2016-12-31 18:04:04 +00:00
|
|
|
ifneq (no,$(have-tunables))
|
2016-12-31 18:02:17 +00:00
|
|
|
dl-routines += dl-tunables
|
2016-12-31 18:04:04 +00:00
|
|
|
tunables-type = $(addprefix TUNABLES_FRONTEND_,$(have-tunables))
|
2017-12-11 21:11:16 +00:00
|
|
|
CPPFLAGS-dl-tunables.c += -DTUNABLES_FRONTEND=$(tunables-type)
|
2016-12-31 18:03:27 +00:00
|
|
|
|
2020-07-12 13:04:53 +00:00
|
|
|
ifeq (yesyes,$(build-shared)$(run-built-tests))
|
|
|
|
tests-special += $(objpfx)list-tunables.out
|
|
|
|
endif
|
|
|
|
|
2016-12-31 18:03:27 +00:00
|
|
|
# Make sure that the compiler does not insert any library calls in tunables
|
|
|
|
# code paths.
|
|
|
|
ifeq (yes,$(have-loop-to-function))
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-dl-tunables.c += -fno-tree-loop-distribute-patterns
|
2016-12-31 18:03:27 +00:00
|
|
|
endif
|
2016-12-31 18:02:17 +00:00
|
|
|
endif
|
|
|
|
|
2000-09-05 02:41:25 +00:00
|
|
|
all-dl-routines = $(dl-routines) $(sysdep-dl-routines)
|
Mon Jun 10 06:14:03 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/mach/hurd/dl-sysdep.c (__open): Define this instead of open.
(__close, __mmap): Likewise define with __ names now.
Mon Jun 10 05:13:18 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/dl-support.c: New file.
* elf/Makefile (CFLAGS-dl-support.c): New variable.
(routines, elide-routines.so): Add dl-support.
* elf/dl-minimal.c (_dl_pagesize): Remove common defn.
* elf/dl-load.c (_dl_pagesize): Define it here.
(_dl_map_object_from_fd): Initialize it if zero.
* elf/link.h (_dl_pagesize): Remove const.
Sun Jun 9 04:04:26 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/Makefile (routines): Add dl-symbol.
* elf/dl-lookup.c (_dl_symbol_value): Moved to ...
* elf/dl-symbol.c: New file.
* elf/elf.h (Elf32_Xword, Elf32_Sxword): New types.
(Elf32_Section, Elf64_Section): New types, 16 bits.
(Elf32_Sym, Elf64_Sym): Use it.
* elf/dl-deps.c (_dl_open): Moved to ...
* elf/dl-open.c: New file.
* Makefile (routines): Add dl-open.
* elf/Makefile (dl-routines): New variable.
(routines): Add $(dl-routines).
(elide-routines.so): New variable, set to $(dl-routines).
(libdl-inhibit-o): Variable removed; build all flavors of -ldl.
(rtld-routines): All but rtld, dl-sysdep, and dl-minimal moved to
$(dl-routines).
* elf/dl-lookup.c (_dl_lookup_symbol): Remove magic symbol grokage.
* elf/dladdr.c: Use ELFW(ST_BIND) in place of ELF32_ST_BIND.
* elf/dl-load.c (open_path): Use __ names for open and close. Avoid
using strdup.
(_dl_map_object): Likewise.
(_dl_map_object_from_fd): Use __ names for mmap, munmap, and mprotect.
* elf/dl-minimal.c (malloc): Likewise.
* elf/dl-reloc.c (_dl_relocate_object): Likewise.
* elf/dl-minimal.c (_dl_pagesize): New variable.
(malloc): Use that instead of a static variable.
* elf/dl-reloc.c (_dl_relocate_object): Use _dl_pagesize instead of
calling getpagesize.
* elf/dl-load.c (_dl_map_object_from_fd): Likewise.
* elf/link.h: Declare _dl_pagesize.
* elf/rtld.c (dl_r_debug): Renamed to _dl_r_debug.
* elf/link.h (struct link_map): Use Half for l_phnum instead of Word.
* elf/rtld.c (dl_main): Use Half for phdr count arg.
(_dl_sysdep_start): Update prototype of DL_MAIN function ptr arg.
* elf/dl-load.c (_dl_map_object_from_fd): Use explicit Elf32_Word to
extract 4-byte magic number, not ElfW(Word). Match EI_CLASS against
native wordsize, either 32 or 64.
* elf/elf.h (Elf64_Byte, Elf64_Section): Typedefs removed. In C a
char is always a byte, no need for a typedef. Section indices are
16-bit quantities in elf64, which already have a typedef Elf64_Half.
Remove partial -lelf implementation. There is now a
separately-distributed `libelf' package that implements it.
* elf/dl-lookup.c: Don't #include <libelf.h> any more.
(_dl_elf_hash): New function, moved from
libelf.h:elf_hash.
(_dl_lookup_symbol): Use it instead of elf_hash.
* elf/libelf.h: File removed.
* elf/elf_hash.c: File removed.
* elf/Makefile (headers): Remove libelf.h.
(extra-libs): Remove libelf.
(libelf-routines): Variable removed.
* elf/Makefile (libdl.so): Remove commands from this target. The
implicit rule commands are correct, this explicit rule just serves to
add some dependencies.
* elf/dl-lookup.c (_dl_lookup_symbol): Use ELFW(ST_TYPE) in place of
ELF32_ST_TYPE. Likewise ST_BIND.
* elf/do-rel.h (elf_dynamic_do_rel): Likewise R_SYM.
* elf/link.h (ElfW): New macro for wordsize-independent ElfXX_* type
naming.
(ELFW): New macro, likewise for ELFXX_* macro naming.
(_ElfW, _ElfW_1): New macros, subroutines of ElfW and ELF.
Sat Jun 8 20:52:38 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/link.h, elf/do-rel.h, elf/dynamic-link.h, elf/dl-deps.c,
elf/dl-init.c, elf/dl-load.c, elf/dl-lookup.c, elf/dl-reloc.c,
elf/dl-runtime.c, elf/dladdr.c, elf/dlclose.c, elf/dlsym.c,
elf/linux-compat.c, elf/rtld.c: Change all uses of `Elf32_XXX' to
`ElfW(XXX)' for wordsize-independence.
Sat Jun 8 20:50:42 1996 Richard Henderson <rth@tamu.edu>
* elf/elf.h: Move Elf64_* types in parity with Elf32 counterparts.
(Elf64_auxv_t): New type.
(EM_ALPHA, R_ALPHA_*): New macros for elf64-alpha format.
1996-06-10 10:18:47 +00:00
|
|
|
# But they are absent from the shared libc, because that code is in ld.so.
|
2022-01-14 19:16:05 +00:00
|
|
|
elide-routines.os = \
|
|
|
|
$(all-dl-routines) \
|
2022-05-16 16:41:43 +00:00
|
|
|
dl-early_allocate \
|
2022-01-14 19:16:05 +00:00
|
|
|
dl-exception \
|
|
|
|
dl-origin \
|
|
|
|
dl-reloc-static-pie \
|
|
|
|
dl-support \
|
|
|
|
dl-sysdep \
|
|
|
|
enbl-secure \
|
|
|
|
rtld_static_init \
|
|
|
|
thread_gscope_wait \
|
|
|
|
# elide-routines.os
|
Mon Jun 10 06:14:03 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/mach/hurd/dl-sysdep.c (__open): Define this instead of open.
(__close, __mmap): Likewise define with __ names now.
Mon Jun 10 05:13:18 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/dl-support.c: New file.
* elf/Makefile (CFLAGS-dl-support.c): New variable.
(routines, elide-routines.so): Add dl-support.
* elf/dl-minimal.c (_dl_pagesize): Remove common defn.
* elf/dl-load.c (_dl_pagesize): Define it here.
(_dl_map_object_from_fd): Initialize it if zero.
* elf/link.h (_dl_pagesize): Remove const.
Sun Jun 9 04:04:26 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/Makefile (routines): Add dl-symbol.
* elf/dl-lookup.c (_dl_symbol_value): Moved to ...
* elf/dl-symbol.c: New file.
* elf/elf.h (Elf32_Xword, Elf32_Sxword): New types.
(Elf32_Section, Elf64_Section): New types, 16 bits.
(Elf32_Sym, Elf64_Sym): Use it.
* elf/dl-deps.c (_dl_open): Moved to ...
* elf/dl-open.c: New file.
* Makefile (routines): Add dl-open.
* elf/Makefile (dl-routines): New variable.
(routines): Add $(dl-routines).
(elide-routines.so): New variable, set to $(dl-routines).
(libdl-inhibit-o): Variable removed; build all flavors of -ldl.
(rtld-routines): All but rtld, dl-sysdep, and dl-minimal moved to
$(dl-routines).
* elf/dl-lookup.c (_dl_lookup_symbol): Remove magic symbol grokage.
* elf/dladdr.c: Use ELFW(ST_BIND) in place of ELF32_ST_BIND.
* elf/dl-load.c (open_path): Use __ names for open and close. Avoid
using strdup.
(_dl_map_object): Likewise.
(_dl_map_object_from_fd): Use __ names for mmap, munmap, and mprotect.
* elf/dl-minimal.c (malloc): Likewise.
* elf/dl-reloc.c (_dl_relocate_object): Likewise.
* elf/dl-minimal.c (_dl_pagesize): New variable.
(malloc): Use that instead of a static variable.
* elf/dl-reloc.c (_dl_relocate_object): Use _dl_pagesize instead of
calling getpagesize.
* elf/dl-load.c (_dl_map_object_from_fd): Likewise.
* elf/link.h: Declare _dl_pagesize.
* elf/rtld.c (dl_r_debug): Renamed to _dl_r_debug.
* elf/link.h (struct link_map): Use Half for l_phnum instead of Word.
* elf/rtld.c (dl_main): Use Half for phdr count arg.
(_dl_sysdep_start): Update prototype of DL_MAIN function ptr arg.
* elf/dl-load.c (_dl_map_object_from_fd): Use explicit Elf32_Word to
extract 4-byte magic number, not ElfW(Word). Match EI_CLASS against
native wordsize, either 32 or 64.
* elf/elf.h (Elf64_Byte, Elf64_Section): Typedefs removed. In C a
char is always a byte, no need for a typedef. Section indices are
16-bit quantities in elf64, which already have a typedef Elf64_Half.
Remove partial -lelf implementation. There is now a
separately-distributed `libelf' package that implements it.
* elf/dl-lookup.c: Don't #include <libelf.h> any more.
(_dl_elf_hash): New function, moved from
libelf.h:elf_hash.
(_dl_lookup_symbol): Use it instead of elf_hash.
* elf/libelf.h: File removed.
* elf/elf_hash.c: File removed.
* elf/Makefile (headers): Remove libelf.h.
(extra-libs): Remove libelf.
(libelf-routines): Variable removed.
* elf/Makefile (libdl.so): Remove commands from this target. The
implicit rule commands are correct, this explicit rule just serves to
add some dependencies.
* elf/dl-lookup.c (_dl_lookup_symbol): Use ELFW(ST_TYPE) in place of
ELF32_ST_TYPE. Likewise ST_BIND.
* elf/do-rel.h (elf_dynamic_do_rel): Likewise R_SYM.
* elf/link.h (ElfW): New macro for wordsize-independent ElfXX_* type
naming.
(ELFW): New macro, likewise for ELFXX_* macro naming.
(_ElfW, _ElfW_1): New macros, subroutines of ElfW and ELF.
Sat Jun 8 20:52:38 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/link.h, elf/do-rel.h, elf/dynamic-link.h, elf/dl-deps.c,
elf/dl-init.c, elf/dl-load.c, elf/dl-lookup.c, elf/dl-reloc.c,
elf/dl-runtime.c, elf/dladdr.c, elf/dlclose.c, elf/dlsym.c,
elf/linux-compat.c, elf/rtld.c: Change all uses of `Elf32_XXX' to
`ElfW(XXX)' for wordsize-independence.
Sat Jun 8 20:50:42 1996 Richard Henderson <rth@tamu.edu>
* elf/elf.h: Move Elf64_* types in parity with Elf32 counterparts.
(Elf64_auxv_t): New type.
(EM_ALPHA, R_ALPHA_*): New macros for elf64-alpha format.
1996-06-10 10:18:47 +00:00
|
|
|
|
2021-12-28 21:52:56 +00:00
|
|
|
# These object files are only included in the dynamically-linked libc.
|
|
|
|
shared-only-routines = libc-dl_find_object
|
|
|
|
|
Mon Jun 10 06:14:03 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/mach/hurd/dl-sysdep.c (__open): Define this instead of open.
(__close, __mmap): Likewise define with __ names now.
Mon Jun 10 05:13:18 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/dl-support.c: New file.
* elf/Makefile (CFLAGS-dl-support.c): New variable.
(routines, elide-routines.so): Add dl-support.
* elf/dl-minimal.c (_dl_pagesize): Remove common defn.
* elf/dl-load.c (_dl_pagesize): Define it here.
(_dl_map_object_from_fd): Initialize it if zero.
* elf/link.h (_dl_pagesize): Remove const.
Sun Jun 9 04:04:26 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/Makefile (routines): Add dl-symbol.
* elf/dl-lookup.c (_dl_symbol_value): Moved to ...
* elf/dl-symbol.c: New file.
* elf/elf.h (Elf32_Xword, Elf32_Sxword): New types.
(Elf32_Section, Elf64_Section): New types, 16 bits.
(Elf32_Sym, Elf64_Sym): Use it.
* elf/dl-deps.c (_dl_open): Moved to ...
* elf/dl-open.c: New file.
* Makefile (routines): Add dl-open.
* elf/Makefile (dl-routines): New variable.
(routines): Add $(dl-routines).
(elide-routines.so): New variable, set to $(dl-routines).
(libdl-inhibit-o): Variable removed; build all flavors of -ldl.
(rtld-routines): All but rtld, dl-sysdep, and dl-minimal moved to
$(dl-routines).
* elf/dl-lookup.c (_dl_lookup_symbol): Remove magic symbol grokage.
* elf/dladdr.c: Use ELFW(ST_BIND) in place of ELF32_ST_BIND.
* elf/dl-load.c (open_path): Use __ names for open and close. Avoid
using strdup.
(_dl_map_object): Likewise.
(_dl_map_object_from_fd): Use __ names for mmap, munmap, and mprotect.
* elf/dl-minimal.c (malloc): Likewise.
* elf/dl-reloc.c (_dl_relocate_object): Likewise.
* elf/dl-minimal.c (_dl_pagesize): New variable.
(malloc): Use that instead of a static variable.
* elf/dl-reloc.c (_dl_relocate_object): Use _dl_pagesize instead of
calling getpagesize.
* elf/dl-load.c (_dl_map_object_from_fd): Likewise.
* elf/link.h: Declare _dl_pagesize.
* elf/rtld.c (dl_r_debug): Renamed to _dl_r_debug.
* elf/link.h (struct link_map): Use Half for l_phnum instead of Word.
* elf/rtld.c (dl_main): Use Half for phdr count arg.
(_dl_sysdep_start): Update prototype of DL_MAIN function ptr arg.
* elf/dl-load.c (_dl_map_object_from_fd): Use explicit Elf32_Word to
extract 4-byte magic number, not ElfW(Word). Match EI_CLASS against
native wordsize, either 32 or 64.
* elf/elf.h (Elf64_Byte, Elf64_Section): Typedefs removed. In C a
char is always a byte, no need for a typedef. Section indices are
16-bit quantities in elf64, which already have a typedef Elf64_Half.
Remove partial -lelf implementation. There is now a
separately-distributed `libelf' package that implements it.
* elf/dl-lookup.c: Don't #include <libelf.h> any more.
(_dl_elf_hash): New function, moved from
libelf.h:elf_hash.
(_dl_lookup_symbol): Use it instead of elf_hash.
* elf/libelf.h: File removed.
* elf/elf_hash.c: File removed.
* elf/Makefile (headers): Remove libelf.h.
(extra-libs): Remove libelf.
(libelf-routines): Variable removed.
* elf/Makefile (libdl.so): Remove commands from this target. The
implicit rule commands are correct, this explicit rule just serves to
add some dependencies.
* elf/dl-lookup.c (_dl_lookup_symbol): Use ELFW(ST_TYPE) in place of
ELF32_ST_TYPE. Likewise ST_BIND.
* elf/do-rel.h (elf_dynamic_do_rel): Likewise R_SYM.
* elf/link.h (ElfW): New macro for wordsize-independent ElfXX_* type
naming.
(ELFW): New macro, likewise for ELFXX_* macro naming.
(_ElfW, _ElfW_1): New macros, subroutines of ElfW and ELF.
Sat Jun 8 20:52:38 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/link.h, elf/do-rel.h, elf/dynamic-link.h, elf/dl-deps.c,
elf/dl-init.c, elf/dl-load.c, elf/dl-lookup.c, elf/dl-reloc.c,
elf/dl-runtime.c, elf/dladdr.c, elf/dlclose.c, elf/dlsym.c,
elf/linux-compat.c, elf/rtld.c: Change all uses of `Elf32_XXX' to
`ElfW(XXX)' for wordsize-independence.
Sat Jun 8 20:50:42 1996 Richard Henderson <rth@tamu.edu>
* elf/elf.h: Move Elf64_* types in parity with Elf32 counterparts.
(Elf64_auxv_t): New type.
(EM_ALPHA, R_ALPHA_*): New macros for elf64-alpha format.
1996-06-10 10:18:47 +00:00
|
|
|
# ld.so uses those routines, plus some special stuff for being the program
|
|
|
|
# interpreter and operating independent of libc.
|
2022-01-14 19:16:05 +00:00
|
|
|
rtld-routines = \
|
|
|
|
$(all-dl-routines) \
|
|
|
|
dl-audit \
|
2022-01-27 15:03:58 +00:00
|
|
|
dl-compat \
|
2022-01-14 19:16:05 +00:00
|
|
|
dl-diagnostics \
|
|
|
|
dl-diagnostics-cpu \
|
|
|
|
dl-diagnostics-kernel \
|
|
|
|
dl-environ \
|
|
|
|
dl-error-minimal \
|
|
|
|
dl-hwcaps \
|
|
|
|
dl-hwcaps-subdirs \
|
|
|
|
dl-hwcaps_split \
|
|
|
|
dl-libc_freeres \
|
|
|
|
dl-minimal \
|
|
|
|
dl-mutex \
|
|
|
|
dl-sysdep \
|
|
|
|
dl-usage \
|
|
|
|
rtld \
|
|
|
|
# rtld-routines
|
|
|
|
|
2000-09-07 21:34:51 +00:00
|
|
|
all-rtld-routines = $(rtld-routines) $(sysdep-rtld-routines)
|
2000-09-05 02:41:25 +00:00
|
|
|
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-dl-runtime.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-dl-lookup.c += -fexceptions -fasynchronous-unwind-tables
|
2021-03-02 09:46:45 +00:00
|
|
|
CFLAGS-dl-iteratephdr.c += $(uses-callbacks)
|
2003-06-01 08:52:38 +00:00
|
|
|
|
2021-11-03 14:20:50 +00:00
|
|
|
# Called during static library initialization, so turn stack-protection
|
|
|
|
# off for non-shared builds.
|
|
|
|
CFLAGS-dl-minimal-malloc.o = $(no-stack-protector)
|
|
|
|
CFLAGS-dl-minimal-malloc.op = $(no-stack-protector)
|
|
|
|
|
2019-11-21 02:10:40 +00:00
|
|
|
# On targets without __builtin_memset, rtld.c uses a hand-coded loop
|
|
|
|
# in _dl_start. Make sure this isn't turned into a call to regular memset.
|
|
|
|
ifeq (yes,$(have-loop-to-function))
|
|
|
|
CFLAGS-rtld.c += -fno-tree-loop-distribute-patterns
|
2022-02-28 10:50:41 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq (yes,$(have-loop-to-function))
|
|
|
|
# Likewise, during static library startup, memset is not yet available.
|
|
|
|
CFLAGS-dl-support.c = -fno-tree-loop-distribute-patterns
|
2019-11-21 02:10:40 +00:00
|
|
|
endif
|
|
|
|
|
2016-12-26 09:08:48 +00:00
|
|
|
# Compile rtld itself without stack protection.
|
|
|
|
# Also compile all routines in the static library that are elided from
|
|
|
|
# the shared libc because they are in libc.a in the same way.
|
|
|
|
|
|
|
|
CFLAGS-.o += $(call elide-stack-protector,.o,$(elide-routines.os))
|
|
|
|
CFLAGS-.op += $(call elide-stack-protector,.op,$(elide-routines.os))
|
|
|
|
CFLAGS-.os += $(call elide-stack-protector,.os,$(all-rtld-routines))
|
|
|
|
|
2022-01-14 19:16:05 +00:00
|
|
|
# Add the requested compiler flags to the early startup code.
|
|
|
|
CFLAGS-dl-printf.os += $(rtld-early-cflags)
|
2022-01-18 12:53:11 +00:00
|
|
|
CFLAGS-dl-setup_hash.os += $(rtld-early-cflags)
|
2022-01-14 19:16:05 +00:00
|
|
|
CFLAGS-dl-sysdep.os += $(rtld-early-cflags)
|
|
|
|
CFLAGS-dl-tunables.os += $(rtld-early-cflags)
|
|
|
|
CFLAGS-dl-write.os += $(rtld-early-cflags)
|
|
|
|
CFLAGS-dl-writev.os += $(rtld-early-cflags)
|
|
|
|
CFLAGS-rtld.os += $(rtld-early-cflags)
|
|
|
|
|
2001-11-16 01:27:24 +00:00
|
|
|
ifeq ($(unwind-find-fde),yes)
|
2002-01-08 06:28:46 +00:00
|
|
|
routines += unwind-dw2-fde-glibc
|
2004-05-29 22:29:35 +00:00
|
|
|
shared-only-routines += unwind-dw2-fde-glibc
|
2001-11-16 01:27:24 +00:00
|
|
|
endif
|
|
|
|
|
2014-02-28 21:00:27 +00:00
|
|
|
before-compile += $(objpfx)trusted-dirs.h
|
|
|
|
generated += trusted-dirs.h trusted-dirs.st for-renamed/renamed.so
|
|
|
|
generated-dirs += for-renamed
|
1997-01-21 06:10:42 +00:00
|
|
|
|
2013-09-04 15:25:42 +00:00
|
|
|
ifeq ($(build-shared),yes)
|
2000-04-21 03:43:31 +00:00
|
|
|
ld-map = $(common-objpfx)ld.map
|
1998-07-30 12:47:25 +00:00
|
|
|
endif
|
|
|
|
|
1995-05-02 06:35:55 +00:00
|
|
|
ifeq (yes,$(build-shared))
|
2022-01-14 19:16:05 +00:00
|
|
|
extra-objs = \
|
|
|
|
$(all-rtld-routines:%=%.os) \
|
|
|
|
sofini.os \
|
|
|
|
interp.os \
|
|
|
|
# extra-objs
|
|
|
|
generated += \
|
|
|
|
dl-allobjs.os \
|
|
|
|
ld.so ldd \
|
|
|
|
librtld.os \
|
|
|
|
# generated
|
2021-12-10 15:06:36 +00:00
|
|
|
install-others = $(inst_rtlddir)/$(rtld-installed-name) $(inst_bindir)/ld.so
|
2001-08-29 23:31:38 +00:00
|
|
|
install-bin-script = ldd
|
1996-07-02 21:53:43 +00:00
|
|
|
endif
|
1995-11-07 21:46:52 +00:00
|
|
|
|
2014-05-05 20:16:08 +00:00
|
|
|
others = sprof sln
|
|
|
|
install-bin = sprof
|
1998-08-13 19:44:05 +00:00
|
|
|
others-static = sln
|
|
|
|
install-rootsbin = sln
|
2012-07-03 19:14:59 +00:00
|
|
|
sln-modules := static-stubs
|
|
|
|
extra-objs += $(sln-modules:=.o)
|
1998-03-02 18:02:11 +00:00
|
|
|
|
1999-12-04 08:00:00 +00:00
|
|
|
ifeq (yes,$(use-ldconfig))
|
2000-06-07 16:53:48 +00:00
|
|
|
ifeq (yes,$(build-shared))
|
Update.
1998-02-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/syscalls.list: Don't mark lchown as
extra syscall.
* grp/Makefile: Fix logic when checking for thread package.
* pwd/Makefile: Likewise.
1998-02-11 08:23 H.J. Lu <hjl@gnu.org>
* elf/Makefile (rtld-map): Replaced by libc-map.
* elf/rtld.map: Removed.
* libc.map (__libc_enable_secure, _dl_catch_error,
_dl_check_all_versions, _dl_debug_initialize, _dl_debug_state,
_dl_default_scope, _dl_global_scope_end, _dl_init_next,
_dl_lookup_symbol, _dl_map_object, _dl_map_object_deps,
_dl_object_relocation_scope, _dl_relocate_object,
_dl_signal_error, _dl_starting_up, _dl_sysdep_start,
_r_debug): Added for ld.so.
1998-02-10 08:38 H.J. Lu <hjl@gnu.org>
* libio/iofclose.c: Check PIC && DO_VERSIONING instead of
DO_VERSIONING.
* libio/iofdopen.c: Ditto.
* libio/iofopen.c: Ditto.
* libio/oldfileops.c: Ditto.
* libc.map (sys_nerr, _sys_errlist, sys_errlist): Added for
version GLIBC_2.1.
* sysdeps/unix/sysv/linux/Makefile (stdio-common): Removed
oldsiglist from sysdep_routines and shared-only-routines.
* sysdeps/unix/sysv/linux/errlist.c: New.
* sysdeps/unix/sysv/linux/errlist.h: New.
* sysdeps/unix/sysv/linux/sizes.h: New.
* sysdeps/unix/sysv/linux/alpha/sizes.h: New.
* sysdeps/unix/sysv/linux/sparc64/sizes.h: New.
* sysdeps/unix/sysv/linux/oldsiglist.c: Removed.
* sysdeps/unix/sysv/linux/siglist.c: Include <sizes.h>.
(__old_sys_siglist, __old_sys_sigabbrev): Use ELF .size
directive.
* sysdeps/unix/sysv/linux/siglist.h (OLD_SIGLIST_SIZE_STR): New.
* sysdeps/unix/sysv/linux/Dist (errlist.h, sizes.h.): Added.
(oldsiglist.c): Removed.
* sysdeps/gnu/errlist.awk (SYS_SIGLIST, SYS_NERR): New.
(_sys_siglist): Use SYS_SIGLIST instead.
(_sys_nerr): Use SYS_NERR instead.
* sysdeps/gnu/errlist.c: Rebuilt.
1998-02-11 08:35 H.J. Lu <hjl@gnu.org>
* elf/Makefile (others-static): New, set to ldconfig.
($(objpfx)ldconfig): Removed.
* Rules (binaries-all, binaries-static, binaries-shared): New.
Create targets for $(binaries-static) and $(binaries-shared).
* Makeconfig (+link-static, link-libc-static,
link-extra-libs-static): New for static linking.
1998-02-12 18:22:41 +00:00
|
|
|
others-static += ldconfig
|
Update.
1998-02-10 23:57 Ulrich Drepper <drepper@happy.cygnus.com>
* misc/tst-efgcvt.c: Add more tests.
* misc/efgcvt_r.c: Correct result for above new tests.
1998-02-06 17:22 H.J. Lu <hjl@gnu.org>
* misc/efgcvt_r.c (fcvt_r, ecvt_r): Correctly handle
NDIGIT <= 0.
1998-02-10 16:48 Philip Blundell <pb@nexus.co.uk>
* Makerules (install-no-libc.a-nosubdir): Don't install-bin (etc)
if the programs weren't built.
1998-02-09 10:12 Philip Blundell <pb@nexus.co.uk>
* sysdeps/libm-ieee754/s_exp2.c (__ieee754_exp2): If we don't have
FE_TONEAREST, soldier on regardless and do the best we can.
* sysdeps/libm-ieee754/s_exp2f.c (__ieee754_exp2f): likewise.
1998-02-5 17:20 Philip Blundell <pb@nexus.co.uk>
* sysdeps/standalone/filedesc.h: Define __need_FOPEN_MAX, not
_STDIO_H, before including <bits/stdio_lim.h>.
* sysdeps/standalone/arm/bits/errno.h (EOVERFLOW): Added.
* io/fts.c (fts_build): Don't try to use d_type if it doesn't
exist.
* sysdeps/arm/sys/ucontext.h: New file.
1998-02-04 10:11 Philip Blundell <pb@nexus.co.uk>
* manual/stdio.texi (Formatted Output Functions): Explicitly say
that the return value from snprintf() does not count the
terminating NUL as a character.
1998-02-10 16:57 Ulrich Drepper <drepper@happy.cygnus.com>
* manual/users.texi: Rewrite to describe correct POSIX behaviour,
add description for sete[ug]id and general cleanup.
Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>.
1998-01-04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile (parent-clean): Don't remove makefile fragments here.
(postclean): New variable.
(clean): Remove makefile fragments here.
(realclean distclean): Likewise. Pass sysdep-subdirs to sub-make.
(generated): Add isomac and isomanc.out.
* Makeconfig ($(common-objpfx)soversions.mk): Don't generate if
avoid-generated is set.
(postclean-generated): Add soversion.mk.
($(common-objpfx)version.mk): Don't include if avoid-generated is
set.
* Makerules: Still need to include $(+sysdir_pfx)sysd-Makefile if
avoid-generated is set.
(common-generated): Add libc.so and libc.so$(libc.so-version).
(generated): Add versioned libraries.
(common-mostlyclean): Also remove %.so and %_pic.a.
* csu/Makefile (generated): Add abi-tag.h.
* db2/Makefile (extra-objs): Add getlong.o.
* elf/Makefile (generated): Add ld.so, ldd and
$(rtld-installed-name).
(others): Add ldconfig here instead of ldconfig.o to extra-objs.
* malloc/Makefile (generated): Add mtrace.
* po/Makefile: Don't include version.mk, not needed any more.
* sunrpc/Makefile (generated): Add rpc-proto.d and rpcgen.
* sysdeps/unix/Makefile: Fix local_lim.h -> bits/local_lim.h,
syscall.h -> sys/syscall.h.
(common-generated): Add s-proto.d.
(postclean-generated): Add sysd-syscalls.
* localedata/Makefile (test-output): Add all output files.
(generated): Add test-input and test-output.
(generated-dirs): Add all the dirs.
1998-01-04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile (test-output, generated, generated-dirs): New
variables.
1998-02-10 16:57 Ulrich Drepper <drepper@happy.cygnus.com>
* resolv/nss_dns/dns-host.c: Various code cleanups.
1998-02-09 08:10 H.J. Lu <hjl@gnu.org>
* resolv/gethnamaddr.c (getanswer): Fix the PTR/CNAME bug.
From Philip Blundell <pb@nexus.co.uk>.
* resolv/nss_dns/dns-host.c (getanswer_r): Ditto.
1998-02-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* libc.map: Add .rem, .div, .mul, .udiv, .umul, .urem for Sparc.
Suggested by debian/sparc porters.
1998-02-07 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* misc/tst-efgcvt.c: Totally rewritten, added a lot of new tests
for ecvt and fcvt.
1998-02-10 16:32 Ulrich Drepper <drepper@happy.cygnus.com>
* sysdeps/unix/sysv/linux/ptsname.c (__ptsname_r): Use __xstat and
__fxstat instead of stat and fstat. Use namespace clean __stpcpy.
* signal/signal.h: Always define sigset_t if __need_sigset_t is
defined even if __USE_POSIX is not defined.
1998-02-02 20:51 Zack Weinberg <zack@rabi.phys.columbia.edu>
* sysdeps/unix/sysv/linux/ptsname.c (__ptsname_r): Correct last patch
to support obsolete tty major numbers correctly.
1998-02-02 08:47 H.J. Lu <hjl@gnu.org>
* login/Makefile ($(inst_libexecdir)/pt_chown): Make the target
directory first and ignore install error.
* sysdeps/unix/sysv/linux/ptsname.c (__ptsname_r): Substract
128 from ptyno and fix a typo for the BSD style pty.
1998-02-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/Makefile ($(common-objpfx)s-proto.d): Depend on all
syscalls.list's.
1998-02-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
getresuid and getresgid.
* sysdeps/unix/sysv/linux/getresuid.c: New file.
* sysdeps/unix/sysv/linux/getresgid.c: New file.
* sysdeps/unix/sysv/linux/syscalls.list: Remove getres[ug]id, add
s_getres[ug]id.
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Add getres[ug]id.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Likewise.
1998-02-02 08:11 H.J. Lu <hjl@gnu.org>
* nscd/grpcache.c: Include <stdlib.h>.
1998-02-01 16:01 H.J. Lu <hjl@gnu.org>
* stdlib/atoll.c: Fix comments.
* sysdeps/posix/ttyname.c: Ignore stdin/stdout/stderr.
* sysdeps/posix/ttyname_r.c: Ditto.
1998-02-03 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* io/sys/stat.h: Define S_IFLNK and S_IFSOCK if __USE_BSD or
__USE_MISC, independent of __USE_UNIX98.
1998-02-10 19:18 Ulrich Drepper <drepper@happy.cygnus.com>
* sysdeps/unix/sysv/linux/i386/sigaction.c (__libc_missing_rt_sigs):
Rename from __libc_have_rt_sigs and leave as COMMON data.
1998-02-04 11:58 Richard Henderson <rth@twiddle.rth.home>
* Makeconfig (CFLAGS-.os): Kill -fno-common.
* Makerules (libc.so): Prelink libc_pic.a, allocating commons.
* libc.map (GLIBC_2.1): Add Linux/Alpha tv64 symbols.
* elf/rtld.map: New file. Needed to define the GLIBC_2.*
version symbols.
* include/libc-symbols.h (symbol_version, default_symbol_version):
Provide asm versions and correct !DO_VERSIONING versions.
* sysdeps/unix/make-syscalls.sh: Recognize version symbols in
the weak symbol list.
* sysdeps/unix/sysv/linux/sigaction.c (__libc_missing_rt_sigs):
Rename from __libc_have_rt_sigs and leave as COMMON data.
* sysdeps/unix/sysv/linux/sigpending.c: Likewise.
* sysdeps/unix/sysv/linux/sigprocmask.c: Likewise.
* sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.
1998-02-04 16:41 Zack Weinberg <zack@rabi.phys.columbia.edu>
* sunrpc/Makefile: Correct dependencies of rpcgen.
1998-02-10 03:00 Ulrich Drepper <drepper@happy.cygnus.com>
* nscd/Makefile: Fix test for available linuxthreads add-on.
Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>.
1998-02-05 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/unix/sysv/linux/syscalls.list: Fix typo in lchown.
1998-02-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/gnu/Makefile: Respect with-cvs variable.
* manual/errno.texi (Error Messages): Correct description of
strerror_r. Pointed out by jonas@bagge.se.
1998-01-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* manual/socket.texi (Host Address Functions): Clarify description
of inet_network.
1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/grantpt.c (argv): Move const to toplevel.
(grantpt): Delete superfluous cast.
1998-02-06 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile ($(inst_slibdir)/libc-$(version).so): Depend on
elf/ldso_install instead of elf/subdir_install.
(elf/ldso_install): New target.
* elf/Makefile (ldso_install): New target.
1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/powerpc/socket.S: Really do the change
of 1998-01-06.
1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* string/bits/string2.h (strcmp): Use __string2_1bptr_p only for
constant expressions.
1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* nss/test-netdb.c: Include <unistd.h> for gethostname and "nss.h"
for __nss_configure_lookup.
(output_hostent): Remove unused variable.
1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* string/tst-inlcall.c: Fix format string.
1998-02-09 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* inet/netinet/in.h: Rename second parameter of bindresvport to
avoid buggy gcc warning. [PR libc/412]
1998-02-10 20:06:30 +00:00
|
|
|
others += ldconfig
|
1998-08-13 19:44:05 +00:00
|
|
|
install-rootsbin += ldconfig
|
1999-12-04 08:00:00 +00:00
|
|
|
|
2022-01-14 19:16:05 +00:00
|
|
|
ldconfig-modules := \
|
|
|
|
cache \
|
|
|
|
chroot_canon \
|
|
|
|
readlib \
|
|
|
|
static-stubs \
|
|
|
|
stringtable \
|
|
|
|
xmalloc \
|
|
|
|
xstrdup \
|
|
|
|
# ldconfig-modules
|
1999-12-04 08:00:00 +00:00
|
|
|
extra-objs += $(ldconfig-modules:=.o)
|
2017-07-30 04:04:09 +00:00
|
|
|
others-extras = $(ldconfig-modules)
|
2012-05-10 22:26:10 +00:00
|
|
|
endif
|
|
|
|
endif
|
1999-12-04 08:00:00 +00:00
|
|
|
|
|
|
|
# To find xmalloc.c and xstrdup.c
|
|
|
|
vpath %.c ../locale/programs
|
|
|
|
|
2014-01-25 05:33:48 +00:00
|
|
|
ifeq ($(build-shared),yes)
|
2011-05-28 17:20:12 +00:00
|
|
|
extra-objs += sotruss-lib.os sotruss-lib.so
|
|
|
|
install-others += $(inst_auditdir)/sotruss-lib.so
|
2011-05-28 18:22:06 +00:00
|
|
|
install-bin-script += sotruss
|
2011-05-28 17:20:12 +00:00
|
|
|
generated += sotruss
|
2014-11-20 06:34:26 +00:00
|
|
|
libof-sotruss-lib = extramodules
|
2019-04-26 05:16:56 +00:00
|
|
|
LDFLAGS-sotruss-lib.so += $(z-now-$(bind-now))
|
2011-07-15 03:49:27 +00:00
|
|
|
$(objpfx)sotruss-lib.so: $(objpfx)sotruss-lib.os
|
2011-05-28 17:20:12 +00:00
|
|
|
$(build-module-asneeded)
|
|
|
|
$(objpfx)sotruss-lib.so: $(common-objpfx)libc.so $(objpfx)ld.so \
|
|
|
|
$(common-objpfx)libc_nonshared.a
|
|
|
|
|
2014-01-25 05:33:48 +00:00
|
|
|
$(objpfx)sotruss: sotruss.sh $(common-objpfx)config.make
|
2021-05-12 02:15:33 +00:00
|
|
|
sed -e 's%@VERSION@%$(version)%g' \
|
2016-02-25 01:06:04 +00:00
|
|
|
-e 's%@TEXTDOMAINDIR@%$(localedir)%g' \
|
2012-11-09 22:13:45 +00:00
|
|
|
-e 's%@PREFIX@%$(prefix)%g' \
|
|
|
|
-e 's|@PKGVERSION@|$(PKGVERSION)|g' \
|
|
|
|
-e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \
|
|
|
|
< $< > $@.new
|
2011-05-28 17:20:12 +00:00
|
|
|
chmod 555 $@.new
|
|
|
|
mv -f $@.new $@
|
|
|
|
$(inst_auditdir)/sotruss-lib.so: $(objpfx)sotruss-lib.so $(+force)
|
|
|
|
$(do-install-program)
|
|
|
|
endif
|
|
|
|
|
2022-01-14 19:16:05 +00:00
|
|
|
tests-static-normal := \
|
|
|
|
tst-array1-static \
|
|
|
|
tst-array5-static \
|
|
|
|
tst-dl-iter-static \
|
|
|
|
tst-dst-static \
|
|
|
|
tst-env-setuid \
|
|
|
|
tst-env-setuid-tunables \
|
|
|
|
tst-getauxval-static \
|
|
|
|
tst-linkall-static \
|
|
|
|
tst-single_threaded-pthread-static \
|
|
|
|
tst-single_threaded-static \
|
2022-05-16 16:41:43 +00:00
|
|
|
tst-tls-allocation-failure-static \
|
2022-01-14 19:16:05 +00:00
|
|
|
tst-tlsalign-extern-static \
|
|
|
|
tst-tlsalign-static \
|
|
|
|
# tests-static-normal
|
|
|
|
|
|
|
|
tests-static-internal := \
|
|
|
|
tst-dl_find_object-static \
|
|
|
|
tst-ptrguard1-static \
|
|
|
|
tst-stackguard1-static \
|
|
|
|
tst-tls1-static \
|
|
|
|
tst-tls1-static-non-pie \
|
|
|
|
# tests-static-internal
|
2017-09-30 08:39:14 +00:00
|
|
|
|
2017-10-05 00:15:50 +00:00
|
|
|
CRT-tst-tls1-static-non-pie := $(csu-objpfx)crt1.o
|
Add --enable-static-pie configure option to build static PIE [BZ #19574]
Static PIE extends address space layout randomization to static
executables. It provides additional security hardening benefits at
the cost of some memory and performance.
Dynamic linker, ld.so, is a standalone program which can be loaded at
any address. This patch adds a configure option, --enable-static-pie,
to embed the part of ld.so in static executable to create static position
independent executable (static PIE). A static PIE is similar to static
executable, but can be loaded at any address without help from a dynamic
linker. When --enable-static-pie is used to configure glibc, libc.a is
built as PIE and all static executables, including tests, are built as
static PIE. The resulting libc.a can be used together with GCC 8 or
above to build static PIE with the compiler option, -static-pie. But
GCC 8 isn't required to build glibc with --enable-static-pie. Only GCC
with PIE support is needed. When an older GCC is used to build glibc
with --enable-static-pie, proper input files are passed to linker to
create static executables as static PIE, together with "-z text" to
prevent dynamic relocations in read-only segments, which are not allowed
in static PIE.
The following changes are made for static PIE:
1. Add a new function, _dl_relocate_static_pie, to:
a. Get the run-time load address.
b. Read the dynamic section.
c. Perform dynamic relocations.
Dynamic linker also performs these steps. But static PIE doesn't load
any shared objects.
2. Call _dl_relocate_static_pie at entrance of LIBC_START_MAIN in
libc.a. crt1.o, which is used to create dynamic and non-PIE static
executables, is updated to include a dummy _dl_relocate_static_pie.
rcrt1.o is added to create static PIE, which will link in the real
_dl_relocate_static_pie. grcrt1.o is also added to create static PIE
with -pg. GCC 8 has been updated to support rcrt1.o and grcrt1.o for
static PIE.
Static PIE can work on all architectures which support PIE, provided:
1. Target must support accessing of local functions without dynamic
relocations, which is needed in start.S to call __libc_start_main with
function addresses of __libc_csu_init, __libc_csu_fini and main. All
functions in static PIE are local functions. If PIE start.S can't reach
main () defined in a shared object, the code sequence:
pass address of local_main to __libc_start_main
...
local_main:
tail call to main via PLT
can be used.
2. start.S is updated to check PIC instead SHARED for PIC code path and
avoid dynamic relocation, when PIC is defined and SHARED isn't defined,
to support static PIE.
3. All assembly codes are updated check PIC instead SHARED for PIC code
path to avoid dynamic relocations in read-only sections.
4. All assembly codes are updated check SHARED instead PIC for static
symbol name.
5. elf_machine_load_address in dl-machine.h are updated to support static
PIE.
6. __brk works without TLS nor dynamic relocations in read-only section
so that it can be used by __libc_setup_tls to initializes TLS in static
PIE.
NB: When glibc is built with GCC defaulted to PIE, libc.a is compiled
with -fPIE, regardless if --enable-static-pie is used to configure glibc.
When glibc is configured with --enable-static-pie, libc.a is compiled
with -fPIE, regardless whether GCC defaults to PIE or not. The same
libc.a can be used to build both static executable and static PIE.
There is no need for separate PIE copy of libc.a.
On x86-64, the normal static sln:
text data bss dec hex filename
625425 8284 5456 639165 9c0bd elf/sln
the static PIE sln:
text data bss dec hex filename
657626 20636 5392 683654 a6e86 elf/sln
The code size is increased by 5% and the binary size is increased by 7%.
Linker requirements to build glibc with --enable-static-pie:
1. Linker supports --no-dynamic-linker to remove PT_INTERP segment from
static PIE.
2. Linker can create working static PIE. The x86-64 linker needs the
fix for
https://sourceware.org/bugzilla/show_bug.cgi?id=21782
The i386 linker needs to be able to convert "movl main@GOT(%ebx), %eax"
to "leal main@GOTOFF(%ebx), %eax" if main is defined locally.
Binutils 2.29 or above are OK for i686 and x86-64. But linker status for
other targets need to be verified.
3. Linker should resolve undefined weak symbols to 0 in static PIE:
https://sourceware.org/bugzilla/show_bug.cgi?id=22269
4. Many ELF backend linkers incorrectly check bfd_link_pic for TLS
relocations, which should check bfd_link_executable instead:
https://sourceware.org/bugzilla/show_bug.cgi?id=22263
Tested on aarch64, i686 and x86-64.
Using GCC 7 and binutils master branch, build-many-glibcs.py with
--enable-static-pie with all patches for static PIE applied have the
following build successes:
PASS: glibcs-aarch64_be-linux-gnu build
PASS: glibcs-aarch64-linux-gnu build
PASS: glibcs-armeb-linux-gnueabi-be8 build
PASS: glibcs-armeb-linux-gnueabi build
PASS: glibcs-armeb-linux-gnueabihf-be8 build
PASS: glibcs-armeb-linux-gnueabihf build
PASS: glibcs-arm-linux-gnueabi build
PASS: glibcs-arm-linux-gnueabihf build
PASS: glibcs-arm-linux-gnueabihf-v7a build
PASS: glibcs-arm-linux-gnueabihf-v7a-disable-multi-arch build
PASS: glibcs-m68k-linux-gnu build
PASS: glibcs-microblazeel-linux-gnu build
PASS: glibcs-microblaze-linux-gnu build
PASS: glibcs-mips64el-linux-gnu-n32 build
PASS: glibcs-mips64el-linux-gnu-n32-nan2008 build
PASS: glibcs-mips64el-linux-gnu-n32-nan2008-soft build
PASS: glibcs-mips64el-linux-gnu-n32-soft build
PASS: glibcs-mips64el-linux-gnu-n64 build
PASS: glibcs-mips64el-linux-gnu-n64-nan2008 build
PASS: glibcs-mips64el-linux-gnu-n64-nan2008-soft build
PASS: glibcs-mips64el-linux-gnu-n64-soft build
PASS: glibcs-mips64-linux-gnu-n32 build
PASS: glibcs-mips64-linux-gnu-n32-nan2008 build
PASS: glibcs-mips64-linux-gnu-n32-nan2008-soft build
PASS: glibcs-mips64-linux-gnu-n32-soft build
PASS: glibcs-mips64-linux-gnu-n64 build
PASS: glibcs-mips64-linux-gnu-n64-nan2008 build
PASS: glibcs-mips64-linux-gnu-n64-nan2008-soft build
PASS: glibcs-mips64-linux-gnu-n64-soft build
PASS: glibcs-mipsel-linux-gnu build
PASS: glibcs-mipsel-linux-gnu-nan2008 build
PASS: glibcs-mipsel-linux-gnu-nan2008-soft build
PASS: glibcs-mipsel-linux-gnu-soft build
PASS: glibcs-mips-linux-gnu build
PASS: glibcs-mips-linux-gnu-nan2008 build
PASS: glibcs-mips-linux-gnu-nan2008-soft build
PASS: glibcs-mips-linux-gnu-soft build
PASS: glibcs-nios2-linux-gnu build
PASS: glibcs-powerpc64le-linux-gnu build
PASS: glibcs-powerpc64-linux-gnu build
PASS: glibcs-tilegxbe-linux-gnu-32 build
PASS: glibcs-tilegxbe-linux-gnu build
PASS: glibcs-tilegx-linux-gnu-32 build
PASS: glibcs-tilegx-linux-gnu build
PASS: glibcs-tilepro-linux-gnu build
and the following build failures:
FAIL: glibcs-alpha-linux-gnu build
elf/sln is failed to link due to:
assertion fail bfd/elf64-alpha.c:4125
This is caused by linker bug and/or non-PIC code in PIE libc.a.
FAIL: glibcs-hppa-linux-gnu build
elf/sln is failed to link due to:
collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
https://sourceware.org/bugzilla/show_bug.cgi?id=22537
FAIL: glibcs-ia64-linux-gnu build
elf/sln is failed to link due to:
collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
FAIL: glibcs-powerpc-linux-gnu build
FAIL: glibcs-powerpc-linux-gnu-soft build
FAIL: glibcs-powerpc-linux-gnuspe build
FAIL: glibcs-powerpc-linux-gnuspe-e500v1 build
elf/sln is failed to link due to:
ld: read-only segment has dynamic relocations.
This is caused by linker bug and/or non-PIC code in PIE libc.a. See:
https://sourceware.org/bugzilla/show_bug.cgi?id=22264
FAIL: glibcs-powerpc-linux-gnu-power4 build
elf/sln is failed to link due to:
findlocale.c:96:(.text+0x22c): @local call to ifunc memchr
This is caused by linker bug and/or non-PIC code in PIE libc.a.
FAIL: glibcs-s390-linux-gnu build
elf/sln is failed to link due to:
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
assertion fail bfd/elflink.c:14299
This is caused by linker bug and/or non-PIC code in PIE libc.a.
FAIL: glibcs-sh3eb-linux-gnu build
FAIL: glibcs-sh3-linux-gnu build
FAIL: glibcs-sh4eb-linux-gnu build
FAIL: glibcs-sh4eb-linux-gnu-soft build
FAIL: glibcs-sh4-linux-gnu build
FAIL: glibcs-sh4-linux-gnu-soft build
elf/sln is failed to link due to:
ld: read-only segment has dynamic relocations.
This is caused by linker bug and/or non-PIC code in PIE libc.a. See:
https://sourceware.org/bugzilla/show_bug.cgi?id=22263
Also TLS code sequence in SH assembly syscalls in glibc doesn't match TLS
code sequence expected by ld:
https://sourceware.org/bugzilla/show_bug.cgi?id=22270
FAIL: glibcs-sparc64-linux-gnu build
FAIL: glibcs-sparcv9-linux-gnu build
FAIL: glibcs-tilegxbe-linux-gnu build
FAIL: glibcs-tilegxbe-linux-gnu-32 build
FAIL: glibcs-tilegx-linux-gnu build
FAIL: glibcs-tilegx-linux-gnu-32 build
FAIL: glibcs-tilepro-linux-gnu build
elf/sln is failed to link due to:
ld: read-only segment has dynamic relocations.
This is caused by linker bug and/or non-PIC code in PIE libc.a. See:
https://sourceware.org/bugzilla/show_bug.cgi?id=22263
[BZ #19574]
* INSTALL: Regenerated.
* Makeconfig (real-static-start-installed-name): New.
(pic-default): Updated for --enable-static-pie.
(pie-default): New for --enable-static-pie.
(default-pie-ldflag): Likewise.
(+link-static-before-libc): Replace $(DEFAULT-LDFLAGS-$(@F))
with $(if $($(@F)-no-pie),$(no-pie-ldflag),$(default-pie-ldflag)).
Replace $(static-start-installed-name) with
$(real-static-start-installed-name).
(+prectorT): Updated for --enable-static-pie.
(+postctorT): Likewise.
(CFLAGS-.o): Add $(pie-default).
(CFLAGS-.op): Likewise.
* NEWS: Mention --enable-static-pie.
* config.h.in (ENABLE_STATIC_PIE): New.
* configure.ac (--enable-static-pie): New configure option.
(have-no-dynamic-linker): New LIBC_CONFIG_VAR.
(have-static-pie): Likewise.
Enable static PIE if linker supports --no-dynamic-linker.
(ENABLE_STATIC_PIE): New AC_DEFINE.
(enable-static-pie): New LIBC_CONFIG_VAR.
* configure: Regenerated.
* csu/Makefile (omit-deps): Add r$(start-installed-name) and
gr$(start-installed-name) for --enable-static-pie.
(extra-objs): Likewise.
(install-lib): Likewise.
(extra-objs): Add static-reloc.o and static-reloc.os
($(objpfx)$(start-installed-name)): Also depend on
$(objpfx)static-reloc.o.
($(objpfx)r$(start-installed-name)): New.
($(objpfx)g$(start-installed-name)): Also depend on
$(objpfx)static-reloc.os.
($(objpfx)gr$(start-installed-name)): New.
* csu/libc-start.c (LIBC_START_MAIN): Call _dl_relocate_static_pie
in libc.a.
* csu/libc-tls.c (__libc_setup_tls): Add main_map->l_addr to
initimage.
* csu/static-reloc.c: New file.
* elf/Makefile (routines): Add dl-reloc-static-pie.
(elide-routines.os): Likewise.
(DEFAULT-LDFLAGS-tst-tls1-static-non-pie): Removed.
(tst-tls1-static-non-pie-no-pie): New.
* elf/dl-reloc-static-pie.c: New file.
* elf/dl-support.c (_dl_get_dl_main_map): New function.
* elf/dynamic-link.h (ELF_DURING_STARTUP): Also check
STATIC_PIE_BOOTSTRAP.
* elf/get-dynamic-info.h (elf_get_dynamic_info): Likewise.
* gmon/Makefile (tests): Add tst-gmon-static-pie.
(tests-static): Likewise.
(DEFAULT-LDFLAGS-tst-gmon-static): Removed.
(tst-gmon-static-no-pie): New.
(CFLAGS-tst-gmon-static-pie.c): Likewise.
(CRT-tst-gmon-static-pie): Likewise.
(tst-gmon-static-pie-ENV): Likewise.
(tests-special): Likewise.
($(objpfx)tst-gmon-static-pie.out): Likewise.
(clean-tst-gmon-static-pie-data): Likewise.
($(objpfx)tst-gmon-static-pie-gprof.out): Likewise.
* gmon/tst-gmon-static-pie.c: New file.
* manual/install.texi: Document --enable-static-pie.
* sysdeps/generic/ldsodefs.h (_dl_relocate_static_pie): New.
(_dl_get_dl_main_map): Likewise.
* sysdeps/i386/configure.ac: Check if linker supports static PIE.
* sysdeps/x86_64/configure.ac: Likewise.
* sysdeps/i386/configure: Regenerated.
* sysdeps/x86_64/configure: Likewise.
* sysdeps/mips/Makefile (ASFLAGS-.o): Add $(pie-default).
(ASFLAGS-.op): Likewise.
2017-12-16 00:59:33 +00:00
|
|
|
tst-tls1-static-non-pie-no-pie = yes
|
Suppress internal declarations for most of the testsuite.
This patch adds a new build module called 'testsuite'.
IS_IN (testsuite) implies _ISOMAC, as do IS_IN_build and __cplusplus
(which means several ad-hoc tests for __cplusplus can go away).
libc-symbols.h now suppresses almost all of *itself* when _ISOMAC is
defined; in particular, _ISOMAC mode does not get config.h
automatically anymore.
There are still quite a few tests that need to see internal gunk of
one variety or another. For them, we now have 'tests-internal' and
'test-internal-extras'; files in this category will still be compiled
with MODULE_NAME=nonlib, and everything proceeds as it always has.
The bulk of this patch is moving tests from 'tests' to
'tests-internal'. There is also 'tests-static-internal', which has
the same effect on files in 'tests-static', and 'modules-names-tests',
which has the *inverse* effect on files in 'modules-names' (it's
inverted because most of the things in modules-names are *not* tests).
For both of these, the file must appear in *both* the new variable and
the old one.
There is also now a special case for when libc-symbols.h is included
without MODULE_NAME being defined at all. (This happens during the
creation of libc-modules.h, and also when preprocessing Versions
files.) When this happens, IS_IN is set to be always false and
_ISOMAC is *not* defined, which was the status quo, but now it's
explicit.
The remaining changes to C source files in this patch seemed likely to
cause problems in the absence of the main change. They should be
relatively self-explanatory. In a few cases I duplicated a definition
from an internal header rather than move the test to tests-internal;
this was a judgement call each time and I'm happy to change those
however reviewers feel is more appropriate.
* Makerules: New subdir configuration variables 'tests-internal'
and 'test-internal-extras'. Test files in these categories will
still be compiled with MODULE_NAME=nonlib. Test files in the
existing categories (tests, xtests, test-srcs, test-extras) are
now compiled with MODULE_NAME=testsuite.
New subdir configuration variable 'modules-names-tests'. Files
which are in both 'modules-names' and 'modules-names-tests' will
be compiled with MODULE_NAME=testsuite instead of
MODULE_NAME=extramodules.
(gen-as-const-headers): Move to tests-internal.
(do-tests-clean, common-mostlyclean): Support tests-internal.
* Makeconfig (built-modules): Add testsuite.
* Makefile: Change libof-check-installed-headers-c and
libof-check-installed-headers-cxx to 'testsuite'.
* Rules: Likewise. Support tests-internal.
* benchtests/strcoll-inputs/filelist#en_US.UTF-8:
Remove extra-modules.mk.
* config.h.in: Don't check for __OPTIMIZE__ or __FAST_MATH__ here.
* include/libc-symbols.h: Move definitions of _GNU_SOURCE,
PASTE_NAME, PASTE_NAME1, IN_MODULE, IS_IN, and IS_IN_LIB to the
very top of the file and rationalize their order.
If MODULE_NAME is not defined at all, define IS_IN to always be
false, and don't define _ISOMAC.
If any of IS_IN (testsuite), IS_IN_build, or __cplusplus are
true, define _ISOMAC and suppress everything else in this file,
starting with the inclusion of config.h.
Do check for inappropriate definitions of __OPTIMIZE__ and
__FAST_MATH__ here, but only if _ISOMAC is not defined.
Correct some out-of-date commentary.
* include/math.h: If _ISOMAC is defined, undefine NO_LONG_DOUBLE
and _Mlong_double_ before including math.h.
* include/string.h: If _ISOMAC is defined, don't expose
_STRING_ARCH_unaligned. Move a comment to a more appropriate
location.
* include/errno.h, include/stdio.h, include/stdlib.h, include/string.h
* include/time.h, include/unistd.h, include/wchar.h: No need to
check __cplusplus nor use __BEGIN_DECLS/__END_DECLS.
* misc/sys/cdefs.h (__NTHNL): New macro.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h
(__m81_defun): Use __NTHNL to avoid errors with GCC 6.
* elf/tst-env-setuid-tunables.c: Include config.h with _LIBC
defined, for HAVE_TUNABLES.
* inet/tst-checks-posix.c: No need to define _ISOMAC.
* intl/tst-gettext2.c: Provide own definition of N_.
* math/test-signgam-finite-c99.c: No need to define _ISOMAC.
* math/test-signgam-main.c: No need to define _ISOMAC.
* stdlib/tst-strtod.c: Convert to test-driver. Split locale_test to...
* stdlib/tst-strtod1i.c: ...this new file.
* stdlib/tst-strtod5.c: Convert to test-driver and add copyright notice.
Split tests of __strtod_internal to...
* stdlib/tst-strtod5i.c: ...this new file.
* string/test-string.h: Include stdint.h. Duplicate definition of
inhibit_loop_to_libcall here (from libc-symbols.h).
* string/test-strstr.c: Provide dummy definition of
libc_hidden_builtin_def when including strstr.c.
* sysdeps/ia64/fpu/libm-symbols.h: Suppress entire file in _ISOMAC
mode; no need to test __STRICT_ANSI__ nor __cplusplus as well.
* sysdeps/x86_64/fpu/math-tests-arch.h: Include cpu-features.h.
Don't include init-arch.h.
* sysdeps/x86_64/multiarch/test-multiarch.h: Include cpu-features.h.
Don't include init-arch.h.
* elf/Makefile: Move tst-ptrguard1-static, tst-stackguard1-static,
tst-tls1-static, tst-tls2-static, tst-tls3-static, loadtest,
unload, unload2, circleload1, neededtest, neededtest2,
neededtest3, neededtest4, tst-tls1, tst-tls2, tst-tls3,
tst-tls6, tst-tls7, tst-tls8, tst-dlmopen2, tst-ptrguard1,
tst-stackguard1, tst-_dl_addr_inside_object, and all of the
ifunc tests to tests-internal.
Don't add $(modules-names) to test-extras.
* inet/Makefile: Move tst-inet6_scopeid_pton to tests-internal.
Add tst-deadline to tests-static-internal.
* malloc/Makefile: Move tst-mallocstate and tst-scratch_buffer to
tests-internal.
* misc/Makefile: Move tst-atomic and tst-atomic-long to tests-internal.
* nptl/Makefile: Move tst-typesizes, tst-rwlock19, tst-sem11,
tst-sem12, tst-sem13, tst-barrier5, tst-signal7, tst-tls3,
tst-tls3-malloc, tst-tls5, tst-stackguard1, tst-sem11-static,
tst-sem12-static, and tst-stackguard1-static to tests-internal.
Link tests-internal with libpthread also.
Don't add $(modules-names) to test-extras.
* nss/Makefile: Move tst-field to tests-internal.
* posix/Makefile: Move bug-regex5, bug-regex20, bug-regex33,
tst-rfc3484, tst-rfc3484-2, and tst-rfc3484-3 to tests-internal.
* stdlib/Makefile: Move tst-strtod1i, tst-strtod3, tst-strtod4,
tst-strtod5i, tst-tls-atexit, and tst-tls-atexit-nodelete to
tests-internal.
* sunrpc/Makefile: Move tst-svc_register to tests-internal.
* sysdeps/powerpc/Makefile: Move test-get_hwcap and
test-get_hwcap-static to tests-internal.
* sysdeps/unix/sysv/linux/Makefile: Move tst-setgetname to
tests-internal.
* sysdeps/x86_64/fpu/Makefile: Add all libmvec test modules to
modules-names-tests.
2016-11-21 01:46:30 +00:00
|
|
|
|
2020-01-09 19:44:34 +00:00
|
|
|
tests-container := \
|
2022-01-14 19:16:05 +00:00
|
|
|
tst-ldconfig-bad-aux-cache \
|
|
|
|
tst-ldconfig-ld_so_conf-update \
|
|
|
|
# tests-container
|
2019-05-09 11:51:40 +00:00
|
|
|
|
2020-12-04 08:13:43 +00:00
|
|
|
ifeq (no,$(build-hardcoded-path-in-tests))
|
|
|
|
# This is an ld.so.cache test, and RPATH/RUNPATH in the executable
|
|
|
|
# interferes with its test objectives.
|
|
|
|
tests-container += tst-glibc-hwcaps-prepend-cache
|
|
|
|
endif
|
|
|
|
|
2022-01-14 19:16:05 +00:00
|
|
|
tests := \
|
|
|
|
tst-array1 \
|
|
|
|
tst-array2 \
|
|
|
|
tst-array3 \
|
|
|
|
tst-array4 \
|
|
|
|
tst-array5 \
|
|
|
|
tst-auxv \
|
2022-05-19 22:17:59 +00:00
|
|
|
tst-dl-hash \
|
2022-01-14 19:16:05 +00:00
|
|
|
tst-leaks1 \
|
|
|
|
tst-stringtable \
|
|
|
|
tst-tls9 \
|
|
|
|
# tests
|
|
|
|
|
|
|
|
tests-internal := \
|
|
|
|
$(tests-static-internal) \
|
|
|
|
tst-tls1 \
|
|
|
|
# tests-internal
|
|
|
|
|
Suppress internal declarations for most of the testsuite.
This patch adds a new build module called 'testsuite'.
IS_IN (testsuite) implies _ISOMAC, as do IS_IN_build and __cplusplus
(which means several ad-hoc tests for __cplusplus can go away).
libc-symbols.h now suppresses almost all of *itself* when _ISOMAC is
defined; in particular, _ISOMAC mode does not get config.h
automatically anymore.
There are still quite a few tests that need to see internal gunk of
one variety or another. For them, we now have 'tests-internal' and
'test-internal-extras'; files in this category will still be compiled
with MODULE_NAME=nonlib, and everything proceeds as it always has.
The bulk of this patch is moving tests from 'tests' to
'tests-internal'. There is also 'tests-static-internal', which has
the same effect on files in 'tests-static', and 'modules-names-tests',
which has the *inverse* effect on files in 'modules-names' (it's
inverted because most of the things in modules-names are *not* tests).
For both of these, the file must appear in *both* the new variable and
the old one.
There is also now a special case for when libc-symbols.h is included
without MODULE_NAME being defined at all. (This happens during the
creation of libc-modules.h, and also when preprocessing Versions
files.) When this happens, IS_IN is set to be always false and
_ISOMAC is *not* defined, which was the status quo, but now it's
explicit.
The remaining changes to C source files in this patch seemed likely to
cause problems in the absence of the main change. They should be
relatively self-explanatory. In a few cases I duplicated a definition
from an internal header rather than move the test to tests-internal;
this was a judgement call each time and I'm happy to change those
however reviewers feel is more appropriate.
* Makerules: New subdir configuration variables 'tests-internal'
and 'test-internal-extras'. Test files in these categories will
still be compiled with MODULE_NAME=nonlib. Test files in the
existing categories (tests, xtests, test-srcs, test-extras) are
now compiled with MODULE_NAME=testsuite.
New subdir configuration variable 'modules-names-tests'. Files
which are in both 'modules-names' and 'modules-names-tests' will
be compiled with MODULE_NAME=testsuite instead of
MODULE_NAME=extramodules.
(gen-as-const-headers): Move to tests-internal.
(do-tests-clean, common-mostlyclean): Support tests-internal.
* Makeconfig (built-modules): Add testsuite.
* Makefile: Change libof-check-installed-headers-c and
libof-check-installed-headers-cxx to 'testsuite'.
* Rules: Likewise. Support tests-internal.
* benchtests/strcoll-inputs/filelist#en_US.UTF-8:
Remove extra-modules.mk.
* config.h.in: Don't check for __OPTIMIZE__ or __FAST_MATH__ here.
* include/libc-symbols.h: Move definitions of _GNU_SOURCE,
PASTE_NAME, PASTE_NAME1, IN_MODULE, IS_IN, and IS_IN_LIB to the
very top of the file and rationalize their order.
If MODULE_NAME is not defined at all, define IS_IN to always be
false, and don't define _ISOMAC.
If any of IS_IN (testsuite), IS_IN_build, or __cplusplus are
true, define _ISOMAC and suppress everything else in this file,
starting with the inclusion of config.h.
Do check for inappropriate definitions of __OPTIMIZE__ and
__FAST_MATH__ here, but only if _ISOMAC is not defined.
Correct some out-of-date commentary.
* include/math.h: If _ISOMAC is defined, undefine NO_LONG_DOUBLE
and _Mlong_double_ before including math.h.
* include/string.h: If _ISOMAC is defined, don't expose
_STRING_ARCH_unaligned. Move a comment to a more appropriate
location.
* include/errno.h, include/stdio.h, include/stdlib.h, include/string.h
* include/time.h, include/unistd.h, include/wchar.h: No need to
check __cplusplus nor use __BEGIN_DECLS/__END_DECLS.
* misc/sys/cdefs.h (__NTHNL): New macro.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h
(__m81_defun): Use __NTHNL to avoid errors with GCC 6.
* elf/tst-env-setuid-tunables.c: Include config.h with _LIBC
defined, for HAVE_TUNABLES.
* inet/tst-checks-posix.c: No need to define _ISOMAC.
* intl/tst-gettext2.c: Provide own definition of N_.
* math/test-signgam-finite-c99.c: No need to define _ISOMAC.
* math/test-signgam-main.c: No need to define _ISOMAC.
* stdlib/tst-strtod.c: Convert to test-driver. Split locale_test to...
* stdlib/tst-strtod1i.c: ...this new file.
* stdlib/tst-strtod5.c: Convert to test-driver and add copyright notice.
Split tests of __strtod_internal to...
* stdlib/tst-strtod5i.c: ...this new file.
* string/test-string.h: Include stdint.h. Duplicate definition of
inhibit_loop_to_libcall here (from libc-symbols.h).
* string/test-strstr.c: Provide dummy definition of
libc_hidden_builtin_def when including strstr.c.
* sysdeps/ia64/fpu/libm-symbols.h: Suppress entire file in _ISOMAC
mode; no need to test __STRICT_ANSI__ nor __cplusplus as well.
* sysdeps/x86_64/fpu/math-tests-arch.h: Include cpu-features.h.
Don't include init-arch.h.
* sysdeps/x86_64/multiarch/test-multiarch.h: Include cpu-features.h.
Don't include init-arch.h.
* elf/Makefile: Move tst-ptrguard1-static, tst-stackguard1-static,
tst-tls1-static, tst-tls2-static, tst-tls3-static, loadtest,
unload, unload2, circleload1, neededtest, neededtest2,
neededtest3, neededtest4, tst-tls1, tst-tls2, tst-tls3,
tst-tls6, tst-tls7, tst-tls8, tst-dlmopen2, tst-ptrguard1,
tst-stackguard1, tst-_dl_addr_inside_object, and all of the
ifunc tests to tests-internal.
Don't add $(modules-names) to test-extras.
* inet/Makefile: Move tst-inet6_scopeid_pton to tests-internal.
Add tst-deadline to tests-static-internal.
* malloc/Makefile: Move tst-mallocstate and tst-scratch_buffer to
tests-internal.
* misc/Makefile: Move tst-atomic and tst-atomic-long to tests-internal.
* nptl/Makefile: Move tst-typesizes, tst-rwlock19, tst-sem11,
tst-sem12, tst-sem13, tst-barrier5, tst-signal7, tst-tls3,
tst-tls3-malloc, tst-tls5, tst-stackguard1, tst-sem11-static,
tst-sem12-static, and tst-stackguard1-static to tests-internal.
Link tests-internal with libpthread also.
Don't add $(modules-names) to test-extras.
* nss/Makefile: Move tst-field to tests-internal.
* posix/Makefile: Move bug-regex5, bug-regex20, bug-regex33,
tst-rfc3484, tst-rfc3484-2, and tst-rfc3484-3 to tests-internal.
* stdlib/Makefile: Move tst-strtod1i, tst-strtod3, tst-strtod4,
tst-strtod5i, tst-tls-atexit, and tst-tls-atexit-nodelete to
tests-internal.
* sunrpc/Makefile: Move tst-svc_register to tests-internal.
* sysdeps/powerpc/Makefile: Move test-get_hwcap and
test-get_hwcap-static to tests-internal.
* sysdeps/unix/sysv/linux/Makefile: Move tst-setgetname to
tests-internal.
* sysdeps/x86_64/fpu/Makefile: Add all libmvec test modules to
modules-names-tests.
2016-11-21 01:46:30 +00:00
|
|
|
tests-static := $(tests-static-normal) $(tests-static-internal)
|
|
|
|
|
2012-01-08 14:52:29 +00:00
|
|
|
ifeq (yes,$(build-shared))
|
2022-01-14 19:16:05 +00:00
|
|
|
tests-static += \
|
|
|
|
tst-single_threaded-static-dlopen \
|
|
|
|
tst-tls9-static \
|
|
|
|
# tests-static
|
|
|
|
|
2020-05-20 13:40:35 +00:00
|
|
|
static-dlopen-environment = \
|
2020-11-13 19:37:41 +00:00
|
|
|
LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn
|
2020-05-20 13:40:35 +00:00
|
|
|
tst-tls9-static-ENV = $(static-dlopen-environment)
|
|
|
|
tst-single_threaded-static-dlopen-ENV = $(static-dlopen-environment)
|
Suppress internal declarations for most of the testsuite.
This patch adds a new build module called 'testsuite'.
IS_IN (testsuite) implies _ISOMAC, as do IS_IN_build and __cplusplus
(which means several ad-hoc tests for __cplusplus can go away).
libc-symbols.h now suppresses almost all of *itself* when _ISOMAC is
defined; in particular, _ISOMAC mode does not get config.h
automatically anymore.
There are still quite a few tests that need to see internal gunk of
one variety or another. For them, we now have 'tests-internal' and
'test-internal-extras'; files in this category will still be compiled
with MODULE_NAME=nonlib, and everything proceeds as it always has.
The bulk of this patch is moving tests from 'tests' to
'tests-internal'. There is also 'tests-static-internal', which has
the same effect on files in 'tests-static', and 'modules-names-tests',
which has the *inverse* effect on files in 'modules-names' (it's
inverted because most of the things in modules-names are *not* tests).
For both of these, the file must appear in *both* the new variable and
the old one.
There is also now a special case for when libc-symbols.h is included
without MODULE_NAME being defined at all. (This happens during the
creation of libc-modules.h, and also when preprocessing Versions
files.) When this happens, IS_IN is set to be always false and
_ISOMAC is *not* defined, which was the status quo, but now it's
explicit.
The remaining changes to C source files in this patch seemed likely to
cause problems in the absence of the main change. They should be
relatively self-explanatory. In a few cases I duplicated a definition
from an internal header rather than move the test to tests-internal;
this was a judgement call each time and I'm happy to change those
however reviewers feel is more appropriate.
* Makerules: New subdir configuration variables 'tests-internal'
and 'test-internal-extras'. Test files in these categories will
still be compiled with MODULE_NAME=nonlib. Test files in the
existing categories (tests, xtests, test-srcs, test-extras) are
now compiled with MODULE_NAME=testsuite.
New subdir configuration variable 'modules-names-tests'. Files
which are in both 'modules-names' and 'modules-names-tests' will
be compiled with MODULE_NAME=testsuite instead of
MODULE_NAME=extramodules.
(gen-as-const-headers): Move to tests-internal.
(do-tests-clean, common-mostlyclean): Support tests-internal.
* Makeconfig (built-modules): Add testsuite.
* Makefile: Change libof-check-installed-headers-c and
libof-check-installed-headers-cxx to 'testsuite'.
* Rules: Likewise. Support tests-internal.
* benchtests/strcoll-inputs/filelist#en_US.UTF-8:
Remove extra-modules.mk.
* config.h.in: Don't check for __OPTIMIZE__ or __FAST_MATH__ here.
* include/libc-symbols.h: Move definitions of _GNU_SOURCE,
PASTE_NAME, PASTE_NAME1, IN_MODULE, IS_IN, and IS_IN_LIB to the
very top of the file and rationalize their order.
If MODULE_NAME is not defined at all, define IS_IN to always be
false, and don't define _ISOMAC.
If any of IS_IN (testsuite), IS_IN_build, or __cplusplus are
true, define _ISOMAC and suppress everything else in this file,
starting with the inclusion of config.h.
Do check for inappropriate definitions of __OPTIMIZE__ and
__FAST_MATH__ here, but only if _ISOMAC is not defined.
Correct some out-of-date commentary.
* include/math.h: If _ISOMAC is defined, undefine NO_LONG_DOUBLE
and _Mlong_double_ before including math.h.
* include/string.h: If _ISOMAC is defined, don't expose
_STRING_ARCH_unaligned. Move a comment to a more appropriate
location.
* include/errno.h, include/stdio.h, include/stdlib.h, include/string.h
* include/time.h, include/unistd.h, include/wchar.h: No need to
check __cplusplus nor use __BEGIN_DECLS/__END_DECLS.
* misc/sys/cdefs.h (__NTHNL): New macro.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h
(__m81_defun): Use __NTHNL to avoid errors with GCC 6.
* elf/tst-env-setuid-tunables.c: Include config.h with _LIBC
defined, for HAVE_TUNABLES.
* inet/tst-checks-posix.c: No need to define _ISOMAC.
* intl/tst-gettext2.c: Provide own definition of N_.
* math/test-signgam-finite-c99.c: No need to define _ISOMAC.
* math/test-signgam-main.c: No need to define _ISOMAC.
* stdlib/tst-strtod.c: Convert to test-driver. Split locale_test to...
* stdlib/tst-strtod1i.c: ...this new file.
* stdlib/tst-strtod5.c: Convert to test-driver and add copyright notice.
Split tests of __strtod_internal to...
* stdlib/tst-strtod5i.c: ...this new file.
* string/test-string.h: Include stdint.h. Duplicate definition of
inhibit_loop_to_libcall here (from libc-symbols.h).
* string/test-strstr.c: Provide dummy definition of
libc_hidden_builtin_def when including strstr.c.
* sysdeps/ia64/fpu/libm-symbols.h: Suppress entire file in _ISOMAC
mode; no need to test __STRICT_ANSI__ nor __cplusplus as well.
* sysdeps/x86_64/fpu/math-tests-arch.h: Include cpu-features.h.
Don't include init-arch.h.
* sysdeps/x86_64/multiarch/test-multiarch.h: Include cpu-features.h.
Don't include init-arch.h.
* elf/Makefile: Move tst-ptrguard1-static, tst-stackguard1-static,
tst-tls1-static, tst-tls2-static, tst-tls3-static, loadtest,
unload, unload2, circleload1, neededtest, neededtest2,
neededtest3, neededtest4, tst-tls1, tst-tls2, tst-tls3,
tst-tls6, tst-tls7, tst-tls8, tst-dlmopen2, tst-ptrguard1,
tst-stackguard1, tst-_dl_addr_inside_object, and all of the
ifunc tests to tests-internal.
Don't add $(modules-names) to test-extras.
* inet/Makefile: Move tst-inet6_scopeid_pton to tests-internal.
Add tst-deadline to tests-static-internal.
* malloc/Makefile: Move tst-mallocstate and tst-scratch_buffer to
tests-internal.
* misc/Makefile: Move tst-atomic and tst-atomic-long to tests-internal.
* nptl/Makefile: Move tst-typesizes, tst-rwlock19, tst-sem11,
tst-sem12, tst-sem13, tst-barrier5, tst-signal7, tst-tls3,
tst-tls3-malloc, tst-tls5, tst-stackguard1, tst-sem11-static,
tst-sem12-static, and tst-stackguard1-static to tests-internal.
Link tests-internal with libpthread also.
Don't add $(modules-names) to test-extras.
* nss/Makefile: Move tst-field to tests-internal.
* posix/Makefile: Move bug-regex5, bug-regex20, bug-regex33,
tst-rfc3484, tst-rfc3484-2, and tst-rfc3484-3 to tests-internal.
* stdlib/Makefile: Move tst-strtod1i, tst-strtod3, tst-strtod4,
tst-strtod5i, tst-tls-atexit, and tst-tls-atexit-nodelete to
tests-internal.
* sunrpc/Makefile: Move tst-svc_register to tests-internal.
* sysdeps/powerpc/Makefile: Move test-get_hwcap and
test-get_hwcap-static to tests-internal.
* sysdeps/unix/sysv/linux/Makefile: Move tst-setgetname to
tests-internal.
* sysdeps/x86_64/fpu/Makefile: Add all libmvec test modules to
modules-names-tests.
2016-11-21 01:46:30 +00:00
|
|
|
|
2021-12-13 17:43:52 +00:00
|
|
|
tests += \
|
|
|
|
argv0test \
|
|
|
|
constload1 \
|
|
|
|
dblload \
|
|
|
|
dblunload \
|
|
|
|
filter \
|
|
|
|
global \
|
|
|
|
initfirst \
|
|
|
|
lateglobal \
|
|
|
|
loadfail \
|
|
|
|
multiload \
|
|
|
|
next \
|
|
|
|
nodelete \
|
|
|
|
nodelete2 \
|
|
|
|
nodlopen \
|
|
|
|
nodlopen2 \
|
|
|
|
noload \
|
|
|
|
order \
|
|
|
|
order2 \
|
|
|
|
origtest \
|
|
|
|
preloadtest \
|
|
|
|
reldep \
|
|
|
|
reldep2 \
|
|
|
|
reldep3 \
|
|
|
|
reldep4 \
|
|
|
|
reldep5 \
|
|
|
|
reldep6 \
|
|
|
|
reldep7 \
|
|
|
|
reldep8 \
|
|
|
|
resolvfail \
|
|
|
|
restest1 \
|
|
|
|
restest2 \
|
|
|
|
tst-absolute-sym \
|
|
|
|
tst-absolute-zero \
|
|
|
|
tst-addr1 \
|
|
|
|
tst-align \
|
|
|
|
tst-align2 \
|
|
|
|
tst-align3 \
|
|
|
|
tst-audit1 \
|
|
|
|
tst-audit2 \
|
|
|
|
tst-audit8 \
|
|
|
|
tst-audit9 \
|
|
|
|
tst-audit11 \
|
|
|
|
tst-audit12 \
|
|
|
|
tst-audit13 \
|
2022-01-17 20:16:33 +00:00
|
|
|
tst-audit17 \
|
2021-12-13 17:43:52 +00:00
|
|
|
tst-audit18 \
|
|
|
|
tst-audit19b \
|
|
|
|
tst-audit20 \
|
2022-01-24 13:46:16 +00:00
|
|
|
tst-audit21 \
|
2021-12-13 17:43:52 +00:00
|
|
|
tst-audit22 \
|
2022-01-24 13:46:15 +00:00
|
|
|
tst-audit23 \
|
2022-01-24 13:46:17 +00:00
|
|
|
tst-audit24a \
|
|
|
|
tst-audit24b \
|
|
|
|
tst-audit24c \
|
|
|
|
tst-audit24d \
|
|
|
|
tst-audit25a \
|
|
|
|
tst-audit25b \
|
2022-07-08 10:08:48 +00:00
|
|
|
tst-audit28 \
|
2021-12-13 17:43:52 +00:00
|
|
|
tst-auditmany \
|
|
|
|
tst-auxobj \
|
|
|
|
tst-auxobj-dlopen \
|
|
|
|
tst-big-note \
|
|
|
|
tst-debug1 \
|
|
|
|
tst-deep1 \
|
|
|
|
tst-dl-is_dso \
|
|
|
|
tst-dlmodcount \
|
|
|
|
tst-dlmopen1 \
|
|
|
|
tst-dlmopen3 \
|
|
|
|
tst-dlmopen4 \
|
|
|
|
tst-dlmopen-dlerror \
|
|
|
|
tst-dlmopen-gethostbyname \
|
|
|
|
tst-dlopenfail \
|
|
|
|
tst-dlopenfail-2 \
|
|
|
|
tst-dlopenrpath \
|
|
|
|
tst-dlopen-self \
|
|
|
|
tst-dlopen-tlsmodid \
|
|
|
|
tst-dlsym-error \
|
|
|
|
tst-filterobj \
|
|
|
|
tst-filterobj-dlopen \
|
|
|
|
tst-glibc-hwcaps \
|
|
|
|
tst-glibc-hwcaps-mask \
|
|
|
|
tst-glibc-hwcaps-prepend \
|
|
|
|
tst-global1 \
|
2021-10-15 13:33:05 +00:00
|
|
|
tst-global2 \
|
2021-12-13 17:43:52 +00:00
|
|
|
tst-initfinilazyfail \
|
|
|
|
tst-initorder \
|
|
|
|
tst-initorder2 \
|
|
|
|
tst-latepthread \
|
|
|
|
tst-main1 \
|
2022-05-27 19:34:49 +00:00
|
|
|
tst-next-ver \
|
2021-12-13 17:43:52 +00:00
|
|
|
tst-nodelete2 \
|
|
|
|
tst-nodelete-dlclose \
|
|
|
|
tst-nodelete-opened \
|
|
|
|
tst-noload \
|
|
|
|
tst-null-argv \
|
2021-12-21 02:33:55 +00:00
|
|
|
tst-p_align1 \
|
2021-12-21 20:25:20 +00:00
|
|
|
tst-p_align2 \
|
2021-12-21 21:42:28 +00:00
|
|
|
tst-p_align3 \
|
2021-12-13 17:43:52 +00:00
|
|
|
tst-relsort1 \
|
|
|
|
tst-ro-dynamic \
|
|
|
|
tst-rtld-run-static \
|
|
|
|
tst-single_threaded \
|
|
|
|
tst-single_threaded-pthread \
|
|
|
|
tst-sonamemove-dlopen \
|
|
|
|
tst-sonamemove-link \
|
|
|
|
tst-thrlock \
|
|
|
|
tst-tls10 \
|
|
|
|
tst-tls11 \
|
|
|
|
tst-tls12 \
|
|
|
|
tst-tls13 \
|
|
|
|
tst-tls14 \
|
|
|
|
tst-tls15 \
|
|
|
|
tst-tls16 \
|
|
|
|
tst-tls17 \
|
|
|
|
tst-tls18 \
|
|
|
|
tst-tls19 \
|
|
|
|
tst-tls20 \
|
|
|
|
tst-tls21 \
|
|
|
|
tst-tls4 \
|
|
|
|
tst-tls5 \
|
|
|
|
tst-tlsalign \
|
|
|
|
tst-tlsalign-extern \
|
|
|
|
tst-tls-dlinfo \
|
|
|
|
tst-tls-ie \
|
|
|
|
tst-tls-ie-dlmopen \
|
|
|
|
tst-tls-manydynamic \
|
|
|
|
tst-unique1 \
|
|
|
|
tst-unique2 \
|
|
|
|
tst-unwind-ctor \
|
|
|
|
tst-unwind-main \
|
|
|
|
unload3 \
|
|
|
|
unload4 \
|
|
|
|
unload5 \
|
|
|
|
unload6 \
|
|
|
|
unload7 \
|
|
|
|
unload8 \
|
2021-10-26 09:42:44 +00:00
|
|
|
valgrind-test \
|
2022-01-14 19:16:05 +00:00
|
|
|
# tests
|
2021-12-13 17:43:52 +00:00
|
|
|
tests-cxx = \
|
|
|
|
tst-dlopen-nodelete-reloc \
|
|
|
|
tst-nodelete \
|
|
|
|
tst-unique3 \
|
|
|
|
tst-unique4 \
|
2022-01-14 19:16:05 +00:00
|
|
|
# tests-cxx
|
2021-12-13 17:43:52 +00:00
|
|
|
|
|
|
|
tests += $(if $(CXX),$(tests-cxx))
|
2022-01-14 19:16:05 +00:00
|
|
|
|
|
|
|
tests-internal += \
|
|
|
|
circleload1 \
|
|
|
|
loadtest \
|
|
|
|
neededtest \
|
|
|
|
neededtest2 \
|
|
|
|
neededtest3 \
|
|
|
|
neededtest4 \
|
|
|
|
tst-audit19a \
|
|
|
|
tst-create_format1 \
|
|
|
|
tst-dl-hwcaps_split \
|
|
|
|
tst-dl_find_object \
|
|
|
|
tst-dl_find_object-threads \
|
|
|
|
tst-dlmopen2 \
|
|
|
|
tst-ptrguard1 \
|
|
|
|
tst-stackguard1 \
|
|
|
|
tst-tls-surplus \
|
|
|
|
tst-tls3 \
|
|
|
|
tst-tls6 \
|
|
|
|
tst-tls7 \
|
|
|
|
tst-tls8 \
|
|
|
|
unload \
|
|
|
|
unload2 \
|
|
|
|
# tests-internal
|
|
|
|
|
|
|
|
tests-container += \
|
|
|
|
tst-dlopen-self-container \
|
|
|
|
tst-dlopen-tlsmodid-container \
|
|
|
|
tst-pldd \
|
|
|
|
tst-preload-pthread-libc \
|
|
|
|
# tests-container
|
|
|
|
|
|
|
|
test-srcs = \
|
|
|
|
tst-pathopt \
|
|
|
|
# tests-srcs
|
|
|
|
|
2021-12-09 15:01:33 +00:00
|
|
|
ifeq (yes,$(have-fpie))
|
|
|
|
tests-pie += tst-align3
|
|
|
|
endif
|
2011-03-10 08:18:21 +00:00
|
|
|
selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
|
2022-01-14 19:16:05 +00:00
|
|
|
|
2011-03-10 08:18:21 +00:00
|
|
|
ifneq ($(selinux-enabled),1)
|
2022-01-14 19:16:05 +00:00
|
|
|
tests-execstack-yes = \
|
|
|
|
tst-execstack \
|
|
|
|
tst-execstack-needed \
|
|
|
|
tst-execstack-prog \
|
|
|
|
# tests-execstack-yes
|
2011-03-10 08:18:21 +00:00
|
|
|
endif
|
2021-08-24 16:35:32 +00:00
|
|
|
ifeq ($(have-depaudit),yes)
|
2022-01-14 19:16:05 +00:00
|
|
|
tests += \
|
|
|
|
tst-audit14 \
|
|
|
|
tst-audit14a \
|
|
|
|
tst-audit15 \
|
|
|
|
tst-audit16 \
|
|
|
|
# tests
|
2021-10-05 23:30:38 +00:00
|
|
|
ifeq ($(run-built-tests),yes)
|
2022-01-14 19:16:05 +00:00
|
|
|
tests-special += \
|
|
|
|
$(objpfx)tst-audit14-cmp.out \
|
|
|
|
$(objpfx)tst-audit14a-cmp.out \
|
|
|
|
$(objpfx)tst-audit15-cmp.out \
|
|
|
|
$(objpfx)tst-audit16-cmp.out \
|
|
|
|
# tests-special
|
2021-10-05 23:30:38 +00:00
|
|
|
endif
|
2021-08-24 16:35:32 +00:00
|
|
|
endif
|
2022-01-05 02:41:03 +00:00
|
|
|
ifeq ($(have-dt-relr),yes)
|
|
|
|
tests += \
|
|
|
|
tst-relr \
|
2022-04-14 17:46:53 +00:00
|
|
|
tst-relr2 \
|
|
|
|
tst-relr3 \
|
|
|
|
tst-relr4 \
|
2022-01-05 02:41:03 +00:00
|
|
|
# tests
|
2022-04-14 17:46:53 +00:00
|
|
|
modules-names-dt-relr = \
|
|
|
|
tst-relr-mod2 \
|
|
|
|
tst-relr-mod3a \
|
|
|
|
tst-relr-mod3b \
|
|
|
|
tst-relr-mod4a \
|
|
|
|
tst-relr-mod4b \
|
|
|
|
# modules-names-dt-relr
|
|
|
|
modules-names += $(modules-names-dt-relr)
|
|
|
|
# These shared libraries have special build rules.
|
|
|
|
modules-names-nobuild += $(modules-names-dt-relr)
|
2022-01-05 02:41:03 +00:00
|
|
|
ifeq ($(have-fpie),yes)
|
|
|
|
tests += \
|
|
|
|
tst-relr-pie \
|
|
|
|
# tests
|
|
|
|
tests-pie += \
|
|
|
|
tst-relr-pie \
|
|
|
|
# tests-pie
|
|
|
|
tests-special += \
|
|
|
|
$(objpfx)check-tst-relr-pie.out \
|
|
|
|
# tests-special
|
|
|
|
endif
|
|
|
|
CFLAGS-tst-relr-pie.c += $(pie-ccflag)
|
|
|
|
LDFLAGS-tst-relr += -Wl,-z,pack-relative-relocs
|
|
|
|
LDFLAGS-tst-relr-pie += -Wl,-z,pack-relative-relocs
|
2022-04-14 17:46:53 +00:00
|
|
|
CFLAGS-tst-relr-mod2.c += $(no-stack-protector)
|
|
|
|
CFLAGS-tst-relr-mod3a.c += $(no-stack-protector)
|
|
|
|
CFLAGS-tst-relr-mod3b.c += $(no-stack-protector)
|
|
|
|
CFLAGS-tst-relr-mod4a.c += $(no-stack-protector)
|
|
|
|
CFLAGS-tst-relr-mod4b.c += $(no-stack-protector)
|
2022-01-05 02:41:03 +00:00
|
|
|
endif
|
1999-03-22 06:51:09 +00:00
|
|
|
endif
|
2021-10-26 09:42:44 +00:00
|
|
|
|
2022-04-11 09:30:31 +00:00
|
|
|
tests-special += $(objpfx)tst-relro-ldso.out $(objpfx)tst-relro-libc.out
|
|
|
|
$(objpfx)tst-relro-ldso.out: tst-relro-symbols.py $(..)/scripts/glibcelf.py \
|
|
|
|
$(objpfx)ld.so
|
|
|
|
$(PYTHON) tst-relro-symbols.py $(objpfx)ld.so \
|
|
|
|
--required=_rtld_global_ro \
|
|
|
|
> $@ 2>&1; $(evaluate-test)
|
|
|
|
# The optional symbols are present in libc only if the architecture has
|
|
|
|
# the GLIBC_2.0 symbol set in libc.
|
|
|
|
$(objpfx)tst-relro-libc.out: tst-relro-symbols.py $(..)/scripts/glibcelf.py \
|
|
|
|
$(common-objpfx)libc.so
|
|
|
|
$(PYTHON) tst-relro-symbols.py $(common-objpfx)libc.so \
|
|
|
|
--required=_IO_cookie_jumps \
|
|
|
|
--required=_IO_file_jumps \
|
|
|
|
--required=_IO_file_jumps_maybe_mmap \
|
|
|
|
--required=_IO_file_jumps_mmap \
|
|
|
|
--required=_IO_helper_jumps \
|
|
|
|
--required=_IO_mem_jumps \
|
|
|
|
--required=_IO_obstack_jumps \
|
|
|
|
--required=_IO_proc_jumps \
|
|
|
|
--required=_IO_str_chk_jumps \
|
|
|
|
--required=_IO_str_jumps \
|
|
|
|
--required=_IO_strn_jumps \
|
|
|
|
--required=_IO_wfile_jumps \
|
|
|
|
--required=_IO_wfile_jumps_maybe_mmap \
|
|
|
|
--required=_IO_wfile_jumps_mmap \
|
|
|
|
--required=_IO_wmem_jumps \
|
|
|
|
--required=_IO_wstr_jumps \
|
|
|
|
--required=_IO_wstrn_jumps \
|
|
|
|
--optional=_IO_old_cookie_jumps \
|
|
|
|
--optional=_IO_old_file_jumps \
|
|
|
|
--optional=_IO_old_proc_jumps \
|
|
|
|
> $@ 2>&1; $(evaluate-test)
|
|
|
|
|
2022-01-26 17:57:29 +00:00
|
|
|
ifeq ($(run-built-tests),yes)
|
2021-10-26 09:42:44 +00:00
|
|
|
tests-special += $(objpfx)tst-valgrind-smoke.out
|
2022-01-26 17:57:29 +00:00
|
|
|
endif
|
2021-10-26 09:42:44 +00:00
|
|
|
$(objpfx)tst-valgrind-smoke.out: tst-valgrind-smoke.sh $(objpfx)ld.so $(objpfx)valgrind-test
|
|
|
|
$(SHELL) $< $(objpfx)ld.so $(rtlddir)/$(rtld-installed-name) '$(test-wrapper-env)' \
|
|
|
|
'$(run-program-env)' '$(rpath-link)' $(objpfx)valgrind-test > $@; $(evaluate-test)
|
|
|
|
|
2018-03-24 15:25:43 +00:00
|
|
|
tests += $(tests-execstack-$(have-z-execstack))
|
2012-10-24 00:08:46 +00:00
|
|
|
ifeq ($(run-built-tests),yes)
|
2022-01-14 19:16:05 +00:00
|
|
|
tests-special += \
|
|
|
|
$(objpfx)noload-mem.out \
|
|
|
|
$(objpfx)tst-ldconfig-X.out \
|
|
|
|
$(objpfx)tst-leaks1-mem.out \
|
|
|
|
$(objpfx)tst-rtld-help.out \
|
|
|
|
# tests-special
|
2009-11-14 09:42:02 +00:00
|
|
|
endif
|
2008-10-17 15:24:10 +00:00
|
|
|
tlsmod17a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
2008-10-31 20:50:16 +00:00
|
|
|
tlsmod18a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
2011-01-17 02:32:07 +00:00
|
|
|
tlsmod17a-modules = $(addprefix tst-tlsmod17a, $(tlsmod17a-suffixes))
|
|
|
|
tlsmod18a-modules = $(addprefix tst-tlsmod18a, $(tlsmod17a-suffixes))
|
2016-12-02 16:09:19 +00:00
|
|
|
one-hundred = $(foreach x,0 1 2 3 4 5 6 7 8 9, \
|
|
|
|
0$x 1$x 2$x 3$x 4$x 5$x 6$x 7$x 8$x 9$x)
|
|
|
|
tst-tls-many-dynamic-modules := \
|
|
|
|
$(foreach n,$(one-hundred),tst-tls-manydynamic$(n)mod)
|
2021-06-25 13:54:12 +00:00
|
|
|
tst-tls-many-dynamic-modules-dep-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 \
|
|
|
|
14 15 16 17 18 19
|
|
|
|
tst-tls-many-dynamic-modules-dep = \
|
|
|
|
$(foreach n,$(tst-tls-many-dynamic-modules-dep-suffixes),tst-tls-manydynamic$(n)mod-dep)
|
|
|
|
tst-tls-many-dynamic-modules-dep-bad-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
|
|
|
tst-tls-many-dynamic-modules-dep-bad = \
|
|
|
|
$(foreach n,$(tst-tls-many-dynamic-modules-dep-bad-suffixes),tst-tls-manydynamic$(n)mod-dep-bad)
|
2022-01-14 19:16:05 +00:00
|
|
|
extra-test-objs += \
|
|
|
|
$(tlsmod17a-modules:=.os) \
|
|
|
|
$(tlsmod18a-modules:=.os) \
|
|
|
|
tst-tlsalign-vars.o \
|
|
|
|
# extra-test-objs
|
|
|
|
test-extras += \
|
|
|
|
tst-tlsalign-vars \
|
|
|
|
tst-tlsmod17a \
|
|
|
|
tst-tlsmod18a \
|
|
|
|
# test-extras
|
2022-04-14 17:46:53 +00:00
|
|
|
modules-names += \
|
2021-12-13 17:43:52 +00:00
|
|
|
circlemod1 \
|
|
|
|
circlemod1a \
|
|
|
|
circlemod2 \
|
|
|
|
circlemod2a \
|
|
|
|
circlemod3 \
|
|
|
|
circlemod3a \
|
|
|
|
constload2 \
|
|
|
|
constload3 \
|
|
|
|
dblloadmod1 \
|
|
|
|
dblloadmod2 \
|
|
|
|
dblloadmod3 \
|
|
|
|
dep1 \
|
|
|
|
dep2 \
|
|
|
|
dep3 \
|
|
|
|
dep4 \
|
|
|
|
failobj \
|
|
|
|
filtmod1 \
|
|
|
|
filtmod2 \
|
|
|
|
firstobj \
|
|
|
|
globalmod1 \
|
|
|
|
libmarkermod1-1 \
|
|
|
|
libmarkermod1-2 \
|
|
|
|
libmarkermod1-3 \
|
|
|
|
libmarkermod2-1 \
|
|
|
|
libmarkermod2-2 \
|
|
|
|
libmarkermod3-1 \
|
|
|
|
libmarkermod3-2 \
|
|
|
|
libmarkermod3-3 \
|
|
|
|
libmarkermod4-1 \
|
|
|
|
libmarkermod4-2 \
|
|
|
|
libmarkermod4-3 \
|
|
|
|
libmarkermod4-4 \
|
2022-04-13 12:36:09 +00:00
|
|
|
libmarkermod5-1 \
|
|
|
|
libmarkermod5-2 \
|
|
|
|
libmarkermod5-3 \
|
|
|
|
libmarkermod5-4 \
|
|
|
|
libmarkermod5-5 \
|
2022-02-08 18:22:49 +00:00
|
|
|
libtracemod1-1 \
|
|
|
|
libtracemod2-1 \
|
|
|
|
libtracemod3-1 \
|
|
|
|
libtracemod4-1 \
|
|
|
|
libtracemod5-1 \
|
2021-12-13 17:43:52 +00:00
|
|
|
ltglobmod1 \
|
|
|
|
ltglobmod2 \
|
|
|
|
neededobj1 \
|
|
|
|
neededobj2 \
|
|
|
|
neededobj3 \
|
|
|
|
neededobj4 \
|
|
|
|
neededobj5 \
|
|
|
|
neededobj6 \
|
|
|
|
nextmod1 \
|
|
|
|
nextmod2 \
|
2022-05-27 19:34:49 +00:00
|
|
|
nextmod3 \
|
2021-12-13 17:43:52 +00:00
|
|
|
nodel2mod1 \
|
|
|
|
nodel2mod2 \
|
|
|
|
nodel2mod3 \
|
|
|
|
nodelmod1 \
|
|
|
|
nodelmod2 \
|
|
|
|
nodelmod3 \
|
|
|
|
nodelmod4 \
|
|
|
|
nodlopenmod \
|
|
|
|
nodlopenmod2 \
|
|
|
|
order2mod1 \
|
|
|
|
order2mod2 \
|
|
|
|
order2mod3 \
|
|
|
|
order2mod4 \
|
|
|
|
pathoptobj \
|
|
|
|
reldep4mod1 \
|
|
|
|
reldep4mod2 \
|
|
|
|
reldep4mod3 \
|
|
|
|
reldep4mod4 \
|
|
|
|
reldep6mod0 \
|
|
|
|
reldep6mod1 \
|
|
|
|
reldep6mod2 \
|
|
|
|
reldep6mod3 \
|
|
|
|
reldep6mod4 \
|
|
|
|
reldep7mod1 \
|
|
|
|
reldep7mod2 \
|
|
|
|
reldep8mod1 \
|
|
|
|
reldep8mod2 \
|
|
|
|
reldep8mod3 \
|
|
|
|
reldep9mod1 \
|
|
|
|
reldep9mod2 \
|
|
|
|
reldep9mod3 \
|
|
|
|
reldepmod1 \
|
|
|
|
reldepmod2 \
|
|
|
|
reldepmod3 \
|
|
|
|
reldepmod4 \
|
|
|
|
reldepmod5 \
|
|
|
|
reldepmod6 \
|
|
|
|
testobj1 \
|
|
|
|
testobj1_1 \
|
|
|
|
testobj2 \
|
|
|
|
testobj3 \
|
|
|
|
testobj4 \
|
|
|
|
testobj5 \
|
|
|
|
testobj6 \
|
|
|
|
tst-absolute-sym-lib \
|
|
|
|
tst-absolute-zero-lib \
|
|
|
|
tst-alignmod \
|
|
|
|
tst-alignmod2 \
|
|
|
|
tst-alignmod3 \
|
|
|
|
tst-array2dep \
|
|
|
|
tst-array5dep \
|
|
|
|
tst-audit11mod1 \
|
|
|
|
tst-audit11mod2 \
|
|
|
|
tst-audit12mod1 \
|
|
|
|
tst-audit12mod2 \
|
|
|
|
tst-audit12mod3 \
|
|
|
|
tst-audit13mod1 \
|
|
|
|
tst-audit18mod \
|
|
|
|
tst-audit19bmod \
|
2022-01-24 13:46:15 +00:00
|
|
|
tst-audit23mod \
|
2022-01-24 13:46:17 +00:00
|
|
|
tst-audit24amod1 \
|
|
|
|
tst-audit24amod2 \
|
|
|
|
tst-audit24bmod1 \
|
|
|
|
tst-audit24bmod2 \
|
|
|
|
tst-audit24dmod1 \
|
|
|
|
tst-audit24dmod2 \
|
|
|
|
tst-audit24dmod3 \
|
|
|
|
tst-audit24dmod4 \
|
|
|
|
tst-audit25mod1 \
|
|
|
|
tst-audit25mod2 \
|
|
|
|
tst-audit25mod3 \
|
|
|
|
tst-audit25mod4 \
|
2021-12-13 17:43:52 +00:00
|
|
|
tst-auditlogmod-1 \
|
|
|
|
tst-auditlogmod-2 \
|
|
|
|
tst-auditlogmod-3 \
|
|
|
|
tst-auditmanymod1 \
|
|
|
|
tst-auditmanymod2 \
|
|
|
|
tst-auditmanymod3 \
|
|
|
|
tst-auditmanymod4 \
|
|
|
|
tst-auditmanymod5 \
|
|
|
|
tst-auditmanymod6 \
|
|
|
|
tst-auditmanymod7 \
|
|
|
|
tst-auditmanymod8 \
|
|
|
|
tst-auditmanymod9 \
|
|
|
|
tst-auditmod1 \
|
|
|
|
tst-auditmod9a \
|
|
|
|
tst-auditmod9b \
|
|
|
|
tst-auditmod11 \
|
|
|
|
tst-auditmod12 \
|
|
|
|
tst-auditmod18 \
|
|
|
|
tst-auditmod19a \
|
|
|
|
tst-auditmod19b \
|
|
|
|
tst-auditmod20 \
|
2022-01-24 13:46:16 +00:00
|
|
|
tst-auditmod21a \
|
|
|
|
tst-auditmod21b \
|
2021-12-13 17:43:52 +00:00
|
|
|
tst-auditmod22 \
|
2022-01-24 13:46:15 +00:00
|
|
|
tst-auditmod23 \
|
2022-01-24 13:46:17 +00:00
|
|
|
tst-auditmod24a \
|
|
|
|
tst-auditmod24b \
|
|
|
|
tst-auditmod24c \
|
|
|
|
tst-auditmod24d \
|
|
|
|
tst-auditmod25 \
|
2022-07-08 10:08:48 +00:00
|
|
|
tst-auditmod28 \
|
2021-12-13 17:43:52 +00:00
|
|
|
tst-auxvalmod \
|
|
|
|
tst-big-note-lib \
|
|
|
|
tst-deep1mod1 \
|
|
|
|
tst-deep1mod2 \
|
|
|
|
tst-deep1mod3 \
|
|
|
|
tst-dl_find_object-mod1 \
|
|
|
|
tst-dl_find_object-mod2 \
|
|
|
|
tst-dl_find_object-mod3 \
|
|
|
|
tst-dl_find_object-mod4 \
|
|
|
|
tst-dl_find_object-mod5 \
|
|
|
|
tst-dl_find_object-mod6 \
|
|
|
|
tst-dl_find_object-mod7 \
|
|
|
|
tst-dl_find_object-mod8 \
|
|
|
|
tst-dl_find_object-mod9 \
|
|
|
|
tst-dlmopen1mod \
|
|
|
|
tst-dlmopen-dlerror-mod \
|
|
|
|
tst-dlmopen-gethostbyname-mod \
|
|
|
|
tst-dlopenfaillinkmod \
|
|
|
|
tst-dlopenfailmod1 \
|
|
|
|
tst-dlopenfailmod2 \
|
|
|
|
tst-dlopenfailmod3 \
|
|
|
|
tst-dlopenfailnodelmod \
|
|
|
|
tst-dlopenrpathmod \
|
|
|
|
tst-filterobj-aux \
|
|
|
|
tst-filterobj-filtee \
|
|
|
|
tst-filterobj-flt \
|
|
|
|
tst-finilazyfailmod \
|
2021-10-15 13:33:05 +00:00
|
|
|
tst-globalmod2 \
|
2021-12-13 17:43:52 +00:00
|
|
|
tst-initlazyfailmod \
|
|
|
|
tst-initorder2a \
|
|
|
|
tst-initorder2b \
|
|
|
|
tst-initorder2c \
|
|
|
|
tst-initorder2d \
|
|
|
|
tst-initordera1 \
|
|
|
|
tst-initordera2 \
|
|
|
|
tst-initordera3 \
|
|
|
|
tst-initordera4 \
|
|
|
|
tst-initorderb1 \
|
|
|
|
tst-initorderb2 \
|
|
|
|
tst-latepthreadmod \
|
|
|
|
tst-ldconfig-ld-mod \
|
|
|
|
tst-main1mod \
|
|
|
|
tst-nodelete2mod \
|
|
|
|
tst-nodelete-dlclose-dso \
|
|
|
|
tst-nodelete-dlclose-plugin \
|
|
|
|
tst-nodelete-opened-lib \
|
|
|
|
tst-null-argv-lib \
|
2021-12-21 02:33:55 +00:00
|
|
|
tst-p_alignmod-base \
|
2021-12-21 21:42:28 +00:00
|
|
|
tst-p_alignmod3 \
|
2021-12-13 17:43:52 +00:00
|
|
|
tst-relsort1mod1 \
|
|
|
|
tst-relsort1mod2 \
|
|
|
|
tst-ro-dynamic-mod \
|
|
|
|
tst-single_threaded-mod1 \
|
|
|
|
tst-single_threaded-mod2 \
|
|
|
|
tst-single_threaded-mod3 \
|
|
|
|
tst-single_threaded-mod4 \
|
|
|
|
tst-sonamemove-linkmod1 \
|
|
|
|
tst-sonamemove-runmod1 \
|
|
|
|
tst-sonamemove-runmod2 \
|
|
|
|
tst-tls19mod1 \
|
|
|
|
tst-tls19mod2 \
|
|
|
|
tst-tls19mod3 \
|
|
|
|
tst-tls20mod-bad \
|
|
|
|
tst-tls21mod \
|
|
|
|
tst-tlsalign-lib \
|
|
|
|
tst-tls-ie-mod0 \
|
|
|
|
tst-tls-ie-mod1 \
|
|
|
|
tst-tls-ie-mod2 \
|
|
|
|
tst-tls-ie-mod3 \
|
|
|
|
tst-tls-ie-mod4 \
|
|
|
|
tst-tls-ie-mod5 \
|
|
|
|
tst-tls-ie-mod6 \
|
|
|
|
tst-tlsmod1 \
|
|
|
|
tst-tlsmod10 \
|
|
|
|
tst-tlsmod11 \
|
|
|
|
tst-tlsmod12 \
|
|
|
|
tst-tlsmod13 \
|
|
|
|
tst-tlsmod13a \
|
|
|
|
tst-tlsmod14a \
|
|
|
|
tst-tlsmod14b \
|
|
|
|
tst-tlsmod15a \
|
|
|
|
tst-tlsmod15b \
|
|
|
|
tst-tlsmod16a \
|
|
|
|
tst-tlsmod16b \
|
|
|
|
tst-tlsmod17b \
|
|
|
|
tst-tlsmod2 \
|
|
|
|
tst-tlsmod3 \
|
|
|
|
tst-tlsmod4 \
|
|
|
|
tst-tlsmod5 \
|
|
|
|
tst-tlsmod6 \
|
|
|
|
tst-tlsmod7 \
|
|
|
|
tst-tlsmod8 \
|
|
|
|
tst-tlsmod9 \
|
|
|
|
tst-unique1mod1 \
|
|
|
|
tst-unique1mod2 \
|
|
|
|
tst-unique2mod1 \
|
|
|
|
tst-unique2mod2 \
|
|
|
|
tst-unwind-ctor-lib \
|
|
|
|
unload2dep \
|
|
|
|
unload2mod \
|
|
|
|
unload3mod1 \
|
|
|
|
unload3mod2 \
|
|
|
|
unload3mod3 \
|
|
|
|
unload3mod4 \
|
|
|
|
unload4mod1 \
|
|
|
|
unload4mod2 \
|
|
|
|
unload4mod3 \
|
|
|
|
unload4mod4 \
|
|
|
|
unload6mod1 \
|
|
|
|
unload6mod2 \
|
|
|
|
unload6mod3 \
|
|
|
|
unload7mod1 \
|
|
|
|
unload7mod2 \
|
|
|
|
unload8mod1 \
|
|
|
|
unload8mod1x \
|
|
|
|
unload8mod2 \
|
|
|
|
unload8mod3 \
|
|
|
|
unloadmod \
|
|
|
|
vismod1 \
|
|
|
|
vismod2 \
|
|
|
|
vismod3 \
|
2022-01-04 14:58:34 +00:00
|
|
|
# modules-names
|
2021-12-13 17:43:52 +00:00
|
|
|
|
|
|
|
modules-names-cxx = \
|
|
|
|
tst-dlopen-nodelete-reloc-mod1 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod10 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod11 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod12 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod13 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod14 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod15 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod16 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod17 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod2 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod3 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod4 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod5 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod6 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod7 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod8 \
|
|
|
|
tst-dlopen-nodelete-reloc-mod9 \
|
|
|
|
tst-nodelete-rtldmod \
|
|
|
|
tst-nodelete-uniquemod \
|
|
|
|
tst-nodelete-zmod \
|
|
|
|
tst-unique3lib \
|
|
|
|
tst-unique3lib2 \
|
|
|
|
tst-unique4lib \
|
2022-01-14 19:16:05 +00:00
|
|
|
# modules-names-cxx
|
2021-12-13 17:43:52 +00:00
|
|
|
|
|
|
|
modules-names += \
|
|
|
|
$(if $(CXX),$(modules-names-cxx)) \
|
|
|
|
$(modules-execstack-$(have-z-execstack)) \
|
2022-01-14 19:16:05 +00:00
|
|
|
$(tlsmod17a-modules) \
|
|
|
|
$(tlsmod18a-modules) \
|
2021-12-13 17:43:52 +00:00
|
|
|
$(tst-tls-many-dynamic-modules) \
|
|
|
|
$(tst-tls-many-dynamic-modules-dep) \
|
|
|
|
$(tst-tls-many-dynamic-modules-dep-bad) \
|
2022-01-14 19:16:05 +00:00
|
|
|
# modules-names
|
2020-06-10 12:40:40 +00:00
|
|
|
|
Include most of elf/ modules-names in modules-names-tests.
I'm testing a patch to let the compiler expand calls to floor in libm
as built-in function calls as much as possible, instead of calling
__floor, so that no architecture-specific __floor inlines are needed,
and then to arrange for non-inlined calls to end up calling __floor,
as done with sqrt and __ieee754_sqrt.
This shows up elf/tst-relsort1mod2.c calling floor, which must not be
converted to a call to __floor. Now, while an IS_IN (libm)
conditional could be added to the existing conditionals on such
redirections in include/math.h, the _ISOMAC conditional ought to
suffice (code in other glibc libraries shouldn't be calling floor or
sqrt anyway, as they aren't provided in libc and the other libraries
don't link with libm). But while tests are mostly now built with
_ISOMAC defined, test modules in modules-names aren't unless also
listed in modules-names-tests.
As far as I can see, all the modules in modules-names in elf/ are in
fact parts of tests and so listing them in modules-names-tests is
appropriate, so they get built with something closer to the headers
used for user code, except in a few cases that actually rely on
something from internal headers. This patch duly sets
modules-names-tests there accordingly (filtering out those tests that
fail to build without internal headers).
Tested for x86_64, and with build-many-glibcs.py.
* elf/Makefile (modules-names-tests): New variable.
2018-09-12 20:31:24 +00:00
|
|
|
# Most modules build with _ISOMAC defined, but those filtered out
|
|
|
|
# depend on internal headers.
|
2021-07-07 06:40:41 +00:00
|
|
|
modules-names-tests = $(filter-out ifuncmod% tst-tlsmod%,\
|
Include most of elf/ modules-names in modules-names-tests.
I'm testing a patch to let the compiler expand calls to floor in libm
as built-in function calls as much as possible, instead of calling
__floor, so that no architecture-specific __floor inlines are needed,
and then to arrange for non-inlined calls to end up calling __floor,
as done with sqrt and __ieee754_sqrt.
This shows up elf/tst-relsort1mod2.c calling floor, which must not be
converted to a call to __floor. Now, while an IS_IN (libm)
conditional could be added to the existing conditionals on such
redirections in include/math.h, the _ISOMAC conditional ought to
suffice (code in other glibc libraries shouldn't be calling floor or
sqrt anyway, as they aren't provided in libc and the other libraries
don't link with libm). But while tests are mostly now built with
_ISOMAC defined, test modules in modules-names aren't unless also
listed in modules-names-tests.
As far as I can see, all the modules in modules-names in elf/ are in
fact parts of tests and so listing them in modules-names-tests is
appropriate, so they get built with something closer to the headers
used for user code, except in a few cases that actually rely on
something from internal headers. This patch duly sets
modules-names-tests there accordingly (filtering out those tests that
fail to build without internal headers).
Tested for x86_64, and with build-many-glibcs.py.
* elf/Makefile (modules-names-tests): New variable.
2018-09-12 20:31:24 +00:00
|
|
|
$(modules-names))
|
2018-05-06 01:08:27 +00:00
|
|
|
|
2022-02-24 22:10:45 +00:00
|
|
|
# For +depfiles in Makerules.
|
|
|
|
extra-test-objs += tst-auditmod17.os
|
|
|
|
|
2016-07-12 13:29:54 +00:00
|
|
|
ifeq (yes,$(have-mtls-dialect-gnu2))
|
|
|
|
tests += tst-gnu2-tls1
|
|
|
|
modules-names += tst-gnu2-tls1mod
|
|
|
|
$(objpfx)tst-gnu2-tls1: $(objpfx)tst-gnu2-tls1mod.so
|
|
|
|
tst-gnu2-tls1mod.so-no-z-defs = yes
|
|
|
|
CFLAGS-tst-gnu2-tls1mod.c += -mtls-dialect=gnu2
|
2021-06-30 18:51:31 +00:00
|
|
|
|
|
|
|
tests += tst-audit-tlsdesc tst-audit-tlsdesc-dlopen
|
|
|
|
modules-names += tst-audit-tlsdesc-mod1 tst-audit-tlsdesc-mod2 tst-auditmod-tlsdesc
|
|
|
|
$(objpfx)tst-audit-tlsdesc: $(objpfx)tst-audit-tlsdesc-mod1.so \
|
|
|
|
$(objpfx)tst-audit-tlsdesc-mod2.so \
|
|
|
|
$(shared-thread-library)
|
|
|
|
CFLAGS-tst-audit-tlsdesc-mod1.c += -mtls-dialect=gnu2
|
|
|
|
CFLAGS-tst-audit-tlsdesc-mod2.c += -mtls-dialect=gnu2
|
|
|
|
$(objpfx)tst-audit-tlsdesc-dlopen: $(shared-thread-library)
|
|
|
|
$(objpfx)tst-audit-tlsdesc-dlopen.out: $(objpfx)tst-audit-tlsdesc-mod1.so \
|
|
|
|
$(objpfx)tst-audit-tlsdesc-mod2.so
|
|
|
|
$(objpfx)tst-audit-tlsdesc-mod1.so: $(objpfx)tst-audit-tlsdesc-mod2.so
|
|
|
|
$(objpfx)tst-audit-tlsdesc.out: $(objpfx)tst-auditmod-tlsdesc.so
|
|
|
|
tst-audit-tlsdesc-ENV = LD_AUDIT=$(objpfx)tst-auditmod-tlsdesc.so
|
|
|
|
$(objpfx)tst-audit-tlsdesc-dlopen.out: $(objpfx)tst-auditmod-tlsdesc.so
|
|
|
|
tst-audit-tlsdesc-dlopen-ENV = LD_AUDIT=$(objpfx)tst-auditmod-tlsdesc.so
|
2016-07-12 13:29:54 +00:00
|
|
|
endif
|
2015-03-31 12:20:55 +00:00
|
|
|
ifeq (yes,$(have-protected-data))
|
|
|
|
modules-names += tst-protected1moda tst-protected1modb
|
|
|
|
tests += tst-protected1a tst-protected1b
|
|
|
|
$(objpfx)tst-protected1a: $(addprefix $(objpfx),tst-protected1moda.so tst-protected1modb.so)
|
|
|
|
$(objpfx)tst-protected1b: $(addprefix $(objpfx),tst-protected1modb.so tst-protected1moda.so)
|
|
|
|
tst-protected1modb.so-no-z-defs = yes
|
2015-09-03 23:26:59 +00:00
|
|
|
# These tests fail with GCC versions prior to 5.1 and with some versions
|
|
|
|
# of binutils. See https://sourceware.org/bugzilla/show_bug.cgi?id=17709
|
|
|
|
# and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 for details.
|
|
|
|
# Perhaps in future we can make these XFAILs conditional on some detection
|
|
|
|
# of compiler/linker behavior/version.
|
|
|
|
test-xfail-tst-protected1a = yes
|
|
|
|
test-xfail-tst-protected1b = yes
|
2015-03-31 12:20:55 +00:00
|
|
|
endif
|
2004-07-16 17:56:45 +00:00
|
|
|
ifeq (yesyes,$(have-fpie)$(build-shared))
|
|
|
|
modules-names += tst-piemod1
|
2019-10-17 06:51:21 +00:00
|
|
|
tests += tst-pie1 tst-pie2 tst-dlopen-pie tst-dlopen-tlsmodid-pie \
|
|
|
|
tst-dlopen-self-pie
|
|
|
|
tests-pie += tst-pie1 tst-pie2 tst-dlopen-tlsmodid-pie tst-dlopen-self-pie
|
2017-08-04 18:47:08 +00:00
|
|
|
ifeq (yes,$(have-protected-data))
|
2015-02-27 21:56:44 +00:00
|
|
|
tests += vismain
|
|
|
|
tests-pie += vismain
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-vismain.c += $(PIE-ccflag)
|
2004-07-16 17:56:45 +00:00
|
|
|
endif
|
2017-08-04 18:47:08 +00:00
|
|
|
endif
|
2003-09-23 12:07:26 +00:00
|
|
|
modules-execstack-yes = tst-execstack-mod
|
2006-08-21 21:06:35 +00:00
|
|
|
extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))
|
2002-08-04 02:32:32 +00:00
|
|
|
|
2021-09-24 15:56:42 +00:00
|
|
|
# filtmod1.so, tst-big-note-lib.so, tst-ro-dynamic-mod.so have special
|
|
|
|
# rules.
|
2022-04-14 17:46:53 +00:00
|
|
|
modules-names-nobuild += \
|
|
|
|
filtmod1 \
|
|
|
|
tst-audit24bmod1 \
|
|
|
|
tst-audit24bmod2 \
|
|
|
|
tst-big-note-lib \
|
|
|
|
tst-ro-dynamic-mod \
|
|
|
|
# modules-names-nobuild
|
2005-10-16 09:25:59 +00:00
|
|
|
|
Suppress internal declarations for most of the testsuite.
This patch adds a new build module called 'testsuite'.
IS_IN (testsuite) implies _ISOMAC, as do IS_IN_build and __cplusplus
(which means several ad-hoc tests for __cplusplus can go away).
libc-symbols.h now suppresses almost all of *itself* when _ISOMAC is
defined; in particular, _ISOMAC mode does not get config.h
automatically anymore.
There are still quite a few tests that need to see internal gunk of
one variety or another. For them, we now have 'tests-internal' and
'test-internal-extras'; files in this category will still be compiled
with MODULE_NAME=nonlib, and everything proceeds as it always has.
The bulk of this patch is moving tests from 'tests' to
'tests-internal'. There is also 'tests-static-internal', which has
the same effect on files in 'tests-static', and 'modules-names-tests',
which has the *inverse* effect on files in 'modules-names' (it's
inverted because most of the things in modules-names are *not* tests).
For both of these, the file must appear in *both* the new variable and
the old one.
There is also now a special case for when libc-symbols.h is included
without MODULE_NAME being defined at all. (This happens during the
creation of libc-modules.h, and also when preprocessing Versions
files.) When this happens, IS_IN is set to be always false and
_ISOMAC is *not* defined, which was the status quo, but now it's
explicit.
The remaining changes to C source files in this patch seemed likely to
cause problems in the absence of the main change. They should be
relatively self-explanatory. In a few cases I duplicated a definition
from an internal header rather than move the test to tests-internal;
this was a judgement call each time and I'm happy to change those
however reviewers feel is more appropriate.
* Makerules: New subdir configuration variables 'tests-internal'
and 'test-internal-extras'. Test files in these categories will
still be compiled with MODULE_NAME=nonlib. Test files in the
existing categories (tests, xtests, test-srcs, test-extras) are
now compiled with MODULE_NAME=testsuite.
New subdir configuration variable 'modules-names-tests'. Files
which are in both 'modules-names' and 'modules-names-tests' will
be compiled with MODULE_NAME=testsuite instead of
MODULE_NAME=extramodules.
(gen-as-const-headers): Move to tests-internal.
(do-tests-clean, common-mostlyclean): Support tests-internal.
* Makeconfig (built-modules): Add testsuite.
* Makefile: Change libof-check-installed-headers-c and
libof-check-installed-headers-cxx to 'testsuite'.
* Rules: Likewise. Support tests-internal.
* benchtests/strcoll-inputs/filelist#en_US.UTF-8:
Remove extra-modules.mk.
* config.h.in: Don't check for __OPTIMIZE__ or __FAST_MATH__ here.
* include/libc-symbols.h: Move definitions of _GNU_SOURCE,
PASTE_NAME, PASTE_NAME1, IN_MODULE, IS_IN, and IS_IN_LIB to the
very top of the file and rationalize their order.
If MODULE_NAME is not defined at all, define IS_IN to always be
false, and don't define _ISOMAC.
If any of IS_IN (testsuite), IS_IN_build, or __cplusplus are
true, define _ISOMAC and suppress everything else in this file,
starting with the inclusion of config.h.
Do check for inappropriate definitions of __OPTIMIZE__ and
__FAST_MATH__ here, but only if _ISOMAC is not defined.
Correct some out-of-date commentary.
* include/math.h: If _ISOMAC is defined, undefine NO_LONG_DOUBLE
and _Mlong_double_ before including math.h.
* include/string.h: If _ISOMAC is defined, don't expose
_STRING_ARCH_unaligned. Move a comment to a more appropriate
location.
* include/errno.h, include/stdio.h, include/stdlib.h, include/string.h
* include/time.h, include/unistd.h, include/wchar.h: No need to
check __cplusplus nor use __BEGIN_DECLS/__END_DECLS.
* misc/sys/cdefs.h (__NTHNL): New macro.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h
(__m81_defun): Use __NTHNL to avoid errors with GCC 6.
* elf/tst-env-setuid-tunables.c: Include config.h with _LIBC
defined, for HAVE_TUNABLES.
* inet/tst-checks-posix.c: No need to define _ISOMAC.
* intl/tst-gettext2.c: Provide own definition of N_.
* math/test-signgam-finite-c99.c: No need to define _ISOMAC.
* math/test-signgam-main.c: No need to define _ISOMAC.
* stdlib/tst-strtod.c: Convert to test-driver. Split locale_test to...
* stdlib/tst-strtod1i.c: ...this new file.
* stdlib/tst-strtod5.c: Convert to test-driver and add copyright notice.
Split tests of __strtod_internal to...
* stdlib/tst-strtod5i.c: ...this new file.
* string/test-string.h: Include stdint.h. Duplicate definition of
inhibit_loop_to_libcall here (from libc-symbols.h).
* string/test-strstr.c: Provide dummy definition of
libc_hidden_builtin_def when including strstr.c.
* sysdeps/ia64/fpu/libm-symbols.h: Suppress entire file in _ISOMAC
mode; no need to test __STRICT_ANSI__ nor __cplusplus as well.
* sysdeps/x86_64/fpu/math-tests-arch.h: Include cpu-features.h.
Don't include init-arch.h.
* sysdeps/x86_64/multiarch/test-multiarch.h: Include cpu-features.h.
Don't include init-arch.h.
* elf/Makefile: Move tst-ptrguard1-static, tst-stackguard1-static,
tst-tls1-static, tst-tls2-static, tst-tls3-static, loadtest,
unload, unload2, circleload1, neededtest, neededtest2,
neededtest3, neededtest4, tst-tls1, tst-tls2, tst-tls3,
tst-tls6, tst-tls7, tst-tls8, tst-dlmopen2, tst-ptrguard1,
tst-stackguard1, tst-_dl_addr_inside_object, and all of the
ifunc tests to tests-internal.
Don't add $(modules-names) to test-extras.
* inet/Makefile: Move tst-inet6_scopeid_pton to tests-internal.
Add tst-deadline to tests-static-internal.
* malloc/Makefile: Move tst-mallocstate and tst-scratch_buffer to
tests-internal.
* misc/Makefile: Move tst-atomic and tst-atomic-long to tests-internal.
* nptl/Makefile: Move tst-typesizes, tst-rwlock19, tst-sem11,
tst-sem12, tst-sem13, tst-barrier5, tst-signal7, tst-tls3,
tst-tls3-malloc, tst-tls5, tst-stackguard1, tst-sem11-static,
tst-sem12-static, and tst-stackguard1-static to tests-internal.
Link tests-internal with libpthread also.
Don't add $(modules-names) to test-extras.
* nss/Makefile: Move tst-field to tests-internal.
* posix/Makefile: Move bug-regex5, bug-regex20, bug-regex33,
tst-rfc3484, tst-rfc3484-2, and tst-rfc3484-3 to tests-internal.
* stdlib/Makefile: Move tst-strtod1i, tst-strtod3, tst-strtod4,
tst-strtod5i, tst-tls-atexit, and tst-tls-atexit-nodelete to
tests-internal.
* sunrpc/Makefile: Move tst-svc_register to tests-internal.
* sysdeps/powerpc/Makefile: Move test-get_hwcap and
test-get_hwcap-static to tests-internal.
* sysdeps/unix/sysv/linux/Makefile: Move tst-setgetname to
tests-internal.
* sysdeps/x86_64/fpu/Makefile: Add all libmvec test modules to
modules-names-tests.
2016-11-21 01:46:30 +00:00
|
|
|
tests += $(tests-static)
|
|
|
|
|
2019-02-27 21:21:46 +00:00
|
|
|
ifeq (yes,$(have-ifunc))
|
2022-01-14 19:16:05 +00:00
|
|
|
tests-ifuncstatic := \
|
|
|
|
ifuncmain1static \
|
|
|
|
ifuncmain1picstatic \
|
|
|
|
ifuncmain2static \
|
|
|
|
ifuncmain2picstatic \
|
|
|
|
ifuncmain4static \
|
|
|
|
ifuncmain4picstatic \
|
|
|
|
ifuncmain5static \
|
|
|
|
ifuncmain5picstatic \
|
|
|
|
ifuncmain7static \
|
|
|
|
ifuncmain7picstatic \
|
|
|
|
# tests-ifuncstatic
|
2021-03-24 00:10:38 +00:00
|
|
|
ifeq (yes,$(have-gcc-ifunc))
|
|
|
|
tests-ifuncstatic += ifuncmain9static ifuncmain9picstatic
|
|
|
|
endif
|
Suppress internal declarations for most of the testsuite.
This patch adds a new build module called 'testsuite'.
IS_IN (testsuite) implies _ISOMAC, as do IS_IN_build and __cplusplus
(which means several ad-hoc tests for __cplusplus can go away).
libc-symbols.h now suppresses almost all of *itself* when _ISOMAC is
defined; in particular, _ISOMAC mode does not get config.h
automatically anymore.
There are still quite a few tests that need to see internal gunk of
one variety or another. For them, we now have 'tests-internal' and
'test-internal-extras'; files in this category will still be compiled
with MODULE_NAME=nonlib, and everything proceeds as it always has.
The bulk of this patch is moving tests from 'tests' to
'tests-internal'. There is also 'tests-static-internal', which has
the same effect on files in 'tests-static', and 'modules-names-tests',
which has the *inverse* effect on files in 'modules-names' (it's
inverted because most of the things in modules-names are *not* tests).
For both of these, the file must appear in *both* the new variable and
the old one.
There is also now a special case for when libc-symbols.h is included
without MODULE_NAME being defined at all. (This happens during the
creation of libc-modules.h, and also when preprocessing Versions
files.) When this happens, IS_IN is set to be always false and
_ISOMAC is *not* defined, which was the status quo, but now it's
explicit.
The remaining changes to C source files in this patch seemed likely to
cause problems in the absence of the main change. They should be
relatively self-explanatory. In a few cases I duplicated a definition
from an internal header rather than move the test to tests-internal;
this was a judgement call each time and I'm happy to change those
however reviewers feel is more appropriate.
* Makerules: New subdir configuration variables 'tests-internal'
and 'test-internal-extras'. Test files in these categories will
still be compiled with MODULE_NAME=nonlib. Test files in the
existing categories (tests, xtests, test-srcs, test-extras) are
now compiled with MODULE_NAME=testsuite.
New subdir configuration variable 'modules-names-tests'. Files
which are in both 'modules-names' and 'modules-names-tests' will
be compiled with MODULE_NAME=testsuite instead of
MODULE_NAME=extramodules.
(gen-as-const-headers): Move to tests-internal.
(do-tests-clean, common-mostlyclean): Support tests-internal.
* Makeconfig (built-modules): Add testsuite.
* Makefile: Change libof-check-installed-headers-c and
libof-check-installed-headers-cxx to 'testsuite'.
* Rules: Likewise. Support tests-internal.
* benchtests/strcoll-inputs/filelist#en_US.UTF-8:
Remove extra-modules.mk.
* config.h.in: Don't check for __OPTIMIZE__ or __FAST_MATH__ here.
* include/libc-symbols.h: Move definitions of _GNU_SOURCE,
PASTE_NAME, PASTE_NAME1, IN_MODULE, IS_IN, and IS_IN_LIB to the
very top of the file and rationalize their order.
If MODULE_NAME is not defined at all, define IS_IN to always be
false, and don't define _ISOMAC.
If any of IS_IN (testsuite), IS_IN_build, or __cplusplus are
true, define _ISOMAC and suppress everything else in this file,
starting with the inclusion of config.h.
Do check for inappropriate definitions of __OPTIMIZE__ and
__FAST_MATH__ here, but only if _ISOMAC is not defined.
Correct some out-of-date commentary.
* include/math.h: If _ISOMAC is defined, undefine NO_LONG_DOUBLE
and _Mlong_double_ before including math.h.
* include/string.h: If _ISOMAC is defined, don't expose
_STRING_ARCH_unaligned. Move a comment to a more appropriate
location.
* include/errno.h, include/stdio.h, include/stdlib.h, include/string.h
* include/time.h, include/unistd.h, include/wchar.h: No need to
check __cplusplus nor use __BEGIN_DECLS/__END_DECLS.
* misc/sys/cdefs.h (__NTHNL): New macro.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h
(__m81_defun): Use __NTHNL to avoid errors with GCC 6.
* elf/tst-env-setuid-tunables.c: Include config.h with _LIBC
defined, for HAVE_TUNABLES.
* inet/tst-checks-posix.c: No need to define _ISOMAC.
* intl/tst-gettext2.c: Provide own definition of N_.
* math/test-signgam-finite-c99.c: No need to define _ISOMAC.
* math/test-signgam-main.c: No need to define _ISOMAC.
* stdlib/tst-strtod.c: Convert to test-driver. Split locale_test to...
* stdlib/tst-strtod1i.c: ...this new file.
* stdlib/tst-strtod5.c: Convert to test-driver and add copyright notice.
Split tests of __strtod_internal to...
* stdlib/tst-strtod5i.c: ...this new file.
* string/test-string.h: Include stdint.h. Duplicate definition of
inhibit_loop_to_libcall here (from libc-symbols.h).
* string/test-strstr.c: Provide dummy definition of
libc_hidden_builtin_def when including strstr.c.
* sysdeps/ia64/fpu/libm-symbols.h: Suppress entire file in _ISOMAC
mode; no need to test __STRICT_ANSI__ nor __cplusplus as well.
* sysdeps/x86_64/fpu/math-tests-arch.h: Include cpu-features.h.
Don't include init-arch.h.
* sysdeps/x86_64/multiarch/test-multiarch.h: Include cpu-features.h.
Don't include init-arch.h.
* elf/Makefile: Move tst-ptrguard1-static, tst-stackguard1-static,
tst-tls1-static, tst-tls2-static, tst-tls3-static, loadtest,
unload, unload2, circleload1, neededtest, neededtest2,
neededtest3, neededtest4, tst-tls1, tst-tls2, tst-tls3,
tst-tls6, tst-tls7, tst-tls8, tst-dlmopen2, tst-ptrguard1,
tst-stackguard1, tst-_dl_addr_inside_object, and all of the
ifunc tests to tests-internal.
Don't add $(modules-names) to test-extras.
* inet/Makefile: Move tst-inet6_scopeid_pton to tests-internal.
Add tst-deadline to tests-static-internal.
* malloc/Makefile: Move tst-mallocstate and tst-scratch_buffer to
tests-internal.
* misc/Makefile: Move tst-atomic and tst-atomic-long to tests-internal.
* nptl/Makefile: Move tst-typesizes, tst-rwlock19, tst-sem11,
tst-sem12, tst-sem13, tst-barrier5, tst-signal7, tst-tls3,
tst-tls3-malloc, tst-tls5, tst-stackguard1, tst-sem11-static,
tst-sem12-static, and tst-stackguard1-static to tests-internal.
Link tests-internal with libpthread also.
Don't add $(modules-names) to test-extras.
* nss/Makefile: Move tst-field to tests-internal.
* posix/Makefile: Move bug-regex5, bug-regex20, bug-regex33,
tst-rfc3484, tst-rfc3484-2, and tst-rfc3484-3 to tests-internal.
* stdlib/Makefile: Move tst-strtod1i, tst-strtod3, tst-strtod4,
tst-strtod5i, tst-tls-atexit, and tst-tls-atexit-nodelete to
tests-internal.
* sunrpc/Makefile: Move tst-svc_register to tests-internal.
* sysdeps/powerpc/Makefile: Move test-get_hwcap and
test-get_hwcap-static to tests-internal.
* sysdeps/unix/sysv/linux/Makefile: Move tst-setgetname to
tests-internal.
* sysdeps/x86_64/fpu/Makefile: Add all libmvec test modules to
modules-names-tests.
2016-11-21 01:46:30 +00:00
|
|
|
tests-static += $(tests-ifuncstatic)
|
|
|
|
tests-internal += $(tests-ifuncstatic)
|
2009-06-03 23:21:40 +00:00
|
|
|
ifeq (yes,$(build-shared))
|
2022-01-14 19:16:05 +00:00
|
|
|
tests += \
|
|
|
|
tst-ifunc-fault-bindnow \
|
|
|
|
tst-ifunc-fault-lazy \
|
|
|
|
# tests
|
2019-02-28 10:52:44 +00:00
|
|
|
# Note: sysdeps/x86_64/ifuncmain8.c uses ifuncmain8.
|
Suppress internal declarations for most of the testsuite.
This patch adds a new build module called 'testsuite'.
IS_IN (testsuite) implies _ISOMAC, as do IS_IN_build and __cplusplus
(which means several ad-hoc tests for __cplusplus can go away).
libc-symbols.h now suppresses almost all of *itself* when _ISOMAC is
defined; in particular, _ISOMAC mode does not get config.h
automatically anymore.
There are still quite a few tests that need to see internal gunk of
one variety or another. For them, we now have 'tests-internal' and
'test-internal-extras'; files in this category will still be compiled
with MODULE_NAME=nonlib, and everything proceeds as it always has.
The bulk of this patch is moving tests from 'tests' to
'tests-internal'. There is also 'tests-static-internal', which has
the same effect on files in 'tests-static', and 'modules-names-tests',
which has the *inverse* effect on files in 'modules-names' (it's
inverted because most of the things in modules-names are *not* tests).
For both of these, the file must appear in *both* the new variable and
the old one.
There is also now a special case for when libc-symbols.h is included
without MODULE_NAME being defined at all. (This happens during the
creation of libc-modules.h, and also when preprocessing Versions
files.) When this happens, IS_IN is set to be always false and
_ISOMAC is *not* defined, which was the status quo, but now it's
explicit.
The remaining changes to C source files in this patch seemed likely to
cause problems in the absence of the main change. They should be
relatively self-explanatory. In a few cases I duplicated a definition
from an internal header rather than move the test to tests-internal;
this was a judgement call each time and I'm happy to change those
however reviewers feel is more appropriate.
* Makerules: New subdir configuration variables 'tests-internal'
and 'test-internal-extras'. Test files in these categories will
still be compiled with MODULE_NAME=nonlib. Test files in the
existing categories (tests, xtests, test-srcs, test-extras) are
now compiled with MODULE_NAME=testsuite.
New subdir configuration variable 'modules-names-tests'. Files
which are in both 'modules-names' and 'modules-names-tests' will
be compiled with MODULE_NAME=testsuite instead of
MODULE_NAME=extramodules.
(gen-as-const-headers): Move to tests-internal.
(do-tests-clean, common-mostlyclean): Support tests-internal.
* Makeconfig (built-modules): Add testsuite.
* Makefile: Change libof-check-installed-headers-c and
libof-check-installed-headers-cxx to 'testsuite'.
* Rules: Likewise. Support tests-internal.
* benchtests/strcoll-inputs/filelist#en_US.UTF-8:
Remove extra-modules.mk.
* config.h.in: Don't check for __OPTIMIZE__ or __FAST_MATH__ here.
* include/libc-symbols.h: Move definitions of _GNU_SOURCE,
PASTE_NAME, PASTE_NAME1, IN_MODULE, IS_IN, and IS_IN_LIB to the
very top of the file and rationalize their order.
If MODULE_NAME is not defined at all, define IS_IN to always be
false, and don't define _ISOMAC.
If any of IS_IN (testsuite), IS_IN_build, or __cplusplus are
true, define _ISOMAC and suppress everything else in this file,
starting with the inclusion of config.h.
Do check for inappropriate definitions of __OPTIMIZE__ and
__FAST_MATH__ here, but only if _ISOMAC is not defined.
Correct some out-of-date commentary.
* include/math.h: If _ISOMAC is defined, undefine NO_LONG_DOUBLE
and _Mlong_double_ before including math.h.
* include/string.h: If _ISOMAC is defined, don't expose
_STRING_ARCH_unaligned. Move a comment to a more appropriate
location.
* include/errno.h, include/stdio.h, include/stdlib.h, include/string.h
* include/time.h, include/unistd.h, include/wchar.h: No need to
check __cplusplus nor use __BEGIN_DECLS/__END_DECLS.
* misc/sys/cdefs.h (__NTHNL): New macro.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h
(__m81_defun): Use __NTHNL to avoid errors with GCC 6.
* elf/tst-env-setuid-tunables.c: Include config.h with _LIBC
defined, for HAVE_TUNABLES.
* inet/tst-checks-posix.c: No need to define _ISOMAC.
* intl/tst-gettext2.c: Provide own definition of N_.
* math/test-signgam-finite-c99.c: No need to define _ISOMAC.
* math/test-signgam-main.c: No need to define _ISOMAC.
* stdlib/tst-strtod.c: Convert to test-driver. Split locale_test to...
* stdlib/tst-strtod1i.c: ...this new file.
* stdlib/tst-strtod5.c: Convert to test-driver and add copyright notice.
Split tests of __strtod_internal to...
* stdlib/tst-strtod5i.c: ...this new file.
* string/test-string.h: Include stdint.h. Duplicate definition of
inhibit_loop_to_libcall here (from libc-symbols.h).
* string/test-strstr.c: Provide dummy definition of
libc_hidden_builtin_def when including strstr.c.
* sysdeps/ia64/fpu/libm-symbols.h: Suppress entire file in _ISOMAC
mode; no need to test __STRICT_ANSI__ nor __cplusplus as well.
* sysdeps/x86_64/fpu/math-tests-arch.h: Include cpu-features.h.
Don't include init-arch.h.
* sysdeps/x86_64/multiarch/test-multiarch.h: Include cpu-features.h.
Don't include init-arch.h.
* elf/Makefile: Move tst-ptrguard1-static, tst-stackguard1-static,
tst-tls1-static, tst-tls2-static, tst-tls3-static, loadtest,
unload, unload2, circleload1, neededtest, neededtest2,
neededtest3, neededtest4, tst-tls1, tst-tls2, tst-tls3,
tst-tls6, tst-tls7, tst-tls8, tst-dlmopen2, tst-ptrguard1,
tst-stackguard1, tst-_dl_addr_inside_object, and all of the
ifunc tests to tests-internal.
Don't add $(modules-names) to test-extras.
* inet/Makefile: Move tst-inet6_scopeid_pton to tests-internal.
Add tst-deadline to tests-static-internal.
* malloc/Makefile: Move tst-mallocstate and tst-scratch_buffer to
tests-internal.
* misc/Makefile: Move tst-atomic and tst-atomic-long to tests-internal.
* nptl/Makefile: Move tst-typesizes, tst-rwlock19, tst-sem11,
tst-sem12, tst-sem13, tst-barrier5, tst-signal7, tst-tls3,
tst-tls3-malloc, tst-tls5, tst-stackguard1, tst-sem11-static,
tst-sem12-static, and tst-stackguard1-static to tests-internal.
Link tests-internal with libpthread also.
Don't add $(modules-names) to test-extras.
* nss/Makefile: Move tst-field to tests-internal.
* posix/Makefile: Move bug-regex5, bug-regex20, bug-regex33,
tst-rfc3484, tst-rfc3484-2, and tst-rfc3484-3 to tests-internal.
* stdlib/Makefile: Move tst-strtod1i, tst-strtod3, tst-strtod4,
tst-strtod5i, tst-tls-atexit, and tst-tls-atexit-nodelete to
tests-internal.
* sunrpc/Makefile: Move tst-svc_register to tests-internal.
* sysdeps/powerpc/Makefile: Move test-get_hwcap and
test-get_hwcap-static to tests-internal.
* sysdeps/unix/sysv/linux/Makefile: Move tst-setgetname to
tests-internal.
* sysdeps/x86_64/fpu/Makefile: Add all libmvec test modules to
modules-names-tests.
2016-11-21 01:46:30 +00:00
|
|
|
tests-internal += \
|
2022-01-14 19:16:05 +00:00
|
|
|
ifuncmain1pic \
|
|
|
|
ifuncmain1staticpic \
|
|
|
|
ifuncmain1vis \
|
|
|
|
ifuncmain1vispic \
|
|
|
|
ifuncmain2 \
|
|
|
|
ifuncmain2pic \
|
|
|
|
ifuncmain3 \
|
|
|
|
ifuncmain4 \
|
|
|
|
ifuncmain5staticpic \
|
|
|
|
ifuncmain7 \
|
|
|
|
ifuncmain7pic \
|
|
|
|
# tests-internal
|
2021-10-26 11:30:18 +00:00
|
|
|
ifeq (no,$(with-lld))
|
2022-01-14 19:16:05 +00:00
|
|
|
tests-internal += \
|
|
|
|
ifuncmain1 \
|
|
|
|
ifuncmain5 \
|
|
|
|
ifuncmain5pic \
|
|
|
|
# tests-internal
|
2021-10-26 11:30:18 +00:00
|
|
|
endif
|
2021-03-24 00:10:38 +00:00
|
|
|
ifeq (yes,$(have-gcc-ifunc))
|
2022-01-14 19:16:05 +00:00
|
|
|
tests-internal += \
|
|
|
|
ifuncmain9 \
|
|
|
|
ifuncmain9pic \
|
|
|
|
# tests-internal
|
2021-03-24 00:10:38 +00:00
|
|
|
endif
|
2022-01-14 19:16:05 +00:00
|
|
|
ifunc-test-modules = \
|
|
|
|
ifuncdep1 \
|
|
|
|
ifuncdep1pic \
|
|
|
|
ifuncdep2 \
|
|
|
|
ifuncdep2pic \
|
|
|
|
ifuncdep5 \
|
|
|
|
ifuncdep5pic \
|
|
|
|
# ifunc-test-modules
|
2011-01-17 02:32:07 +00:00
|
|
|
extra-test-objs += $(ifunc-test-modules:=.o)
|
Suppress internal declarations for most of the testsuite.
This patch adds a new build module called 'testsuite'.
IS_IN (testsuite) implies _ISOMAC, as do IS_IN_build and __cplusplus
(which means several ad-hoc tests for __cplusplus can go away).
libc-symbols.h now suppresses almost all of *itself* when _ISOMAC is
defined; in particular, _ISOMAC mode does not get config.h
automatically anymore.
There are still quite a few tests that need to see internal gunk of
one variety or another. For them, we now have 'tests-internal' and
'test-internal-extras'; files in this category will still be compiled
with MODULE_NAME=nonlib, and everything proceeds as it always has.
The bulk of this patch is moving tests from 'tests' to
'tests-internal'. There is also 'tests-static-internal', which has
the same effect on files in 'tests-static', and 'modules-names-tests',
which has the *inverse* effect on files in 'modules-names' (it's
inverted because most of the things in modules-names are *not* tests).
For both of these, the file must appear in *both* the new variable and
the old one.
There is also now a special case for when libc-symbols.h is included
without MODULE_NAME being defined at all. (This happens during the
creation of libc-modules.h, and also when preprocessing Versions
files.) When this happens, IS_IN is set to be always false and
_ISOMAC is *not* defined, which was the status quo, but now it's
explicit.
The remaining changes to C source files in this patch seemed likely to
cause problems in the absence of the main change. They should be
relatively self-explanatory. In a few cases I duplicated a definition
from an internal header rather than move the test to tests-internal;
this was a judgement call each time and I'm happy to change those
however reviewers feel is more appropriate.
* Makerules: New subdir configuration variables 'tests-internal'
and 'test-internal-extras'. Test files in these categories will
still be compiled with MODULE_NAME=nonlib. Test files in the
existing categories (tests, xtests, test-srcs, test-extras) are
now compiled with MODULE_NAME=testsuite.
New subdir configuration variable 'modules-names-tests'. Files
which are in both 'modules-names' and 'modules-names-tests' will
be compiled with MODULE_NAME=testsuite instead of
MODULE_NAME=extramodules.
(gen-as-const-headers): Move to tests-internal.
(do-tests-clean, common-mostlyclean): Support tests-internal.
* Makeconfig (built-modules): Add testsuite.
* Makefile: Change libof-check-installed-headers-c and
libof-check-installed-headers-cxx to 'testsuite'.
* Rules: Likewise. Support tests-internal.
* benchtests/strcoll-inputs/filelist#en_US.UTF-8:
Remove extra-modules.mk.
* config.h.in: Don't check for __OPTIMIZE__ or __FAST_MATH__ here.
* include/libc-symbols.h: Move definitions of _GNU_SOURCE,
PASTE_NAME, PASTE_NAME1, IN_MODULE, IS_IN, and IS_IN_LIB to the
very top of the file and rationalize their order.
If MODULE_NAME is not defined at all, define IS_IN to always be
false, and don't define _ISOMAC.
If any of IS_IN (testsuite), IS_IN_build, or __cplusplus are
true, define _ISOMAC and suppress everything else in this file,
starting with the inclusion of config.h.
Do check for inappropriate definitions of __OPTIMIZE__ and
__FAST_MATH__ here, but only if _ISOMAC is not defined.
Correct some out-of-date commentary.
* include/math.h: If _ISOMAC is defined, undefine NO_LONG_DOUBLE
and _Mlong_double_ before including math.h.
* include/string.h: If _ISOMAC is defined, don't expose
_STRING_ARCH_unaligned. Move a comment to a more appropriate
location.
* include/errno.h, include/stdio.h, include/stdlib.h, include/string.h
* include/time.h, include/unistd.h, include/wchar.h: No need to
check __cplusplus nor use __BEGIN_DECLS/__END_DECLS.
* misc/sys/cdefs.h (__NTHNL): New macro.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h
(__m81_defun): Use __NTHNL to avoid errors with GCC 6.
* elf/tst-env-setuid-tunables.c: Include config.h with _LIBC
defined, for HAVE_TUNABLES.
* inet/tst-checks-posix.c: No need to define _ISOMAC.
* intl/tst-gettext2.c: Provide own definition of N_.
* math/test-signgam-finite-c99.c: No need to define _ISOMAC.
* math/test-signgam-main.c: No need to define _ISOMAC.
* stdlib/tst-strtod.c: Convert to test-driver. Split locale_test to...
* stdlib/tst-strtod1i.c: ...this new file.
* stdlib/tst-strtod5.c: Convert to test-driver and add copyright notice.
Split tests of __strtod_internal to...
* stdlib/tst-strtod5i.c: ...this new file.
* string/test-string.h: Include stdint.h. Duplicate definition of
inhibit_loop_to_libcall here (from libc-symbols.h).
* string/test-strstr.c: Provide dummy definition of
libc_hidden_builtin_def when including strstr.c.
* sysdeps/ia64/fpu/libm-symbols.h: Suppress entire file in _ISOMAC
mode; no need to test __STRICT_ANSI__ nor __cplusplus as well.
* sysdeps/x86_64/fpu/math-tests-arch.h: Include cpu-features.h.
Don't include init-arch.h.
* sysdeps/x86_64/multiarch/test-multiarch.h: Include cpu-features.h.
Don't include init-arch.h.
* elf/Makefile: Move tst-ptrguard1-static, tst-stackguard1-static,
tst-tls1-static, tst-tls2-static, tst-tls3-static, loadtest,
unload, unload2, circleload1, neededtest, neededtest2,
neededtest3, neededtest4, tst-tls1, tst-tls2, tst-tls3,
tst-tls6, tst-tls7, tst-tls8, tst-dlmopen2, tst-ptrguard1,
tst-stackguard1, tst-_dl_addr_inside_object, and all of the
ifunc tests to tests-internal.
Don't add $(modules-names) to test-extras.
* inet/Makefile: Move tst-inet6_scopeid_pton to tests-internal.
Add tst-deadline to tests-static-internal.
* malloc/Makefile: Move tst-mallocstate and tst-scratch_buffer to
tests-internal.
* misc/Makefile: Move tst-atomic and tst-atomic-long to tests-internal.
* nptl/Makefile: Move tst-typesizes, tst-rwlock19, tst-sem11,
tst-sem12, tst-sem13, tst-barrier5, tst-signal7, tst-tls3,
tst-tls3-malloc, tst-tls5, tst-stackguard1, tst-sem11-static,
tst-sem12-static, and tst-stackguard1-static to tests-internal.
Link tests-internal with libpthread also.
Don't add $(modules-names) to test-extras.
* nss/Makefile: Move tst-field to tests-internal.
* posix/Makefile: Move bug-regex5, bug-regex20, bug-regex33,
tst-rfc3484, tst-rfc3484-2, and tst-rfc3484-3 to tests-internal.
* stdlib/Makefile: Move tst-strtod1i, tst-strtod3, tst-strtod4,
tst-strtod5i, tst-tls-atexit, and tst-tls-atexit-nodelete to
tests-internal.
* sunrpc/Makefile: Move tst-svc_register to tests-internal.
* sysdeps/powerpc/Makefile: Move test-get_hwcap and
test-get_hwcap-static to tests-internal.
* sysdeps/unix/sysv/linux/Makefile: Move tst-setgetname to
tests-internal.
* sysdeps/x86_64/fpu/Makefile: Add all libmvec test modules to
modules-names-tests.
2016-11-21 01:46:30 +00:00
|
|
|
test-internal-extras += $(ifunc-test-modules)
|
2009-06-03 23:21:40 +00:00
|
|
|
ifeq (yes,$(have-fpie))
|
2022-01-14 19:16:05 +00:00
|
|
|
ifunc-pie-tests = \
|
|
|
|
ifuncmain1pie \
|
|
|
|
ifuncmain1staticpie \
|
|
|
|
ifuncmain1vispie \
|
|
|
|
ifuncmain6pie \
|
|
|
|
ifuncmain7pie \
|
|
|
|
# ifunc-pie-tests
|
2021-03-24 00:10:38 +00:00
|
|
|
ifeq (yes,$(have-gcc-ifunc))
|
|
|
|
ifunc-pie-tests += ifuncmain9pie
|
|
|
|
endif
|
2021-10-26 11:30:18 +00:00
|
|
|
ifeq (no,$(with-lld))
|
|
|
|
ifunc-pie-tests += ifuncmain5pie
|
|
|
|
endif
|
Fix ifunc support with DT_TEXTREL segments (BZ#20480)
Currently, DT_TEXTREL is incompatible with IFUNC. When DT_TEXTREL or
DF_TEXTREL is seen, the dynamic linker calls __mprotect on the segments
with PROT_READ|PROT_WRITE before applying dynamic relocations. It leads
to segfault when performing IFUNC resolution (which requires PROT_EXEC
as well for the IFUNC resolver).
This patch makes it call __mprotect with extra PROT_WRITE bit, which
will keep the PROT_EXEC bit if exists, and thus fixes the segfault.
FreeBSD rtld libexec/rtld-elf/rtld.c (reloc_textrel_prot) does the same.
Checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu,
sparc64-linux-gnu, sparcv9-linux-gnu, and armv8-linux-gnueabihf.
Adam J. Richte <adam_richter2004@yahoo.com>
Adhemerval Zanella <adhemerval.zanella@linaro.org>
Fangrui Song <maskray@google.com>
[BZ #20480]
* config.h.in (CAN_TEXTREL_IFUNC): New define.
* configure.ac: Add check if linker supports textrel relocation with
ifunc.
* elf/dl-reloc.c (_dl_relocate_object): Use all required flags on
DT_TEXTREL segments, not only PROT_READ and PROT_WRITE.
* elf/Makefile (ifunc-pie-tests): Add tst-ifunc-textrel.
(CFLAGS-tst-ifunc-textrel.c): New rule.
* elf/tst-ifunc-textrel.c: New file.
2018-08-27 19:16:43 +00:00
|
|
|
ifeq (yes,$(have-textrel_ifunc))
|
|
|
|
ifunc-pie-tests += tst-ifunc-textrel
|
|
|
|
endif
|
Suppress internal declarations for most of the testsuite.
This patch adds a new build module called 'testsuite'.
IS_IN (testsuite) implies _ISOMAC, as do IS_IN_build and __cplusplus
(which means several ad-hoc tests for __cplusplus can go away).
libc-symbols.h now suppresses almost all of *itself* when _ISOMAC is
defined; in particular, _ISOMAC mode does not get config.h
automatically anymore.
There are still quite a few tests that need to see internal gunk of
one variety or another. For them, we now have 'tests-internal' and
'test-internal-extras'; files in this category will still be compiled
with MODULE_NAME=nonlib, and everything proceeds as it always has.
The bulk of this patch is moving tests from 'tests' to
'tests-internal'. There is also 'tests-static-internal', which has
the same effect on files in 'tests-static', and 'modules-names-tests',
which has the *inverse* effect on files in 'modules-names' (it's
inverted because most of the things in modules-names are *not* tests).
For both of these, the file must appear in *both* the new variable and
the old one.
There is also now a special case for when libc-symbols.h is included
without MODULE_NAME being defined at all. (This happens during the
creation of libc-modules.h, and also when preprocessing Versions
files.) When this happens, IS_IN is set to be always false and
_ISOMAC is *not* defined, which was the status quo, but now it's
explicit.
The remaining changes to C source files in this patch seemed likely to
cause problems in the absence of the main change. They should be
relatively self-explanatory. In a few cases I duplicated a definition
from an internal header rather than move the test to tests-internal;
this was a judgement call each time and I'm happy to change those
however reviewers feel is more appropriate.
* Makerules: New subdir configuration variables 'tests-internal'
and 'test-internal-extras'. Test files in these categories will
still be compiled with MODULE_NAME=nonlib. Test files in the
existing categories (tests, xtests, test-srcs, test-extras) are
now compiled with MODULE_NAME=testsuite.
New subdir configuration variable 'modules-names-tests'. Files
which are in both 'modules-names' and 'modules-names-tests' will
be compiled with MODULE_NAME=testsuite instead of
MODULE_NAME=extramodules.
(gen-as-const-headers): Move to tests-internal.
(do-tests-clean, common-mostlyclean): Support tests-internal.
* Makeconfig (built-modules): Add testsuite.
* Makefile: Change libof-check-installed-headers-c and
libof-check-installed-headers-cxx to 'testsuite'.
* Rules: Likewise. Support tests-internal.
* benchtests/strcoll-inputs/filelist#en_US.UTF-8:
Remove extra-modules.mk.
* config.h.in: Don't check for __OPTIMIZE__ or __FAST_MATH__ here.
* include/libc-symbols.h: Move definitions of _GNU_SOURCE,
PASTE_NAME, PASTE_NAME1, IN_MODULE, IS_IN, and IS_IN_LIB to the
very top of the file and rationalize their order.
If MODULE_NAME is not defined at all, define IS_IN to always be
false, and don't define _ISOMAC.
If any of IS_IN (testsuite), IS_IN_build, or __cplusplus are
true, define _ISOMAC and suppress everything else in this file,
starting with the inclusion of config.h.
Do check for inappropriate definitions of __OPTIMIZE__ and
__FAST_MATH__ here, but only if _ISOMAC is not defined.
Correct some out-of-date commentary.
* include/math.h: If _ISOMAC is defined, undefine NO_LONG_DOUBLE
and _Mlong_double_ before including math.h.
* include/string.h: If _ISOMAC is defined, don't expose
_STRING_ARCH_unaligned. Move a comment to a more appropriate
location.
* include/errno.h, include/stdio.h, include/stdlib.h, include/string.h
* include/time.h, include/unistd.h, include/wchar.h: No need to
check __cplusplus nor use __BEGIN_DECLS/__END_DECLS.
* misc/sys/cdefs.h (__NTHNL): New macro.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h
(__m81_defun): Use __NTHNL to avoid errors with GCC 6.
* elf/tst-env-setuid-tunables.c: Include config.h with _LIBC
defined, for HAVE_TUNABLES.
* inet/tst-checks-posix.c: No need to define _ISOMAC.
* intl/tst-gettext2.c: Provide own definition of N_.
* math/test-signgam-finite-c99.c: No need to define _ISOMAC.
* math/test-signgam-main.c: No need to define _ISOMAC.
* stdlib/tst-strtod.c: Convert to test-driver. Split locale_test to...
* stdlib/tst-strtod1i.c: ...this new file.
* stdlib/tst-strtod5.c: Convert to test-driver and add copyright notice.
Split tests of __strtod_internal to...
* stdlib/tst-strtod5i.c: ...this new file.
* string/test-string.h: Include stdint.h. Duplicate definition of
inhibit_loop_to_libcall here (from libc-symbols.h).
* string/test-strstr.c: Provide dummy definition of
libc_hidden_builtin_def when including strstr.c.
* sysdeps/ia64/fpu/libm-symbols.h: Suppress entire file in _ISOMAC
mode; no need to test __STRICT_ANSI__ nor __cplusplus as well.
* sysdeps/x86_64/fpu/math-tests-arch.h: Include cpu-features.h.
Don't include init-arch.h.
* sysdeps/x86_64/multiarch/test-multiarch.h: Include cpu-features.h.
Don't include init-arch.h.
* elf/Makefile: Move tst-ptrguard1-static, tst-stackguard1-static,
tst-tls1-static, tst-tls2-static, tst-tls3-static, loadtest,
unload, unload2, circleload1, neededtest, neededtest2,
neededtest3, neededtest4, tst-tls1, tst-tls2, tst-tls3,
tst-tls6, tst-tls7, tst-tls8, tst-dlmopen2, tst-ptrguard1,
tst-stackguard1, tst-_dl_addr_inside_object, and all of the
ifunc tests to tests-internal.
Don't add $(modules-names) to test-extras.
* inet/Makefile: Move tst-inet6_scopeid_pton to tests-internal.
Add tst-deadline to tests-static-internal.
* malloc/Makefile: Move tst-mallocstate and tst-scratch_buffer to
tests-internal.
* misc/Makefile: Move tst-atomic and tst-atomic-long to tests-internal.
* nptl/Makefile: Move tst-typesizes, tst-rwlock19, tst-sem11,
tst-sem12, tst-sem13, tst-barrier5, tst-signal7, tst-tls3,
tst-tls3-malloc, tst-tls5, tst-stackguard1, tst-sem11-static,
tst-sem12-static, and tst-stackguard1-static to tests-internal.
Link tests-internal with libpthread also.
Don't add $(modules-names) to test-extras.
* nss/Makefile: Move tst-field to tests-internal.
* posix/Makefile: Move bug-regex5, bug-regex20, bug-regex33,
tst-rfc3484, tst-rfc3484-2, and tst-rfc3484-3 to tests-internal.
* stdlib/Makefile: Move tst-strtod1i, tst-strtod3, tst-strtod4,
tst-strtod5i, tst-tls-atexit, and tst-tls-atexit-nodelete to
tests-internal.
* sunrpc/Makefile: Move tst-svc_register to tests-internal.
* sysdeps/powerpc/Makefile: Move test-get_hwcap and
test-get_hwcap-static to tests-internal.
* sysdeps/unix/sysv/linux/Makefile: Move tst-setgetname to
tests-internal.
* sysdeps/x86_64/fpu/Makefile: Add all libmvec test modules to
modules-names-tests.
2016-11-21 01:46:30 +00:00
|
|
|
tests-internal += $(ifunc-pie-tests)
|
2011-05-14 03:31:43 +00:00
|
|
|
tests-pie += $(ifunc-pie-tests)
|
2009-06-03 23:21:40 +00:00
|
|
|
endif
|
2022-01-14 19:16:05 +00:00
|
|
|
modules-names += \
|
|
|
|
ifuncmod1 \
|
|
|
|
ifuncmod3 \
|
|
|
|
ifuncmod6 \
|
|
|
|
# module-names
|
2021-10-26 11:30:18 +00:00
|
|
|
ifeq (no,$(with-lld))
|
|
|
|
modules-names += ifuncmod5
|
|
|
|
endif
|
2009-06-03 23:21:40 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
Enumerate tests with special rules in tests-special variable.
This patch is a revised and updated version of
<https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>.
In order to generate overall summaries of the results of all tests in
the glibc testsuite, we need to identify and concatenate the files
with the results of individual tests.
Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this.
However, the normal glibc approach is explicit enumeration of the
expected set of files with a given property, rather than all files
matching some pattern like that. Furthermore, we would like to be
able to mark tests as UNRESOLVED if the file with their results is for
some reason missing, and in future we would like to be able to mark
tests as UNSUPPORTED if they are disabled for a particular
configuration (rather than simply having them missing from the list of
tests as at present). Such handling of tests that were not run or did
not record results requires an explicit enumeration of tests.
For the tests following the default makefile rules, $(tests) (and
$(xtests)) provides such an enumeration. Others, however, are added
directly as dependencies of the "tests" and "xtests" makefile
targets. This patch changes the makefiles to put them in variables
tests-special and xtests-special, with appropriate dependencies on the
tests listed there then being added centrally.
Those variables are used in Rules and so need to be set before Rules
is included in a subdirectory makefile, which is often earlier in the
makefile than the dependencies were present before. We previously
discussed the question of where to include Rules; see the question at
<https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a
discussion in
<https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why
Rules is included early rather than late in subdirectory makefiles.
It was necessary to avoid an indirection through the check-abi target
and get the check-abi-* targets for individual libraries into the
tests-special variable. The intl/ test $(objpfx)tst-gettext.out,
previously built only because of dependencies from other tests, was
also added to tests-special for the same reason.
The entries in tests-special are the full makefile targets, complete
with $(objpfx) and .out. If a future change causes tests to be named
consistently with a .out suffix, this can be changed to include just
the path relative to $(objpfx), without .out.
Tested x86_64, including that the same set of files is generated in
the build directory by a build and testsuite run both before and after
the patch (except for changes to the
elf/tst-null-argv.debug.out.<number> file name), and a build with
run-built-tests=no to verify there aren't any more obvious instances
of the issue Marcus Shawcroft reported with a previous version in
<https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>.
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(tests): Depend on $(tests-special).
* Makerules (check-abi-list): New variable.
(check-abi): Depend on $(check-abi-list).
[$(subdir) = elf] (tests-special): Add
$(objpfx)check-abi-libc.out.
[$(build-shared) = yes && subdir] (tests-special): Add
$(check-abi-list).
[$(build-shared) = yes && subdir] (tests): Do not depend on
check-abi.
* Rules (tests): Depend on $(tests-special).
(xtests): Depend on $(xtests-special).
* catgets/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* conform/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* elf/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* grp/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* iconv/Makefile (xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* iconvdata/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* intl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable. Also add
$(objpfx)tst-gettext.out.
* io/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* libio/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* malloc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* misc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl_db/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* posix/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* resolv/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* stdio-common/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(do-tst-unbputc): Remove target.
(do-tst-printf): Likewise.
* stdlib/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* string/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* sysdeps/x86/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
localedata:
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
2014-03-06 22:35:33 +00:00
|
|
|
ifeq (yes,$(build-shared))
|
|
|
|
ifeq ($(run-built-tests),yes)
|
2022-01-14 19:16:05 +00:00
|
|
|
tests-special += \
|
|
|
|
$(objpfx)argv0test.out \
|
|
|
|
$(objpfx)tst-pathopt.out \
|
|
|
|
$(objpfx)tst-rtld-help.out \
|
|
|
|
$(objpfx)tst-rtld-load-self.out \
|
|
|
|
$(objpfx)tst-rtld-preload.out \
|
|
|
|
# tests-special
|
Enumerate tests with special rules in tests-special variable.
This patch is a revised and updated version of
<https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>.
In order to generate overall summaries of the results of all tests in
the glibc testsuite, we need to identify and concatenate the files
with the results of individual tests.
Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this.
However, the normal glibc approach is explicit enumeration of the
expected set of files with a given property, rather than all files
matching some pattern like that. Furthermore, we would like to be
able to mark tests as UNRESOLVED if the file with their results is for
some reason missing, and in future we would like to be able to mark
tests as UNSUPPORTED if they are disabled for a particular
configuration (rather than simply having them missing from the list of
tests as at present). Such handling of tests that were not run or did
not record results requires an explicit enumeration of tests.
For the tests following the default makefile rules, $(tests) (and
$(xtests)) provides such an enumeration. Others, however, are added
directly as dependencies of the "tests" and "xtests" makefile
targets. This patch changes the makefiles to put them in variables
tests-special and xtests-special, with appropriate dependencies on the
tests listed there then being added centrally.
Those variables are used in Rules and so need to be set before Rules
is included in a subdirectory makefile, which is often earlier in the
makefile than the dependencies were present before. We previously
discussed the question of where to include Rules; see the question at
<https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a
discussion in
<https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why
Rules is included early rather than late in subdirectory makefiles.
It was necessary to avoid an indirection through the check-abi target
and get the check-abi-* targets for individual libraries into the
tests-special variable. The intl/ test $(objpfx)tst-gettext.out,
previously built only because of dependencies from other tests, was
also added to tests-special for the same reason.
The entries in tests-special are the full makefile targets, complete
with $(objpfx) and .out. If a future change causes tests to be named
consistently with a .out suffix, this can be changed to include just
the path relative to $(objpfx), without .out.
Tested x86_64, including that the same set of files is generated in
the build directory by a build and testsuite run both before and after
the patch (except for changes to the
elf/tst-null-argv.debug.out.<number> file name), and a build with
run-built-tests=no to verify there aren't any more obvious instances
of the issue Marcus Shawcroft reported with a previous version in
<https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>.
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(tests): Depend on $(tests-special).
* Makerules (check-abi-list): New variable.
(check-abi): Depend on $(check-abi-list).
[$(subdir) = elf] (tests-special): Add
$(objpfx)check-abi-libc.out.
[$(build-shared) = yes && subdir] (tests-special): Add
$(check-abi-list).
[$(build-shared) = yes && subdir] (tests): Do not depend on
check-abi.
* Rules (tests): Depend on $(tests-special).
(xtests): Depend on $(xtests-special).
* catgets/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* conform/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* elf/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* grp/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* iconv/Makefile (xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* iconvdata/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* intl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable. Also add
$(objpfx)tst-gettext.out.
* io/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* libio/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* malloc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* misc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl_db/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* posix/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* resolv/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* stdio-common/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(do-tst-unbputc): Remove target.
(do-tst-printf): Likewise.
* stdlib/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* string/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* sysdeps/x86/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
localedata:
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
2014-03-06 22:35:33 +00:00
|
|
|
endif
|
2022-01-14 19:16:05 +00:00
|
|
|
tests-special += \
|
|
|
|
$(objpfx)check-execstack.out \
|
|
|
|
$(objpfx)check-initfini.out \
|
|
|
|
$(objpfx)check-localplt.out \
|
|
|
|
$(objpfx)check-textrel.out \
|
|
|
|
$(objpfx)check-wx-segment.out \
|
|
|
|
# tests-special
|
Enumerate tests with special rules in tests-special variable.
This patch is a revised and updated version of
<https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>.
In order to generate overall summaries of the results of all tests in
the glibc testsuite, we need to identify and concatenate the files
with the results of individual tests.
Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this.
However, the normal glibc approach is explicit enumeration of the
expected set of files with a given property, rather than all files
matching some pattern like that. Furthermore, we would like to be
able to mark tests as UNRESOLVED if the file with their results is for
some reason missing, and in future we would like to be able to mark
tests as UNSUPPORTED if they are disabled for a particular
configuration (rather than simply having them missing from the list of
tests as at present). Such handling of tests that were not run or did
not record results requires an explicit enumeration of tests.
For the tests following the default makefile rules, $(tests) (and
$(xtests)) provides such an enumeration. Others, however, are added
directly as dependencies of the "tests" and "xtests" makefile
targets. This patch changes the makefiles to put them in variables
tests-special and xtests-special, with appropriate dependencies on the
tests listed there then being added centrally.
Those variables are used in Rules and so need to be set before Rules
is included in a subdirectory makefile, which is often earlier in the
makefile than the dependencies were present before. We previously
discussed the question of where to include Rules; see the question at
<https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a
discussion in
<https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why
Rules is included early rather than late in subdirectory makefiles.
It was necessary to avoid an indirection through the check-abi target
and get the check-abi-* targets for individual libraries into the
tests-special variable. The intl/ test $(objpfx)tst-gettext.out,
previously built only because of dependencies from other tests, was
also added to tests-special for the same reason.
The entries in tests-special are the full makefile targets, complete
with $(objpfx) and .out. If a future change causes tests to be named
consistently with a .out suffix, this can be changed to include just
the path relative to $(objpfx), without .out.
Tested x86_64, including that the same set of files is generated in
the build directory by a build and testsuite run both before and after
the patch (except for changes to the
elf/tst-null-argv.debug.out.<number> file name), and a build with
run-built-tests=no to verify there aren't any more obvious instances
of the issue Marcus Shawcroft reported with a previous version in
<https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>.
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(tests): Depend on $(tests-special).
* Makerules (check-abi-list): New variable.
(check-abi): Depend on $(check-abi-list).
[$(subdir) = elf] (tests-special): Add
$(objpfx)check-abi-libc.out.
[$(build-shared) = yes && subdir] (tests-special): Add
$(check-abi-list).
[$(build-shared) = yes && subdir] (tests): Do not depend on
check-abi.
* Rules (tests): Depend on $(tests-special).
(xtests): Depend on $(xtests-special).
* catgets/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* conform/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* elf/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* grp/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* iconv/Makefile (xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* iconvdata/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* intl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable. Also add
$(objpfx)tst-gettext.out.
* io/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* libio/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* malloc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* misc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl_db/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* posix/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* resolv/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* stdio-common/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(do-tst-unbputc): Remove target.
(do-tst-printf): Likewise.
* stdlib/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* string/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* sysdeps/x86/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
localedata:
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
2014-03-06 22:35:33 +00:00
|
|
|
endif
|
2005-10-16 09:25:59 +00:00
|
|
|
|
Enumerate tests with special rules in tests-special variable.
This patch is a revised and updated version of
<https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>.
In order to generate overall summaries of the results of all tests in
the glibc testsuite, we need to identify and concatenate the files
with the results of individual tests.
Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this.
However, the normal glibc approach is explicit enumeration of the
expected set of files with a given property, rather than all files
matching some pattern like that. Furthermore, we would like to be
able to mark tests as UNRESOLVED if the file with their results is for
some reason missing, and in future we would like to be able to mark
tests as UNSUPPORTED if they are disabled for a particular
configuration (rather than simply having them missing from the list of
tests as at present). Such handling of tests that were not run or did
not record results requires an explicit enumeration of tests.
For the tests following the default makefile rules, $(tests) (and
$(xtests)) provides such an enumeration. Others, however, are added
directly as dependencies of the "tests" and "xtests" makefile
targets. This patch changes the makefiles to put them in variables
tests-special and xtests-special, with appropriate dependencies on the
tests listed there then being added centrally.
Those variables are used in Rules and so need to be set before Rules
is included in a subdirectory makefile, which is often earlier in the
makefile than the dependencies were present before. We previously
discussed the question of where to include Rules; see the question at
<https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a
discussion in
<https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why
Rules is included early rather than late in subdirectory makefiles.
It was necessary to avoid an indirection through the check-abi target
and get the check-abi-* targets for individual libraries into the
tests-special variable. The intl/ test $(objpfx)tst-gettext.out,
previously built only because of dependencies from other tests, was
also added to tests-special for the same reason.
The entries in tests-special are the full makefile targets, complete
with $(objpfx) and .out. If a future change causes tests to be named
consistently with a .out suffix, this can be changed to include just
the path relative to $(objpfx), without .out.
Tested x86_64, including that the same set of files is generated in
the build directory by a build and testsuite run both before and after
the patch (except for changes to the
elf/tst-null-argv.debug.out.<number> file name), and a build with
run-built-tests=no to verify there aren't any more obvious instances
of the issue Marcus Shawcroft reported with a previous version in
<https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>.
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(tests): Depend on $(tests-special).
* Makerules (check-abi-list): New variable.
(check-abi): Depend on $(check-abi-list).
[$(subdir) = elf] (tests-special): Add
$(objpfx)check-abi-libc.out.
[$(build-shared) = yes && subdir] (tests-special): Add
$(check-abi-list).
[$(build-shared) = yes && subdir] (tests): Do not depend on
check-abi.
* Rules (tests): Depend on $(tests-special).
(xtests): Depend on $(xtests-special).
* catgets/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* conform/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* elf/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* grp/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* iconv/Makefile (xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* iconvdata/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* intl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable. Also add
$(objpfx)tst-gettext.out.
* io/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* libio/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* malloc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* misc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl_db/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* posix/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* resolv/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* stdio-common/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(do-tst-unbputc): Remove target.
(do-tst-printf): Likewise.
* stdlib/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* string/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* sysdeps/x86/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
localedata:
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
2014-03-06 22:35:33 +00:00
|
|
|
ifeq ($(run-built-tests),yes)
|
2022-01-14 19:16:05 +00:00
|
|
|
tests-special += \
|
|
|
|
$(objpfx)order-cmp.out \
|
|
|
|
$(objpfx)order2-cmp.out \
|
|
|
|
$(objpfx)tst-array1-cmp.out \
|
|
|
|
$(objpfx)tst-array1-static-cmp.out \
|
|
|
|
$(objpfx)tst-array2-cmp.out \
|
|
|
|
$(objpfx)tst-array3-cmp.out \
|
|
|
|
$(objpfx)tst-array4-cmp.out \
|
|
|
|
$(objpfx)tst-array5-cmp.out \
|
|
|
|
$(objpfx)tst-array5-static-cmp.out \
|
|
|
|
$(objpfx)tst-initorder-cmp.out \
|
|
|
|
$(objpfx)tst-initorder2-cmp.out \
|
|
|
|
$(objpfx)tst-unused-dep-cmp.out \
|
|
|
|
$(objpfx)tst-unused-dep.out \
|
2022-02-08 18:22:49 +00:00
|
|
|
$(objpfx)tst-trace1.out \
|
|
|
|
$(objpfx)tst-trace2.out \
|
|
|
|
$(objpfx)tst-trace3.out \
|
|
|
|
$(objpfx)tst-trace4.out \
|
|
|
|
$(objpfx)tst-trace5.out \
|
2022-01-14 19:16:05 +00:00
|
|
|
# tests-special
|
Enumerate tests with special rules in tests-special variable.
This patch is a revised and updated version of
<https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>.
In order to generate overall summaries of the results of all tests in
the glibc testsuite, we need to identify and concatenate the files
with the results of individual tests.
Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this.
However, the normal glibc approach is explicit enumeration of the
expected set of files with a given property, rather than all files
matching some pattern like that. Furthermore, we would like to be
able to mark tests as UNRESOLVED if the file with their results is for
some reason missing, and in future we would like to be able to mark
tests as UNSUPPORTED if they are disabled for a particular
configuration (rather than simply having them missing from the list of
tests as at present). Such handling of tests that were not run or did
not record results requires an explicit enumeration of tests.
For the tests following the default makefile rules, $(tests) (and
$(xtests)) provides such an enumeration. Others, however, are added
directly as dependencies of the "tests" and "xtests" makefile
targets. This patch changes the makefiles to put them in variables
tests-special and xtests-special, with appropriate dependencies on the
tests listed there then being added centrally.
Those variables are used in Rules and so need to be set before Rules
is included in a subdirectory makefile, which is often earlier in the
makefile than the dependencies were present before. We previously
discussed the question of where to include Rules; see the question at
<https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a
discussion in
<https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why
Rules is included early rather than late in subdirectory makefiles.
It was necessary to avoid an indirection through the check-abi target
and get the check-abi-* targets for individual libraries into the
tests-special variable. The intl/ test $(objpfx)tst-gettext.out,
previously built only because of dependencies from other tests, was
also added to tests-special for the same reason.
The entries in tests-special are the full makefile targets, complete
with $(objpfx) and .out. If a future change causes tests to be named
consistently with a .out suffix, this can be changed to include just
the path relative to $(objpfx), without .out.
Tested x86_64, including that the same set of files is generated in
the build directory by a build and testsuite run both before and after
the patch (except for changes to the
elf/tst-null-argv.debug.out.<number> file name), and a build with
run-built-tests=no to verify there aren't any more obvious instances
of the issue Marcus Shawcroft reported with a previous version in
<https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>.
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(tests): Depend on $(tests-special).
* Makerules (check-abi-list): New variable.
(check-abi): Depend on $(check-abi-list).
[$(subdir) = elf] (tests-special): Add
$(objpfx)check-abi-libc.out.
[$(build-shared) = yes && subdir] (tests-special): Add
$(check-abi-list).
[$(build-shared) = yes && subdir] (tests): Do not depend on
check-abi.
* Rules (tests): Depend on $(tests-special).
(xtests): Depend on $(xtests-special).
* catgets/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* conform/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* elf/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* grp/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* iconv/Makefile (xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* iconvdata/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* intl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable. Also add
$(objpfx)tst-gettext.out.
* io/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* libio/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* malloc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* misc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl_db/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* posix/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* resolv/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* stdio-common/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(do-tst-unbputc): Remove target.
(do-tst-printf): Likewise.
* stdlib/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* string/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* sysdeps/x86/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
localedata:
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
2014-03-06 22:35:33 +00:00
|
|
|
endif
|
1995-05-02 06:35:55 +00:00
|
|
|
|
2021-11-16 00:28:39 +00:00
|
|
|
ifndef avoid-generated
|
elf: Testing infrastructure for ld.so DSO sorting (BZ #17645)
This is the first of a 2-part patch set that fixes slow DSO sorting behavior in
the dynamic loader, as reported in BZ #17645. In order to facilitate such a
large modification to the dynamic loader, this first patch implements a testing
framework for validating shared object sorting behavior, to enable comparison
between old/new sorting algorithms, and any later enhancements.
This testing infrastructure consists of a Python script
scripts/dso-ordering-test.py' which takes in a description language, consisting
of strings that describe a set of link dependency relations between DSOs, and
generates testcase programs and Makefile fragments to automatically test the
described situation, for example:
a->b->c->d # four objects linked one after another
a->[bc]->d;b->c # a depends on b and c, which both depend on d,
# b depends on c (b,c linked to object a in fixed order)
a->b->c;{+a;%a;-a} # a, b, c serially dependent, main program uses
# dlopen/dlsym/dlclose on object a
a->b->c;{}!->[abc] # a, b, c serially dependent; multiple tests generated
# to test all permutations of a, b, c ordering linked
# to main program
(Above is just a short description of what the script can do, more
documentation is in the script comments.)
Two files containing several new tests, elf/dso-sort-tests-[12].def are added,
including test scenarios for BZ #15311 and Redhat issue #1162810 [1].
Due to the nature of dynamic loader tests, where the sorting behavior and test
output occurs before/after main(), generating testcases to use
support/test-driver.c does not suffice to control meaningful timeout for ld.so.
Therefore a new utility program 'support/test-run-command', based on
test-driver.c/support_test_main.c has been added. This does the same testcase
control, but for a program specified through a command-line rather than at the
source code level. This utility is used to run the dynamic loader testcases
generated by dso-ordering-test.py.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1162810
Signed-off-by: Chung-Lin Tang <cltang@codesourcery.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-10-21 13:41:21 +00:00
|
|
|
# DSO sorting tests:
|
|
|
|
# The dso-ordering-test.py script generates testcase source files in $(objpfx),
|
|
|
|
# creating a $(objpfx)<testcase-name>-dir for each testcase, and creates a
|
|
|
|
# Makefile fragment to be included.
|
|
|
|
define include_dsosort_tests
|
|
|
|
$(objpfx)$(1).generated-makefile: $(1)
|
|
|
|
$(PYTHON) $(..)scripts/dso-ordering-test.py \
|
2021-11-16 00:28:39 +00:00
|
|
|
--description-file $$< --objpfx $(objpfx) --output-makefile $$@T
|
|
|
|
mv $$@T $$@
|
|
|
|
-include $(objpfx)$(1).generated-makefile
|
elf: Testing infrastructure for ld.so DSO sorting (BZ #17645)
This is the first of a 2-part patch set that fixes slow DSO sorting behavior in
the dynamic loader, as reported in BZ #17645. In order to facilitate such a
large modification to the dynamic loader, this first patch implements a testing
framework for validating shared object sorting behavior, to enable comparison
between old/new sorting algorithms, and any later enhancements.
This testing infrastructure consists of a Python script
scripts/dso-ordering-test.py' which takes in a description language, consisting
of strings that describe a set of link dependency relations between DSOs, and
generates testcase programs and Makefile fragments to automatically test the
described situation, for example:
a->b->c->d # four objects linked one after another
a->[bc]->d;b->c # a depends on b and c, which both depend on d,
# b depends on c (b,c linked to object a in fixed order)
a->b->c;{+a;%a;-a} # a, b, c serially dependent, main program uses
# dlopen/dlsym/dlclose on object a
a->b->c;{}!->[abc] # a, b, c serially dependent; multiple tests generated
# to test all permutations of a, b, c ordering linked
# to main program
(Above is just a short description of what the script can do, more
documentation is in the script comments.)
Two files containing several new tests, elf/dso-sort-tests-[12].def are added,
including test scenarios for BZ #15311 and Redhat issue #1162810 [1].
Due to the nature of dynamic loader tests, where the sorting behavior and test
output occurs before/after main(), generating testcases to use
support/test-driver.c does not suffice to control meaningful timeout for ld.so.
Therefore a new utility program 'support/test-run-command', based on
test-driver.c/support_test_main.c has been added. This does the same testcase
control, but for a program specified through a command-line rather than at the
source code level. This utility is used to run the dynamic loader testcases
generated by dso-ordering-test.py.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1162810
Signed-off-by: Chung-Lin Tang <cltang@codesourcery.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-10-21 13:41:21 +00:00
|
|
|
endef
|
2021-11-16 00:28:39 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
postclean-generated += $(objpfx)/dso-sort-tests-2.generated-makefile \
|
|
|
|
$(objpfx)/dso-sort-tests-2.generated-makefile
|
elf: Testing infrastructure for ld.so DSO sorting (BZ #17645)
This is the first of a 2-part patch set that fixes slow DSO sorting behavior in
the dynamic loader, as reported in BZ #17645. In order to facilitate such a
large modification to the dynamic loader, this first patch implements a testing
framework for validating shared object sorting behavior, to enable comparison
between old/new sorting algorithms, and any later enhancements.
This testing infrastructure consists of a Python script
scripts/dso-ordering-test.py' which takes in a description language, consisting
of strings that describe a set of link dependency relations between DSOs, and
generates testcase programs and Makefile fragments to automatically test the
described situation, for example:
a->b->c->d # four objects linked one after another
a->[bc]->d;b->c # a depends on b and c, which both depend on d,
# b depends on c (b,c linked to object a in fixed order)
a->b->c;{+a;%a;-a} # a, b, c serially dependent, main program uses
# dlopen/dlsym/dlclose on object a
a->b->c;{}!->[abc] # a, b, c serially dependent; multiple tests generated
# to test all permutations of a, b, c ordering linked
# to main program
(Above is just a short description of what the script can do, more
documentation is in the script comments.)
Two files containing several new tests, elf/dso-sort-tests-[12].def are added,
including test scenarios for BZ #15311 and Redhat issue #1162810 [1].
Due to the nature of dynamic loader tests, where the sorting behavior and test
output occurs before/after main(), generating testcases to use
support/test-driver.c does not suffice to control meaningful timeout for ld.so.
Therefore a new utility program 'support/test-run-command', based on
test-driver.c/support_test_main.c has been added. This does the same testcase
control, but for a program specified through a command-line rather than at the
source code level. This utility is used to run the dynamic loader testcases
generated by dso-ordering-test.py.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1162810
Signed-off-by: Chung-Lin Tang <cltang@codesourcery.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-10-21 13:41:21 +00:00
|
|
|
|
|
|
|
# Generate from each testcase description file
|
2021-11-03 12:19:30 +00:00
|
|
|
ifeq (yes,$(have-tunables))
|
elf: Testing infrastructure for ld.so DSO sorting (BZ #17645)
This is the first of a 2-part patch set that fixes slow DSO sorting behavior in
the dynamic loader, as reported in BZ #17645. In order to facilitate such a
large modification to the dynamic loader, this first patch implements a testing
framework for validating shared object sorting behavior, to enable comparison
between old/new sorting algorithms, and any later enhancements.
This testing infrastructure consists of a Python script
scripts/dso-ordering-test.py' which takes in a description language, consisting
of strings that describe a set of link dependency relations between DSOs, and
generates testcase programs and Makefile fragments to automatically test the
described situation, for example:
a->b->c->d # four objects linked one after another
a->[bc]->d;b->c # a depends on b and c, which both depend on d,
# b depends on c (b,c linked to object a in fixed order)
a->b->c;{+a;%a;-a} # a, b, c serially dependent, main program uses
# dlopen/dlsym/dlclose on object a
a->b->c;{}!->[abc] # a, b, c serially dependent; multiple tests generated
# to test all permutations of a, b, c ordering linked
# to main program
(Above is just a short description of what the script can do, more
documentation is in the script comments.)
Two files containing several new tests, elf/dso-sort-tests-[12].def are added,
including test scenarios for BZ #15311 and Redhat issue #1162810 [1].
Due to the nature of dynamic loader tests, where the sorting behavior and test
output occurs before/after main(), generating testcases to use
support/test-driver.c does not suffice to control meaningful timeout for ld.so.
Therefore a new utility program 'support/test-run-command', based on
test-driver.c/support_test_main.c has been added. This does the same testcase
control, but for a program specified through a command-line rather than at the
source code level. This utility is used to run the dynamic loader testcases
generated by dso-ordering-test.py.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1162810
Signed-off-by: Chung-Lin Tang <cltang@codesourcery.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-10-21 13:41:21 +00:00
|
|
|
$(eval $(call include_dsosort_tests,dso-sort-tests-1.def))
|
|
|
|
$(eval $(call include_dsosort_tests,dso-sort-tests-2.def))
|
2021-11-03 12:19:30 +00:00
|
|
|
endif
|
elf: Testing infrastructure for ld.so DSO sorting (BZ #17645)
This is the first of a 2-part patch set that fixes slow DSO sorting behavior in
the dynamic loader, as reported in BZ #17645. In order to facilitate such a
large modification to the dynamic loader, this first patch implements a testing
framework for validating shared object sorting behavior, to enable comparison
between old/new sorting algorithms, and any later enhancements.
This testing infrastructure consists of a Python script
scripts/dso-ordering-test.py' which takes in a description language, consisting
of strings that describe a set of link dependency relations between DSOs, and
generates testcase programs and Makefile fragments to automatically test the
described situation, for example:
a->b->c->d # four objects linked one after another
a->[bc]->d;b->c # a depends on b and c, which both depend on d,
# b depends on c (b,c linked to object a in fixed order)
a->b->c;{+a;%a;-a} # a, b, c serially dependent, main program uses
# dlopen/dlsym/dlclose on object a
a->b->c;{}!->[abc] # a, b, c serially dependent; multiple tests generated
# to test all permutations of a, b, c ordering linked
# to main program
(Above is just a short description of what the script can do, more
documentation is in the script comments.)
Two files containing several new tests, elf/dso-sort-tests-[12].def are added,
including test scenarios for BZ #15311 and Redhat issue #1162810 [1].
Due to the nature of dynamic loader tests, where the sorting behavior and test
output occurs before/after main(), generating testcases to use
support/test-driver.c does not suffice to control meaningful timeout for ld.so.
Therefore a new utility program 'support/test-run-command', based on
test-driver.c/support_test_main.c has been added. This does the same testcase
control, but for a program specified through a command-line rather than at the
source code level. This utility is used to run the dynamic loader testcases
generated by dso-ordering-test.py.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1162810
Signed-off-by: Chung-Lin Tang <cltang@codesourcery.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-10-21 13:41:21 +00:00
|
|
|
|
2021-11-19 14:18:56 +00:00
|
|
|
check-abi: $(objpfx)check-abi-ld.out \
|
|
|
|
$(objpfx)check-abi-version-libc.out
|
|
|
|
tests-special += \
|
|
|
|
$(objpfx)check-abi-ld.out \
|
|
|
|
$(objpfx)check-abi-version-libc.out \
|
|
|
|
# tests-special
|
2003-03-27 09:48:09 +00:00
|
|
|
update-abi: update-abi-ld
|
2015-11-24 16:10:19 +00:00
|
|
|
update-all-abi: update-all-abi-ld
|
2003-03-27 09:48:09 +00:00
|
|
|
|
2022-04-11 09:28:08 +00:00
|
|
|
tests-special += $(objpfx)tst-glibcelf.out
|
|
|
|
$(objpfx)tst-glibcelf.out: tst-glibcelf.py elf.h $(..)/scripts/glibcelf.py \
|
|
|
|
$(..)/scripts/glibcextract.py
|
|
|
|
PYTHONPATH=$(..)scripts $(PYTHON) tst-glibcelf.py \
|
|
|
|
--cc="$(CC) $(patsubst -DMODULE_NAME=%,-DMODULE_NAME=testsuite,$(CPPFLAGS))" \
|
|
|
|
< /dev/null > $@ 2>&1; $(evaluate-test)
|
|
|
|
|
2022-05-16 16:41:43 +00:00
|
|
|
ifeq ($(run-built-tests),yes)
|
|
|
|
tests-special += $(objpfx)tst-tls-allocation-failure-static-patched.out
|
|
|
|
endif
|
|
|
|
|
2016-09-30 01:54:31 +00:00
|
|
|
# The test requires shared _and_ PIE because the executable
|
|
|
|
# unit test driver must be able to link with the shared object
|
|
|
|
# that is going to eventually go into an installed DSO.
|
|
|
|
ifeq (yesyes,$(have-fpie)$(build-shared))
|
Suppress internal declarations for most of the testsuite.
This patch adds a new build module called 'testsuite'.
IS_IN (testsuite) implies _ISOMAC, as do IS_IN_build and __cplusplus
(which means several ad-hoc tests for __cplusplus can go away).
libc-symbols.h now suppresses almost all of *itself* when _ISOMAC is
defined; in particular, _ISOMAC mode does not get config.h
automatically anymore.
There are still quite a few tests that need to see internal gunk of
one variety or another. For them, we now have 'tests-internal' and
'test-internal-extras'; files in this category will still be compiled
with MODULE_NAME=nonlib, and everything proceeds as it always has.
The bulk of this patch is moving tests from 'tests' to
'tests-internal'. There is also 'tests-static-internal', which has
the same effect on files in 'tests-static', and 'modules-names-tests',
which has the *inverse* effect on files in 'modules-names' (it's
inverted because most of the things in modules-names are *not* tests).
For both of these, the file must appear in *both* the new variable and
the old one.
There is also now a special case for when libc-symbols.h is included
without MODULE_NAME being defined at all. (This happens during the
creation of libc-modules.h, and also when preprocessing Versions
files.) When this happens, IS_IN is set to be always false and
_ISOMAC is *not* defined, which was the status quo, but now it's
explicit.
The remaining changes to C source files in this patch seemed likely to
cause problems in the absence of the main change. They should be
relatively self-explanatory. In a few cases I duplicated a definition
from an internal header rather than move the test to tests-internal;
this was a judgement call each time and I'm happy to change those
however reviewers feel is more appropriate.
* Makerules: New subdir configuration variables 'tests-internal'
and 'test-internal-extras'. Test files in these categories will
still be compiled with MODULE_NAME=nonlib. Test files in the
existing categories (tests, xtests, test-srcs, test-extras) are
now compiled with MODULE_NAME=testsuite.
New subdir configuration variable 'modules-names-tests'. Files
which are in both 'modules-names' and 'modules-names-tests' will
be compiled with MODULE_NAME=testsuite instead of
MODULE_NAME=extramodules.
(gen-as-const-headers): Move to tests-internal.
(do-tests-clean, common-mostlyclean): Support tests-internal.
* Makeconfig (built-modules): Add testsuite.
* Makefile: Change libof-check-installed-headers-c and
libof-check-installed-headers-cxx to 'testsuite'.
* Rules: Likewise. Support tests-internal.
* benchtests/strcoll-inputs/filelist#en_US.UTF-8:
Remove extra-modules.mk.
* config.h.in: Don't check for __OPTIMIZE__ or __FAST_MATH__ here.
* include/libc-symbols.h: Move definitions of _GNU_SOURCE,
PASTE_NAME, PASTE_NAME1, IN_MODULE, IS_IN, and IS_IN_LIB to the
very top of the file and rationalize their order.
If MODULE_NAME is not defined at all, define IS_IN to always be
false, and don't define _ISOMAC.
If any of IS_IN (testsuite), IS_IN_build, or __cplusplus are
true, define _ISOMAC and suppress everything else in this file,
starting with the inclusion of config.h.
Do check for inappropriate definitions of __OPTIMIZE__ and
__FAST_MATH__ here, but only if _ISOMAC is not defined.
Correct some out-of-date commentary.
* include/math.h: If _ISOMAC is defined, undefine NO_LONG_DOUBLE
and _Mlong_double_ before including math.h.
* include/string.h: If _ISOMAC is defined, don't expose
_STRING_ARCH_unaligned. Move a comment to a more appropriate
location.
* include/errno.h, include/stdio.h, include/stdlib.h, include/string.h
* include/time.h, include/unistd.h, include/wchar.h: No need to
check __cplusplus nor use __BEGIN_DECLS/__END_DECLS.
* misc/sys/cdefs.h (__NTHNL): New macro.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h
(__m81_defun): Use __NTHNL to avoid errors with GCC 6.
* elf/tst-env-setuid-tunables.c: Include config.h with _LIBC
defined, for HAVE_TUNABLES.
* inet/tst-checks-posix.c: No need to define _ISOMAC.
* intl/tst-gettext2.c: Provide own definition of N_.
* math/test-signgam-finite-c99.c: No need to define _ISOMAC.
* math/test-signgam-main.c: No need to define _ISOMAC.
* stdlib/tst-strtod.c: Convert to test-driver. Split locale_test to...
* stdlib/tst-strtod1i.c: ...this new file.
* stdlib/tst-strtod5.c: Convert to test-driver and add copyright notice.
Split tests of __strtod_internal to...
* stdlib/tst-strtod5i.c: ...this new file.
* string/test-string.h: Include stdint.h. Duplicate definition of
inhibit_loop_to_libcall here (from libc-symbols.h).
* string/test-strstr.c: Provide dummy definition of
libc_hidden_builtin_def when including strstr.c.
* sysdeps/ia64/fpu/libm-symbols.h: Suppress entire file in _ISOMAC
mode; no need to test __STRICT_ANSI__ nor __cplusplus as well.
* sysdeps/x86_64/fpu/math-tests-arch.h: Include cpu-features.h.
Don't include init-arch.h.
* sysdeps/x86_64/multiarch/test-multiarch.h: Include cpu-features.h.
Don't include init-arch.h.
* elf/Makefile: Move tst-ptrguard1-static, tst-stackguard1-static,
tst-tls1-static, tst-tls2-static, tst-tls3-static, loadtest,
unload, unload2, circleload1, neededtest, neededtest2,
neededtest3, neededtest4, tst-tls1, tst-tls2, tst-tls3,
tst-tls6, tst-tls7, tst-tls8, tst-dlmopen2, tst-ptrguard1,
tst-stackguard1, tst-_dl_addr_inside_object, and all of the
ifunc tests to tests-internal.
Don't add $(modules-names) to test-extras.
* inet/Makefile: Move tst-inet6_scopeid_pton to tests-internal.
Add tst-deadline to tests-static-internal.
* malloc/Makefile: Move tst-mallocstate and tst-scratch_buffer to
tests-internal.
* misc/Makefile: Move tst-atomic and tst-atomic-long to tests-internal.
* nptl/Makefile: Move tst-typesizes, tst-rwlock19, tst-sem11,
tst-sem12, tst-sem13, tst-barrier5, tst-signal7, tst-tls3,
tst-tls3-malloc, tst-tls5, tst-stackguard1, tst-sem11-static,
tst-sem12-static, and tst-stackguard1-static to tests-internal.
Link tests-internal with libpthread also.
Don't add $(modules-names) to test-extras.
* nss/Makefile: Move tst-field to tests-internal.
* posix/Makefile: Move bug-regex5, bug-regex20, bug-regex33,
tst-rfc3484, tst-rfc3484-2, and tst-rfc3484-3 to tests-internal.
* stdlib/Makefile: Move tst-strtod1i, tst-strtod3, tst-strtod4,
tst-strtod5i, tst-tls-atexit, and tst-tls-atexit-nodelete to
tests-internal.
* sunrpc/Makefile: Move tst-svc_register to tests-internal.
* sysdeps/powerpc/Makefile: Move test-get_hwcap and
test-get_hwcap-static to tests-internal.
* sysdeps/unix/sysv/linux/Makefile: Move tst-setgetname to
tests-internal.
* sysdeps/x86_64/fpu/Makefile: Add all libmvec test modules to
modules-names-tests.
2016-11-21 01:46:30 +00:00
|
|
|
tests-internal += tst-_dl_addr_inside_object
|
2016-09-30 01:54:31 +00:00
|
|
|
tests-pie += tst-_dl_addr_inside_object
|
|
|
|
$(objpfx)tst-_dl_addr_inside_object: $(objpfx)dl-addr-obj.os
|
|
|
|
CFLAGS-tst-_dl_addr_inside_object.c += $(PIE-ccflag)
|
|
|
|
endif
|
|
|
|
|
2018-06-29 14:53:47 +00:00
|
|
|
# We can only test static libcrypt use if libcrypt has been built,
|
|
|
|
# and either NSS crypto is not in use, or static NSS libraries are
|
|
|
|
# available.
|
|
|
|
ifeq ($(build-crypt),no)
|
|
|
|
CFLAGS-tst-linkall-static.c += -DUSE_CRYPT=0
|
|
|
|
else
|
|
|
|
ifeq ($(nss-crypt),no)
|
|
|
|
CFLAGS-tst-linkall-static.c += -DUSE_CRYPT=1
|
|
|
|
else
|
|
|
|
ifeq ($(static-nss-crypt),no)
|
|
|
|
CFLAGS-tst-linkall-static.c += -DUSE_CRYPT=0
|
|
|
|
else
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-tst-linkall-static.c += -DUSE_CRYPT=1
|
2018-06-29 14:53:47 +00:00
|
|
|
endif
|
|
|
|
endif
|
2016-12-02 20:39:09 +00:00
|
|
|
endif
|
|
|
|
|
Enumerate tests with special rules in tests-special variable.
This patch is a revised and updated version of
<https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>.
In order to generate overall summaries of the results of all tests in
the glibc testsuite, we need to identify and concatenate the files
with the results of individual tests.
Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this.
However, the normal glibc approach is explicit enumeration of the
expected set of files with a given property, rather than all files
matching some pattern like that. Furthermore, we would like to be
able to mark tests as UNRESOLVED if the file with their results is for
some reason missing, and in future we would like to be able to mark
tests as UNSUPPORTED if they are disabled for a particular
configuration (rather than simply having them missing from the list of
tests as at present). Such handling of tests that were not run or did
not record results requires an explicit enumeration of tests.
For the tests following the default makefile rules, $(tests) (and
$(xtests)) provides such an enumeration. Others, however, are added
directly as dependencies of the "tests" and "xtests" makefile
targets. This patch changes the makefiles to put them in variables
tests-special and xtests-special, with appropriate dependencies on the
tests listed there then being added centrally.
Those variables are used in Rules and so need to be set before Rules
is included in a subdirectory makefile, which is often earlier in the
makefile than the dependencies were present before. We previously
discussed the question of where to include Rules; see the question at
<https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a
discussion in
<https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why
Rules is included early rather than late in subdirectory makefiles.
It was necessary to avoid an indirection through the check-abi target
and get the check-abi-* targets for individual libraries into the
tests-special variable. The intl/ test $(objpfx)tst-gettext.out,
previously built only because of dependencies from other tests, was
also added to tests-special for the same reason.
The entries in tests-special are the full makefile targets, complete
with $(objpfx) and .out. If a future change causes tests to be named
consistently with a .out suffix, this can be changed to include just
the path relative to $(objpfx), without .out.
Tested x86_64, including that the same set of files is generated in
the build directory by a build and testsuite run both before and after
the patch (except for changes to the
elf/tst-null-argv.debug.out.<number> file name), and a build with
run-built-tests=no to verify there aren't any more obvious instances
of the issue Marcus Shawcroft reported with a previous version in
<https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>.
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(tests): Depend on $(tests-special).
* Makerules (check-abi-list): New variable.
(check-abi): Depend on $(check-abi-list).
[$(subdir) = elf] (tests-special): Add
$(objpfx)check-abi-libc.out.
[$(build-shared) = yes && subdir] (tests-special): Add
$(check-abi-list).
[$(build-shared) = yes && subdir] (tests): Do not depend on
check-abi.
* Rules (tests): Depend on $(tests-special).
(xtests): Depend on $(xtests-special).
* catgets/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* conform/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* elf/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* grp/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* iconv/Makefile (xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* iconvdata/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* intl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable. Also add
$(objpfx)tst-gettext.out.
* io/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* libio/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* malloc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* misc/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* nptl_db/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* posix/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* resolv/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(xtests): Change dependencies to ....
(xtests-special): ... additions to this variable.
* stdio-common/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
(do-tst-unbputc): Remove target.
(do-tst-printf): Likewise.
* stdlib/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* string/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
* sysdeps/x86/Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
localedata:
* Makefile (tests): Change dependencies to ....
(tests-special): ... additions to this variable.
2014-03-06 22:35:33 +00:00
|
|
|
include ../Rules
|
|
|
|
|
update from main archive 970121
1997-01-21 Paul Eggert <eggert@twinsun.com>
* posix/getopt.c (_getopt_internal): Return -1, not EOF, when args
are exhausted; this is required by POSIX.2.
* catgets/gencat.c, db/makedb.c, locale/programs/locale.c,
locale/programs/localedef.c, manual/examples/subopt.c,
posix/getopt.c, posix/getopt1.c, stdio-common/bug4.c,
sunrpc/rpcinfo.c (main): Check getopt return value against -1, not EOF.
Tue Jan 21 23:10:40 1997 Ulrich Drepper <drepper@cygnus.com>
* version.h (VERSION): Bump to 1.102.
* sysdeps/unix/sysv/linux/alpha/Dist: Add kernel_sigaction.h.
* elf/Makefile: Don't use CFLAGS-dl-load.c, but instead
CPPFLAGS-dl-load.c so that dependencies can be determined correctly.
* elf/dl-load.c: Fix comment.
* time/Banner: New file.
* time/Makefile (distribute): Add Banner.
Update from ADO tzcode1997a and tzdata1997a.
* time/antarctica: Update.
* time/australia: Update.
* time/zdump.c: Update.
* time/zic.c: Update.
* time/zone.tab: Update.
Mon Jan 20 08:38:32 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* config.make.in (has-ldconfig): New variable.
* configure, configure.in (has_ldconfig): New substitute.
* sysdeps/unix/sysv/linux/configure.in (has_ldconfig): New,
check if $srcdir/elf/ldconfig.c exists.
* Makeconfig (rootsbindir): New, default as
$(exec_prefix)/sbin.
(rtld-version-installed-name): New, default as
ld-$(version).so.
* Makefile (install): Call `$(common-objpfx)elf/ldconfig -d'
only if $(cross-compiling) is no and $(build-shared) is yes.
* Makerules (make-shlib-link): New macro.
($(slibdir)/libfoo.so.$(libfoo.so-version)): Use
$(make-shlib-link) for symlink.
(install-rootsbin, install-rootsbin-nosubdir): New.
(install-no-libc.a-nosubdir): Add
install-rootsbin-nosubdir.
* Rules (others): Add $(install-rootsbin).
* config.make.in (rootsbindir): New.
* configure, configure.in (libc_cv_rootsbindir): New
substitute.
* elf/Makefile (others, install-rootsbin): New, set to
ldconfig.
(+link): New for static linking.
($(slibdir)/$(rtld-version-installed-name)): New.
($(slibdir)/$(rtld-installed-name)): Depend on
$(slibdir)/$(rtld-version-installed-name) and use
$(make-shlib-link) for symlink.
* sunrpc/xdr.c (xdr_string): Return FALSE if sp == NULL
while XDR_ENCODE.
* sysdeps/unix/sysv/linux/a.out.h: Use #include_next for
glibc internals.
* sysdeps/unix/sysv/linux/configure.in (libc_cv_rootsbindir):
New, set to "/sbin" if "$prefix" == "/usr".
Tue Jan 21 13:38:39 1997 Ulrich Drepper <drepper@cygnus.com>
* Makefile (distribute): Add glibcbug.in.
Reported by Philip Blundell <pjb27@cam.ac.uk>.
* elf/Makefile ($(objpfx)trusted-dirs.h): Create elf/ subdir in
build directory if necessary.
Reported by marcus@shannon.sysc.pdx.edu (Marcus G. Daniels).
1997-01-22 05:26:05 +00:00
|
|
|
ifeq (yes,$(build-shared))
|
1996-06-11 21:41:42 +00:00
|
|
|
# Make sure these things are built in the `make lib' pass so they can be used
|
|
|
|
# to run programs during the `make others' pass.
|
|
|
|
lib-noranlib: $(objpfx)$(rtld-installed-name) \
|
|
|
|
$(addprefix $(objpfx),$(extra-objs))
|
|
|
|
endif
|
|
|
|
|
1996-05-04 13:57:05 +00:00
|
|
|
# Command to link into a larger single relocatable object.
|
2011-06-10 17:34:45 +00:00
|
|
|
reloc-link = $(LINK.o) -nostdlib -nostartfiles -r
|
1996-05-04 13:57:05 +00:00
|
|
|
|
2011-07-15 03:49:27 +00:00
|
|
|
$(objpfx)sotruss-lib.so: $(shlib-lds)
|
|
|
|
|
2000-09-05 02:41:25 +00:00
|
|
|
$(objpfx)dl-allobjs.os: $(all-rtld-routines:%=$(objpfx)%.os)
|
* sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/i386/dl-machine.h (elf_machine_type_class, elf_machine_rel):
Disable TLS relocs if [RTLD_BOOTSTRAP && !USE___THREAD].
* sysdeps/x86_64/dl-machine.h
(elf_machine_type_class, elf_machine_rela): Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_type_class, elf_machine_rela):
Likewise.
* include/link.h (struct link_map): Remove member l_tls_tp_initialized.
* elf/rtld.c (_dl_start_final, dl_main): Don't use it.
(_dl_start): Conditionalize PT_TLS check on [USE___THREAD].
* sysdeps/i386/dl-tls.h (__TLS_GET_ADDR): Use ___tls_get_addr_internal
instead of ___tls_get_addr.
(___tls_get_addr_internal): Add attribute_hidden to decl.
* sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
_dl_error_catch_tsd.
* elf/rtld.c (startup_error_tsd): New function.
(dl_main): Point _dl_error_catch_tsd at that.
* elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
use new function pointer instead.
* elf/dl-tsd.c: New file.
* elf/Makefile (routines): Add it.
2002-10-07 Roland McGrath <roland@redhat.com>
* elf/dl-misc.c (_dl_debug_vdprintf): Use INTERNAL_SYSCALL macro for
writev if it's available. Otherwise if [RTLD_PRIVATE_ERRNO] then
take _dl_load_lock around calling __writev.
* sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL): New macro.
(INLINE_SYSCALL): Use that.
* sysdeps/generic/dl-sysdep.h: New file.
* sysdeps/mach/hurd/dl-sysdep.h: New file.
* sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
* include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
[RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
access it directly.
* elf/dl-minimal.c (__errno_location): Removed.
* sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use GOTOFF access for errno.
* sysdeps/unix/sysv/linux/i386/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* sysdeps/unix/x86_64/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use PC-relative access for errno.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* include/tls.h: New file.
(USE___THREAD): New macro.
Define to 1 under [USE_TLS && HAVE___THREAD] and only when compiling
libc or libpthread.
* sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
* sysdeps/unix/i386/sysdep.S: Likewise.
* sysdeps/unix/x86_64/sysdep.S: Likewise.
* include/errno.h: Likewise.
* include/netdb.h: Likewise.
* include/resolv.h: Likewise.
* sysdeps/generic/errno.c: New file.
* csu/Makefile (aux): New variable, list errno.
* sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
* sysdeps/unix/alpha/sysdep.S: Likewise.
* sysdeps/generic/start.c: Likewise.
* sysdeps/unix/start.c: Likewise.
* sysdeps/unix/arm/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
* manual/search.texi (Tree Search Function, Hash Search Function):
Mention search.h clearly.
2002-10-05 Roland McGrath <roland@redhat.com>
* elf/dl-fxstat64.c: File removed.
* elf/dl-xstat64.c: File removed.
* elf/Makefile (rtld-routines): Remove them.
* sysdeps/unix/sysv/linux/xstat64.c: Remove RTLD_STAT64 conditionals.
Instead, use strong_alias instead of versioned_symbol in the
!SHLIB_COMPAT case.
* sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
* include/shlib-compat.h
(SHLIB_COMPAT): Require that IS_IN_##lib be defined nonzero.
[! NOT_IN_libc] (IS_IN_libc): Define it.
* cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Use -Dx=1 not just -Dx.
* elf/Makefile (CPPFLAGS-.os): Likewise.
* sunrpc/rpc_main.c (main): Don't declare with noreturn attribute.
Return the status instead of calling exit.
* Makeconfig (CFLAGS): Prepend -std=gnu99.
* Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
Remove superfluous rm command, whose @ plus make bugs hid
all these commands from the make output.
* include/stubs-prologue.h: New file. Give #error under #ifdef _LIBC.
* Makefile ($(inst_includedir)/gnu/stubs.h): Depend on it.
Use that file's contents instead of literal echo's for the prologue.
* include/features.h: Include <gnu/stubs.h> unconditionally.
* include/gnu/stubs.h: New file.
2002-09-30 Roland McGrath <roland@redhat.com>
* elf/rtld-Rules: New file.
* elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
$(objpfx)rtld-libc.a): New targets.
(generated): Add them.
(reloc-link): Remove -o $@ from the variable.
($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
(distribute): Add rtld-Rules.
(CPPFLAGS-.os): Define this instead of CFLAGS-.os.
* Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
(common-mostlyclean, common-clean): Clean up rtld-* files.
* sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
2002-10-11 10:52:20 +00:00
|
|
|
$(reloc-link) -o $@ $^
|
1996-05-04 13:57:05 +00:00
|
|
|
|
1995-11-07 21:46:52 +00:00
|
|
|
# Link together the dynamic linker into a single relocatable object.
|
* sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/i386/dl-machine.h (elf_machine_type_class, elf_machine_rel):
Disable TLS relocs if [RTLD_BOOTSTRAP && !USE___THREAD].
* sysdeps/x86_64/dl-machine.h
(elf_machine_type_class, elf_machine_rela): Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_type_class, elf_machine_rela):
Likewise.
* include/link.h (struct link_map): Remove member l_tls_tp_initialized.
* elf/rtld.c (_dl_start_final, dl_main): Don't use it.
(_dl_start): Conditionalize PT_TLS check on [USE___THREAD].
* sysdeps/i386/dl-tls.h (__TLS_GET_ADDR): Use ___tls_get_addr_internal
instead of ___tls_get_addr.
(___tls_get_addr_internal): Add attribute_hidden to decl.
* sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
_dl_error_catch_tsd.
* elf/rtld.c (startup_error_tsd): New function.
(dl_main): Point _dl_error_catch_tsd at that.
* elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
use new function pointer instead.
* elf/dl-tsd.c: New file.
* elf/Makefile (routines): Add it.
2002-10-07 Roland McGrath <roland@redhat.com>
* elf/dl-misc.c (_dl_debug_vdprintf): Use INTERNAL_SYSCALL macro for
writev if it's available. Otherwise if [RTLD_PRIVATE_ERRNO] then
take _dl_load_lock around calling __writev.
* sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL): New macro.
(INLINE_SYSCALL): Use that.
* sysdeps/generic/dl-sysdep.h: New file.
* sysdeps/mach/hurd/dl-sysdep.h: New file.
* sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
* include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
[RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
access it directly.
* elf/dl-minimal.c (__errno_location): Removed.
* sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use GOTOFF access for errno.
* sysdeps/unix/sysv/linux/i386/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* sysdeps/unix/x86_64/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use PC-relative access for errno.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* include/tls.h: New file.
(USE___THREAD): New macro.
Define to 1 under [USE_TLS && HAVE___THREAD] and only when compiling
libc or libpthread.
* sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
* sysdeps/unix/i386/sysdep.S: Likewise.
* sysdeps/unix/x86_64/sysdep.S: Likewise.
* include/errno.h: Likewise.
* include/netdb.h: Likewise.
* include/resolv.h: Likewise.
* sysdeps/generic/errno.c: New file.
* csu/Makefile (aux): New variable, list errno.
* sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
* sysdeps/unix/alpha/sysdep.S: Likewise.
* sysdeps/generic/start.c: Likewise.
* sysdeps/unix/start.c: Likewise.
* sysdeps/unix/arm/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
* manual/search.texi (Tree Search Function, Hash Search Function):
Mention search.h clearly.
2002-10-05 Roland McGrath <roland@redhat.com>
* elf/dl-fxstat64.c: File removed.
* elf/dl-xstat64.c: File removed.
* elf/Makefile (rtld-routines): Remove them.
* sysdeps/unix/sysv/linux/xstat64.c: Remove RTLD_STAT64 conditionals.
Instead, use strong_alias instead of versioned_symbol in the
!SHLIB_COMPAT case.
* sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
* include/shlib-compat.h
(SHLIB_COMPAT): Require that IS_IN_##lib be defined nonzero.
[! NOT_IN_libc] (IS_IN_libc): Define it.
* cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Use -Dx=1 not just -Dx.
* elf/Makefile (CPPFLAGS-.os): Likewise.
* sunrpc/rpc_main.c (main): Don't declare with noreturn attribute.
Return the status instead of calling exit.
* Makeconfig (CFLAGS): Prepend -std=gnu99.
* Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
Remove superfluous rm command, whose @ plus make bugs hid
all these commands from the make output.
* include/stubs-prologue.h: New file. Give #error under #ifdef _LIBC.
* Makefile ($(inst_includedir)/gnu/stubs.h): Depend on it.
Use that file's contents instead of literal echo's for the prologue.
* include/features.h: Include <gnu/stubs.h> unconditionally.
* include/gnu/stubs.h: New file.
2002-09-30 Roland McGrath <roland@redhat.com>
* elf/rtld-Rules: New file.
* elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
$(objpfx)rtld-libc.a): New targets.
(generated): Add them.
(reloc-link): Remove -o $@ from the variable.
($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
(distribute): Add rtld-Rules.
(CPPFLAGS-.os): Define this instead of CFLAGS-.os.
* Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
(common-mostlyclean, common-clean): Clean up rtld-* files.
* sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
2002-10-11 10:52:20 +00:00
|
|
|
# First we do a link against libc_pic.a just to get a link map,
|
|
|
|
# and discard the object produced by that link. From the link map
|
|
|
|
# we can glean all the libc modules that need to go into the dynamic
|
|
|
|
# linker. Then we do a recursive make that goes into all the subdirs
|
|
|
|
# those modules come from and builds special rtld-foo.os versions that
|
|
|
|
# are compiled with special flags, and puts these modules into rtld-libc.a
|
|
|
|
# for us. Then we do the real link using rtld-libc.a instead of libc_pic.a.
|
|
|
|
|
2020-02-07 19:06:32 +00:00
|
|
|
# These symbols need to be stubbed out during symbol discovery because
|
|
|
|
# their implementation is provided differently in rtld, and the symbol
|
|
|
|
# discovery mechanism is not compatible with the libc implementation
|
|
|
|
# when compiled for libc.
|
2020-02-08 18:58:43 +00:00
|
|
|
rtld-stubbed-symbols = \
|
2021-05-05 15:15:57 +00:00
|
|
|
__GI___pthread_disable_asynccancel \
|
|
|
|
__GI___pthread_enable_asynccancel \
|
|
|
|
__pthread_disable_asynccancel \
|
|
|
|
__pthread_enable_asynccancel \
|
2020-02-08 18:58:43 +00:00
|
|
|
calloc \
|
|
|
|
free \
|
|
|
|
malloc \
|
|
|
|
realloc \
|
2022-01-14 19:16:05 +00:00
|
|
|
# rtld-stubbed-symbols
|
2020-02-07 19:06:32 +00:00
|
|
|
|
2016-12-26 09:08:51 +00:00
|
|
|
ifeq ($(have-ssp),yes)
|
2020-02-07 19:06:32 +00:00
|
|
|
# rtld is not built with the stack protector, so these references will
|
|
|
|
# go away in the rebuilds.
|
|
|
|
rtld-stubbed-symbols += __stack_chk_fail __stack_chk_fail_local
|
2016-12-26 09:08:51 +00:00
|
|
|
endif
|
|
|
|
|
* sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/i386/dl-machine.h (elf_machine_type_class, elf_machine_rel):
Disable TLS relocs if [RTLD_BOOTSTRAP && !USE___THREAD].
* sysdeps/x86_64/dl-machine.h
(elf_machine_type_class, elf_machine_rela): Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_type_class, elf_machine_rela):
Likewise.
* include/link.h (struct link_map): Remove member l_tls_tp_initialized.
* elf/rtld.c (_dl_start_final, dl_main): Don't use it.
(_dl_start): Conditionalize PT_TLS check on [USE___THREAD].
* sysdeps/i386/dl-tls.h (__TLS_GET_ADDR): Use ___tls_get_addr_internal
instead of ___tls_get_addr.
(___tls_get_addr_internal): Add attribute_hidden to decl.
* sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
_dl_error_catch_tsd.
* elf/rtld.c (startup_error_tsd): New function.
(dl_main): Point _dl_error_catch_tsd at that.
* elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
use new function pointer instead.
* elf/dl-tsd.c: New file.
* elf/Makefile (routines): Add it.
2002-10-07 Roland McGrath <roland@redhat.com>
* elf/dl-misc.c (_dl_debug_vdprintf): Use INTERNAL_SYSCALL macro for
writev if it's available. Otherwise if [RTLD_PRIVATE_ERRNO] then
take _dl_load_lock around calling __writev.
* sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL): New macro.
(INLINE_SYSCALL): Use that.
* sysdeps/generic/dl-sysdep.h: New file.
* sysdeps/mach/hurd/dl-sysdep.h: New file.
* sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
* include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
[RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
access it directly.
* elf/dl-minimal.c (__errno_location): Removed.
* sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use GOTOFF access for errno.
* sysdeps/unix/sysv/linux/i386/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* sysdeps/unix/x86_64/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use PC-relative access for errno.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* include/tls.h: New file.
(USE___THREAD): New macro.
Define to 1 under [USE_TLS && HAVE___THREAD] and only when compiling
libc or libpthread.
* sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
* sysdeps/unix/i386/sysdep.S: Likewise.
* sysdeps/unix/x86_64/sysdep.S: Likewise.
* include/errno.h: Likewise.
* include/netdb.h: Likewise.
* include/resolv.h: Likewise.
* sysdeps/generic/errno.c: New file.
* csu/Makefile (aux): New variable, list errno.
* sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
* sysdeps/unix/alpha/sysdep.S: Likewise.
* sysdeps/generic/start.c: Likewise.
* sysdeps/unix/start.c: Likewise.
* sysdeps/unix/arm/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
* manual/search.texi (Tree Search Function, Hash Search Function):
Mention search.h clearly.
2002-10-05 Roland McGrath <roland@redhat.com>
* elf/dl-fxstat64.c: File removed.
* elf/dl-xstat64.c: File removed.
* elf/Makefile (rtld-routines): Remove them.
* sysdeps/unix/sysv/linux/xstat64.c: Remove RTLD_STAT64 conditionals.
Instead, use strong_alias instead of versioned_symbol in the
!SHLIB_COMPAT case.
* sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
* include/shlib-compat.h
(SHLIB_COMPAT): Require that IS_IN_##lib be defined nonzero.
[! NOT_IN_libc] (IS_IN_libc): Define it.
* cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Use -Dx=1 not just -Dx.
* elf/Makefile (CPPFLAGS-.os): Likewise.
* sunrpc/rpc_main.c (main): Don't declare with noreturn attribute.
Return the status instead of calling exit.
* Makeconfig (CFLAGS): Prepend -std=gnu99.
* Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
Remove superfluous rm command, whose @ plus make bugs hid
all these commands from the make output.
* include/stubs-prologue.h: New file. Give #error under #ifdef _LIBC.
* Makefile ($(inst_includedir)/gnu/stubs.h): Depend on it.
Use that file's contents instead of literal echo's for the prologue.
* include/features.h: Include <gnu/stubs.h> unconditionally.
* include/gnu/stubs.h: New file.
2002-09-30 Roland McGrath <roland@redhat.com>
* elf/rtld-Rules: New file.
* elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
$(objpfx)rtld-libc.a): New targets.
(generated): Add them.
(reloc-link): Remove -o $@ from the variable.
($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
(distribute): Add rtld-Rules.
(CPPFLAGS-.os): Define this instead of CFLAGS-.os.
* Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
(common-mostlyclean, common-clean): Clean up rtld-* files.
* sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
2002-10-11 10:52:20 +00:00
|
|
|
$(objpfx)librtld.map: $(objpfx)dl-allobjs.os $(common-objpfx)libc_pic.a
|
2002-10-24 00:22:27 +00:00
|
|
|
@-rm -f $@T
|
2021-02-01 17:29:26 +00:00
|
|
|
for symbol in $(rtld-stubbed-symbols); do \
|
|
|
|
echo ".globl $$symbol"; \
|
|
|
|
echo "$$symbol:"; \
|
|
|
|
done | $(CC) -o $@T.o $(ASFLAGS) -c -x assembler -
|
|
|
|
$(reloc-link) -o $@.o $@T.o '-Wl,-(' $^ -lgcc '-Wl,-)' -Wl,-Map,$@T
|
|
|
|
rm -f %@T.o $@.o
|
2002-10-24 00:22:27 +00:00
|
|
|
mv -f $@T $@
|
* sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/i386/dl-machine.h (elf_machine_type_class, elf_machine_rel):
Disable TLS relocs if [RTLD_BOOTSTRAP && !USE___THREAD].
* sysdeps/x86_64/dl-machine.h
(elf_machine_type_class, elf_machine_rela): Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_type_class, elf_machine_rela):
Likewise.
* include/link.h (struct link_map): Remove member l_tls_tp_initialized.
* elf/rtld.c (_dl_start_final, dl_main): Don't use it.
(_dl_start): Conditionalize PT_TLS check on [USE___THREAD].
* sysdeps/i386/dl-tls.h (__TLS_GET_ADDR): Use ___tls_get_addr_internal
instead of ___tls_get_addr.
(___tls_get_addr_internal): Add attribute_hidden to decl.
* sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
_dl_error_catch_tsd.
* elf/rtld.c (startup_error_tsd): New function.
(dl_main): Point _dl_error_catch_tsd at that.
* elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
use new function pointer instead.
* elf/dl-tsd.c: New file.
* elf/Makefile (routines): Add it.
2002-10-07 Roland McGrath <roland@redhat.com>
* elf/dl-misc.c (_dl_debug_vdprintf): Use INTERNAL_SYSCALL macro for
writev if it's available. Otherwise if [RTLD_PRIVATE_ERRNO] then
take _dl_load_lock around calling __writev.
* sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL): New macro.
(INLINE_SYSCALL): Use that.
* sysdeps/generic/dl-sysdep.h: New file.
* sysdeps/mach/hurd/dl-sysdep.h: New file.
* sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
* include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
[RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
access it directly.
* elf/dl-minimal.c (__errno_location): Removed.
* sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use GOTOFF access for errno.
* sysdeps/unix/sysv/linux/i386/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* sysdeps/unix/x86_64/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use PC-relative access for errno.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* include/tls.h: New file.
(USE___THREAD): New macro.
Define to 1 under [USE_TLS && HAVE___THREAD] and only when compiling
libc or libpthread.
* sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
* sysdeps/unix/i386/sysdep.S: Likewise.
* sysdeps/unix/x86_64/sysdep.S: Likewise.
* include/errno.h: Likewise.
* include/netdb.h: Likewise.
* include/resolv.h: Likewise.
* sysdeps/generic/errno.c: New file.
* csu/Makefile (aux): New variable, list errno.
* sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
* sysdeps/unix/alpha/sysdep.S: Likewise.
* sysdeps/generic/start.c: Likewise.
* sysdeps/unix/start.c: Likewise.
* sysdeps/unix/arm/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
* manual/search.texi (Tree Search Function, Hash Search Function):
Mention search.h clearly.
2002-10-05 Roland McGrath <roland@redhat.com>
* elf/dl-fxstat64.c: File removed.
* elf/dl-xstat64.c: File removed.
* elf/Makefile (rtld-routines): Remove them.
* sysdeps/unix/sysv/linux/xstat64.c: Remove RTLD_STAT64 conditionals.
Instead, use strong_alias instead of versioned_symbol in the
!SHLIB_COMPAT case.
* sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
* include/shlib-compat.h
(SHLIB_COMPAT): Require that IS_IN_##lib be defined nonzero.
[! NOT_IN_libc] (IS_IN_libc): Define it.
* cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Use -Dx=1 not just -Dx.
* elf/Makefile (CPPFLAGS-.os): Likewise.
* sunrpc/rpc_main.c (main): Don't declare with noreturn attribute.
Return the status instead of calling exit.
* Makeconfig (CFLAGS): Prepend -std=gnu99.
* Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
Remove superfluous rm command, whose @ plus make bugs hid
all these commands from the make output.
* include/stubs-prologue.h: New file. Give #error under #ifdef _LIBC.
* Makefile ($(inst_includedir)/gnu/stubs.h): Depend on it.
Use that file's contents instead of literal echo's for the prologue.
* include/features.h: Include <gnu/stubs.h> unconditionally.
* include/gnu/stubs.h: New file.
2002-09-30 Roland McGrath <roland@redhat.com>
* elf/rtld-Rules: New file.
* elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
$(objpfx)rtld-libc.a): New targets.
(generated): Add them.
(reloc-link): Remove -o $@ from the variable.
($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
(distribute): Add rtld-Rules.
(CPPFLAGS-.os): Define this instead of CFLAGS-.os.
* Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
(common-mostlyclean, common-clean): Clean up rtld-* files.
* sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
2002-10-11 10:52:20 +00:00
|
|
|
|
2020-04-21 16:28:42 +00:00
|
|
|
# For lld, skip preceding addresses and values before matching the archive and the member.
|
* sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/i386/dl-machine.h (elf_machine_type_class, elf_machine_rel):
Disable TLS relocs if [RTLD_BOOTSTRAP && !USE___THREAD].
* sysdeps/x86_64/dl-machine.h
(elf_machine_type_class, elf_machine_rela): Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_type_class, elf_machine_rela):
Likewise.
* include/link.h (struct link_map): Remove member l_tls_tp_initialized.
* elf/rtld.c (_dl_start_final, dl_main): Don't use it.
(_dl_start): Conditionalize PT_TLS check on [USE___THREAD].
* sysdeps/i386/dl-tls.h (__TLS_GET_ADDR): Use ___tls_get_addr_internal
instead of ___tls_get_addr.
(___tls_get_addr_internal): Add attribute_hidden to decl.
* sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
_dl_error_catch_tsd.
* elf/rtld.c (startup_error_tsd): New function.
(dl_main): Point _dl_error_catch_tsd at that.
* elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
use new function pointer instead.
* elf/dl-tsd.c: New file.
* elf/Makefile (routines): Add it.
2002-10-07 Roland McGrath <roland@redhat.com>
* elf/dl-misc.c (_dl_debug_vdprintf): Use INTERNAL_SYSCALL macro for
writev if it's available. Otherwise if [RTLD_PRIVATE_ERRNO] then
take _dl_load_lock around calling __writev.
* sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL): New macro.
(INLINE_SYSCALL): Use that.
* sysdeps/generic/dl-sysdep.h: New file.
* sysdeps/mach/hurd/dl-sysdep.h: New file.
* sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
* include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
[RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
access it directly.
* elf/dl-minimal.c (__errno_location): Removed.
* sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use GOTOFF access for errno.
* sysdeps/unix/sysv/linux/i386/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* sysdeps/unix/x86_64/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use PC-relative access for errno.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* include/tls.h: New file.
(USE___THREAD): New macro.
Define to 1 under [USE_TLS && HAVE___THREAD] and only when compiling
libc or libpthread.
* sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
* sysdeps/unix/i386/sysdep.S: Likewise.
* sysdeps/unix/x86_64/sysdep.S: Likewise.
* include/errno.h: Likewise.
* include/netdb.h: Likewise.
* include/resolv.h: Likewise.
* sysdeps/generic/errno.c: New file.
* csu/Makefile (aux): New variable, list errno.
* sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
* sysdeps/unix/alpha/sysdep.S: Likewise.
* sysdeps/generic/start.c: Likewise.
* sysdeps/unix/start.c: Likewise.
* sysdeps/unix/arm/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
* manual/search.texi (Tree Search Function, Hash Search Function):
Mention search.h clearly.
2002-10-05 Roland McGrath <roland@redhat.com>
* elf/dl-fxstat64.c: File removed.
* elf/dl-xstat64.c: File removed.
* elf/Makefile (rtld-routines): Remove them.
* sysdeps/unix/sysv/linux/xstat64.c: Remove RTLD_STAT64 conditionals.
Instead, use strong_alias instead of versioned_symbol in the
!SHLIB_COMPAT case.
* sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
* include/shlib-compat.h
(SHLIB_COMPAT): Require that IS_IN_##lib be defined nonzero.
[! NOT_IN_libc] (IS_IN_libc): Define it.
* cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Use -Dx=1 not just -Dx.
* elf/Makefile (CPPFLAGS-.os): Likewise.
* sunrpc/rpc_main.c (main): Don't declare with noreturn attribute.
Return the status instead of calling exit.
* Makeconfig (CFLAGS): Prepend -std=gnu99.
* Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
Remove superfluous rm command, whose @ plus make bugs hid
all these commands from the make output.
* include/stubs-prologue.h: New file. Give #error under #ifdef _LIBC.
* Makefile ($(inst_includedir)/gnu/stubs.h): Depend on it.
Use that file's contents instead of literal echo's for the prologue.
* include/features.h: Include <gnu/stubs.h> unconditionally.
* include/gnu/stubs.h: New file.
2002-09-30 Roland McGrath <roland@redhat.com>
* elf/rtld-Rules: New file.
* elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
$(objpfx)rtld-libc.a): New targets.
(generated): Add them.
(reloc-link): Remove -o $@ from the variable.
($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
(distribute): Add rtld-Rules.
(CPPFLAGS-.os): Define this instead of CFLAGS-.os.
* Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
(common-mostlyclean, common-clean): Clean up rtld-* files.
* sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
2002-10-11 10:52:20 +00:00
|
|
|
$(objpfx)librtld.mk: $(objpfx)librtld.map Makefile
|
2003-08-14 00:14:43 +00:00
|
|
|
LC_ALL=C \
|
2020-04-21 16:28:42 +00:00
|
|
|
sed -n 's@^[0-9a-f ]*$(common-objpfx)\([^(]*\)(\([^)]*\.os\)) *.*$$@\1 \2@p' \
|
2003-03-13 21:51:07 +00:00
|
|
|
$< | \
|
* sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/i386/dl-machine.h (elf_machine_type_class, elf_machine_rel):
Disable TLS relocs if [RTLD_BOOTSTRAP && !USE___THREAD].
* sysdeps/x86_64/dl-machine.h
(elf_machine_type_class, elf_machine_rela): Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_type_class, elf_machine_rela):
Likewise.
* include/link.h (struct link_map): Remove member l_tls_tp_initialized.
* elf/rtld.c (_dl_start_final, dl_main): Don't use it.
(_dl_start): Conditionalize PT_TLS check on [USE___THREAD].
* sysdeps/i386/dl-tls.h (__TLS_GET_ADDR): Use ___tls_get_addr_internal
instead of ___tls_get_addr.
(___tls_get_addr_internal): Add attribute_hidden to decl.
* sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
_dl_error_catch_tsd.
* elf/rtld.c (startup_error_tsd): New function.
(dl_main): Point _dl_error_catch_tsd at that.
* elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
use new function pointer instead.
* elf/dl-tsd.c: New file.
* elf/Makefile (routines): Add it.
2002-10-07 Roland McGrath <roland@redhat.com>
* elf/dl-misc.c (_dl_debug_vdprintf): Use INTERNAL_SYSCALL macro for
writev if it's available. Otherwise if [RTLD_PRIVATE_ERRNO] then
take _dl_load_lock around calling __writev.
* sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL): New macro.
(INLINE_SYSCALL): Use that.
* sysdeps/generic/dl-sysdep.h: New file.
* sysdeps/mach/hurd/dl-sysdep.h: New file.
* sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
* include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
[RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
access it directly.
* elf/dl-minimal.c (__errno_location): Removed.
* sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use GOTOFF access for errno.
* sysdeps/unix/sysv/linux/i386/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* sysdeps/unix/x86_64/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use PC-relative access for errno.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* include/tls.h: New file.
(USE___THREAD): New macro.
Define to 1 under [USE_TLS && HAVE___THREAD] and only when compiling
libc or libpthread.
* sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
* sysdeps/unix/i386/sysdep.S: Likewise.
* sysdeps/unix/x86_64/sysdep.S: Likewise.
* include/errno.h: Likewise.
* include/netdb.h: Likewise.
* include/resolv.h: Likewise.
* sysdeps/generic/errno.c: New file.
* csu/Makefile (aux): New variable, list errno.
* sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
* sysdeps/unix/alpha/sysdep.S: Likewise.
* sysdeps/generic/start.c: Likewise.
* sysdeps/unix/start.c: Likewise.
* sysdeps/unix/arm/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
* manual/search.texi (Tree Search Function, Hash Search Function):
Mention search.h clearly.
2002-10-05 Roland McGrath <roland@redhat.com>
* elf/dl-fxstat64.c: File removed.
* elf/dl-xstat64.c: File removed.
* elf/Makefile (rtld-routines): Remove them.
* sysdeps/unix/sysv/linux/xstat64.c: Remove RTLD_STAT64 conditionals.
Instead, use strong_alias instead of versioned_symbol in the
!SHLIB_COMPAT case.
* sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
* include/shlib-compat.h
(SHLIB_COMPAT): Require that IS_IN_##lib be defined nonzero.
[! NOT_IN_libc] (IS_IN_libc): Define it.
* cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Use -Dx=1 not just -Dx.
* elf/Makefile (CPPFLAGS-.os): Likewise.
* sunrpc/rpc_main.c (main): Don't declare with noreturn attribute.
Return the status instead of calling exit.
* Makeconfig (CFLAGS): Prepend -std=gnu99.
* Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
Remove superfluous rm command, whose @ plus make bugs hid
all these commands from the make output.
* include/stubs-prologue.h: New file. Give #error under #ifdef _LIBC.
* Makefile ($(inst_includedir)/gnu/stubs.h): Depend on it.
Use that file's contents instead of literal echo's for the prologue.
* include/features.h: Include <gnu/stubs.h> unconditionally.
* include/gnu/stubs.h: New file.
2002-09-30 Roland McGrath <roland@redhat.com>
* elf/rtld-Rules: New file.
* elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
$(objpfx)rtld-libc.a): New targets.
(generated): Add them.
(reloc-link): Remove -o $@ from the variable.
($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
(distribute): Add rtld-Rules.
(CPPFLAGS-.os): Define this instead of CFLAGS-.os.
* Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
(common-mostlyclean, common-clean): Clean up rtld-* files.
* sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
2002-10-11 10:52:20 +00:00
|
|
|
while read lib file; do \
|
|
|
|
case $$lib in \
|
|
|
|
libc_pic.a) \
|
2022-06-05 19:09:02 +00:00
|
|
|
LC_ALL=C grep -F -l /$$file \
|
* sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/i386/dl-machine.h (elf_machine_type_class, elf_machine_rel):
Disable TLS relocs if [RTLD_BOOTSTRAP && !USE___THREAD].
* sysdeps/x86_64/dl-machine.h
(elf_machine_type_class, elf_machine_rela): Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_type_class, elf_machine_rela):
Likewise.
* include/link.h (struct link_map): Remove member l_tls_tp_initialized.
* elf/rtld.c (_dl_start_final, dl_main): Don't use it.
(_dl_start): Conditionalize PT_TLS check on [USE___THREAD].
* sysdeps/i386/dl-tls.h (__TLS_GET_ADDR): Use ___tls_get_addr_internal
instead of ___tls_get_addr.
(___tls_get_addr_internal): Add attribute_hidden to decl.
* sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
_dl_error_catch_tsd.
* elf/rtld.c (startup_error_tsd): New function.
(dl_main): Point _dl_error_catch_tsd at that.
* elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
use new function pointer instead.
* elf/dl-tsd.c: New file.
* elf/Makefile (routines): Add it.
2002-10-07 Roland McGrath <roland@redhat.com>
* elf/dl-misc.c (_dl_debug_vdprintf): Use INTERNAL_SYSCALL macro for
writev if it's available. Otherwise if [RTLD_PRIVATE_ERRNO] then
take _dl_load_lock around calling __writev.
* sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL): New macro.
(INLINE_SYSCALL): Use that.
* sysdeps/generic/dl-sysdep.h: New file.
* sysdeps/mach/hurd/dl-sysdep.h: New file.
* sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
* include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
[RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
access it directly.
* elf/dl-minimal.c (__errno_location): Removed.
* sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use GOTOFF access for errno.
* sysdeps/unix/sysv/linux/i386/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* sysdeps/unix/x86_64/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use PC-relative access for errno.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* include/tls.h: New file.
(USE___THREAD): New macro.
Define to 1 under [USE_TLS && HAVE___THREAD] and only when compiling
libc or libpthread.
* sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
* sysdeps/unix/i386/sysdep.S: Likewise.
* sysdeps/unix/x86_64/sysdep.S: Likewise.
* include/errno.h: Likewise.
* include/netdb.h: Likewise.
* include/resolv.h: Likewise.
* sysdeps/generic/errno.c: New file.
* csu/Makefile (aux): New variable, list errno.
* sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
* sysdeps/unix/alpha/sysdep.S: Likewise.
* sysdeps/generic/start.c: Likewise.
* sysdeps/unix/start.c: Likewise.
* sysdeps/unix/arm/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
* manual/search.texi (Tree Search Function, Hash Search Function):
Mention search.h clearly.
2002-10-05 Roland McGrath <roland@redhat.com>
* elf/dl-fxstat64.c: File removed.
* elf/dl-xstat64.c: File removed.
* elf/Makefile (rtld-routines): Remove them.
* sysdeps/unix/sysv/linux/xstat64.c: Remove RTLD_STAT64 conditionals.
Instead, use strong_alias instead of versioned_symbol in the
!SHLIB_COMPAT case.
* sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
* include/shlib-compat.h
(SHLIB_COMPAT): Require that IS_IN_##lib be defined nonzero.
[! NOT_IN_libc] (IS_IN_libc): Define it.
* cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Use -Dx=1 not just -Dx.
* elf/Makefile (CPPFLAGS-.os): Likewise.
* sunrpc/rpc_main.c (main): Don't declare with noreturn attribute.
Return the status instead of calling exit.
* Makeconfig (CFLAGS): Prepend -std=gnu99.
* Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
Remove superfluous rm command, whose @ plus make bugs hid
all these commands from the make output.
* include/stubs-prologue.h: New file. Give #error under #ifdef _LIBC.
* Makefile ($(inst_includedir)/gnu/stubs.h): Depend on it.
Use that file's contents instead of literal echo's for the prologue.
* include/features.h: Include <gnu/stubs.h> unconditionally.
* include/gnu/stubs.h: New file.
2002-09-30 Roland McGrath <roland@redhat.com>
* elf/rtld-Rules: New file.
* elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
$(objpfx)rtld-libc.a): New targets.
(generated): Add them.
(reloc-link): Remove -o $@ from the variable.
($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
(distribute): Add rtld-Rules.
(CPPFLAGS-.os): Define this instead of CFLAGS-.os.
* Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
(common-mostlyclean, common-clean): Clean up rtld-* files.
* sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
2002-10-11 10:52:20 +00:00
|
|
|
$(common-objpfx)stamp.os $(common-objpfx)*/stamp.os | \
|
2003-08-14 00:14:43 +00:00
|
|
|
LC_ALL=C \
|
* sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/i386/dl-machine.h (elf_machine_type_class, elf_machine_rel):
Disable TLS relocs if [RTLD_BOOTSTRAP && !USE___THREAD].
* sysdeps/x86_64/dl-machine.h
(elf_machine_type_class, elf_machine_rela): Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_type_class, elf_machine_rela):
Likewise.
* include/link.h (struct link_map): Remove member l_tls_tp_initialized.
* elf/rtld.c (_dl_start_final, dl_main): Don't use it.
(_dl_start): Conditionalize PT_TLS check on [USE___THREAD].
* sysdeps/i386/dl-tls.h (__TLS_GET_ADDR): Use ___tls_get_addr_internal
instead of ___tls_get_addr.
(___tls_get_addr_internal): Add attribute_hidden to decl.
* sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
_dl_error_catch_tsd.
* elf/rtld.c (startup_error_tsd): New function.
(dl_main): Point _dl_error_catch_tsd at that.
* elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
use new function pointer instead.
* elf/dl-tsd.c: New file.
* elf/Makefile (routines): Add it.
2002-10-07 Roland McGrath <roland@redhat.com>
* elf/dl-misc.c (_dl_debug_vdprintf): Use INTERNAL_SYSCALL macro for
writev if it's available. Otherwise if [RTLD_PRIVATE_ERRNO] then
take _dl_load_lock around calling __writev.
* sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL): New macro.
(INLINE_SYSCALL): Use that.
* sysdeps/generic/dl-sysdep.h: New file.
* sysdeps/mach/hurd/dl-sysdep.h: New file.
* sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
* include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
[RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
access it directly.
* elf/dl-minimal.c (__errno_location): Removed.
* sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use GOTOFF access for errno.
* sysdeps/unix/sysv/linux/i386/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* sysdeps/unix/x86_64/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use PC-relative access for errno.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* include/tls.h: New file.
(USE___THREAD): New macro.
Define to 1 under [USE_TLS && HAVE___THREAD] and only when compiling
libc or libpthread.
* sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
* sysdeps/unix/i386/sysdep.S: Likewise.
* sysdeps/unix/x86_64/sysdep.S: Likewise.
* include/errno.h: Likewise.
* include/netdb.h: Likewise.
* include/resolv.h: Likewise.
* sysdeps/generic/errno.c: New file.
* csu/Makefile (aux): New variable, list errno.
* sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
* sysdeps/unix/alpha/sysdep.S: Likewise.
* sysdeps/generic/start.c: Likewise.
* sysdeps/unix/start.c: Likewise.
* sysdeps/unix/arm/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
* manual/search.texi (Tree Search Function, Hash Search Function):
Mention search.h clearly.
2002-10-05 Roland McGrath <roland@redhat.com>
* elf/dl-fxstat64.c: File removed.
* elf/dl-xstat64.c: File removed.
* elf/Makefile (rtld-routines): Remove them.
* sysdeps/unix/sysv/linux/xstat64.c: Remove RTLD_STAT64 conditionals.
Instead, use strong_alias instead of versioned_symbol in the
!SHLIB_COMPAT case.
* sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
* include/shlib-compat.h
(SHLIB_COMPAT): Require that IS_IN_##lib be defined nonzero.
[! NOT_IN_libc] (IS_IN_libc): Define it.
* cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Use -Dx=1 not just -Dx.
* elf/Makefile (CPPFLAGS-.os): Likewise.
* sunrpc/rpc_main.c (main): Don't declare with noreturn attribute.
Return the status instead of calling exit.
* Makeconfig (CFLAGS): Prepend -std=gnu99.
* Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
Remove superfluous rm command, whose @ plus make bugs hid
all these commands from the make output.
* include/stubs-prologue.h: New file. Give #error under #ifdef _LIBC.
* Makefile ($(inst_includedir)/gnu/stubs.h): Depend on it.
Use that file's contents instead of literal echo's for the prologue.
* include/features.h: Include <gnu/stubs.h> unconditionally.
* include/gnu/stubs.h: New file.
2002-09-30 Roland McGrath <roland@redhat.com>
* elf/rtld-Rules: New file.
* elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
$(objpfx)rtld-libc.a): New targets.
(generated): Add them.
(reloc-link): Remove -o $@ from the variable.
($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
(distribute): Add rtld-Rules.
(CPPFLAGS-.os): Define this instead of CFLAGS-.os.
* Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
(common-mostlyclean, common-clean): Clean up rtld-* files.
* sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
2002-10-11 10:52:20 +00:00
|
|
|
sed 's@^$(common-objpfx)\([^/]*\)/stamp\.os$$@rtld-\1'" +=$$file@"\
|
|
|
|
;; \
|
|
|
|
*/*.a) \
|
|
|
|
echo rtld-$${lib%%/*} += $$file ;; \
|
|
|
|
*) echo "Wasn't expecting $$lib($$file)" >&2; exit 1 ;; \
|
|
|
|
esac; \
|
|
|
|
done > $@T
|
2003-08-14 00:14:43 +00:00
|
|
|
echo rtld-subdirs = `LC_ALL=C sed 's/^rtld-\([^ ]*\).*$$/\1/' $@T \
|
|
|
|
| LC_ALL=C sort -u` >> $@T
|
* sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/i386/dl-machine.h (elf_machine_type_class, elf_machine_rel):
Disable TLS relocs if [RTLD_BOOTSTRAP && !USE___THREAD].
* sysdeps/x86_64/dl-machine.h
(elf_machine_type_class, elf_machine_rela): Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_type_class, elf_machine_rela):
Likewise.
* include/link.h (struct link_map): Remove member l_tls_tp_initialized.
* elf/rtld.c (_dl_start_final, dl_main): Don't use it.
(_dl_start): Conditionalize PT_TLS check on [USE___THREAD].
* sysdeps/i386/dl-tls.h (__TLS_GET_ADDR): Use ___tls_get_addr_internal
instead of ___tls_get_addr.
(___tls_get_addr_internal): Add attribute_hidden to decl.
* sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
_dl_error_catch_tsd.
* elf/rtld.c (startup_error_tsd): New function.
(dl_main): Point _dl_error_catch_tsd at that.
* elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
use new function pointer instead.
* elf/dl-tsd.c: New file.
* elf/Makefile (routines): Add it.
2002-10-07 Roland McGrath <roland@redhat.com>
* elf/dl-misc.c (_dl_debug_vdprintf): Use INTERNAL_SYSCALL macro for
writev if it's available. Otherwise if [RTLD_PRIVATE_ERRNO] then
take _dl_load_lock around calling __writev.
* sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL): New macro.
(INLINE_SYSCALL): Use that.
* sysdeps/generic/dl-sysdep.h: New file.
* sysdeps/mach/hurd/dl-sysdep.h: New file.
* sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
* include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
[RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
access it directly.
* elf/dl-minimal.c (__errno_location): Removed.
* sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use GOTOFF access for errno.
* sysdeps/unix/sysv/linux/i386/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* sysdeps/unix/x86_64/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use PC-relative access for errno.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* include/tls.h: New file.
(USE___THREAD): New macro.
Define to 1 under [USE_TLS && HAVE___THREAD] and only when compiling
libc or libpthread.
* sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
* sysdeps/unix/i386/sysdep.S: Likewise.
* sysdeps/unix/x86_64/sysdep.S: Likewise.
* include/errno.h: Likewise.
* include/netdb.h: Likewise.
* include/resolv.h: Likewise.
* sysdeps/generic/errno.c: New file.
* csu/Makefile (aux): New variable, list errno.
* sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
* sysdeps/unix/alpha/sysdep.S: Likewise.
* sysdeps/generic/start.c: Likewise.
* sysdeps/unix/start.c: Likewise.
* sysdeps/unix/arm/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
* manual/search.texi (Tree Search Function, Hash Search Function):
Mention search.h clearly.
2002-10-05 Roland McGrath <roland@redhat.com>
* elf/dl-fxstat64.c: File removed.
* elf/dl-xstat64.c: File removed.
* elf/Makefile (rtld-routines): Remove them.
* sysdeps/unix/sysv/linux/xstat64.c: Remove RTLD_STAT64 conditionals.
Instead, use strong_alias instead of versioned_symbol in the
!SHLIB_COMPAT case.
* sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
* include/shlib-compat.h
(SHLIB_COMPAT): Require that IS_IN_##lib be defined nonzero.
[! NOT_IN_libc] (IS_IN_libc): Define it.
* cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Use -Dx=1 not just -Dx.
* elf/Makefile (CPPFLAGS-.os): Likewise.
* sunrpc/rpc_main.c (main): Don't declare with noreturn attribute.
Return the status instead of calling exit.
* Makeconfig (CFLAGS): Prepend -std=gnu99.
* Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
Remove superfluous rm command, whose @ plus make bugs hid
all these commands from the make output.
* include/stubs-prologue.h: New file. Give #error under #ifdef _LIBC.
* Makefile ($(inst_includedir)/gnu/stubs.h): Depend on it.
Use that file's contents instead of literal echo's for the prologue.
* include/features.h: Include <gnu/stubs.h> unconditionally.
* include/gnu/stubs.h: New file.
2002-09-30 Roland McGrath <roland@redhat.com>
* elf/rtld-Rules: New file.
* elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
$(objpfx)rtld-libc.a): New targets.
(generated): Add them.
(reloc-link): Remove -o $@ from the variable.
($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
(distribute): Add rtld-Rules.
(CPPFLAGS-.os): Define this instead of CFLAGS-.os.
* Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
(common-mostlyclean, common-clean): Clean up rtld-* files.
* sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
2002-10-11 10:52:20 +00:00
|
|
|
mv -f $@T $@
|
|
|
|
|
|
|
|
$(objpfx)rtld-libc.a: $(objpfx)librtld.mk FORCE
|
|
|
|
$(MAKE) -f $< -f rtld-Rules
|
|
|
|
|
|
|
|
$(objpfx)librtld.os: $(objpfx)dl-allobjs.os $(objpfx)rtld-libc.a
|
2011-06-10 17:34:45 +00:00
|
|
|
$(LINK.o) -nostdlib -nostartfiles -r -o $@ '-Wl,-(' $^ -lgcc '-Wl,-)' \
|
2003-09-20 06:16:45 +00:00
|
|
|
-Wl,-Map,$@.map
|
|
|
|
|
|
|
|
generated += librtld.map librtld.mk rtld-libc.a librtld.os.map
|
1995-05-02 06:35:55 +00:00
|
|
|
|
2004-03-06 09:51:56 +00:00
|
|
|
z-now-yes = -Wl,-z,now
|
|
|
|
|
Update.
2001-12-11 Jakub Jelinek <jakub@redhat.com>
* elf/Makefile (dl-routines): Add conflict.
(rtld-ldscript-in, rtld-ldscript, rtld-parms): Remove.
(ld.so): Add _begin local symbol.
* elf/elf.h (DT_VALTAGIDX, DT_VALNUM, DT_ADDRTAGIDX, DT_ADDRNUM):
Define.
* elf/dl-deps.c (_dl_build_local_scope): New.
(_dl_map_object_deps): If LD_TRACE_PRELINKING, compute local scopes
of all libraries.
* elf/do-rel.h (VALIDX): Define.
(elf_dynamic_do_rel): If ELF_MACHINE_PLT_REL is defined, don't do
lazy binding for RELA. If DT_GNU_PRELINKED, DT_RELACOUNT relocations
can be skipped.
* elf/dl-conflict.c: New file.
* elf/dl-lookup.c (_dl_debug_bindings): New.
(_dl_lookup_symbol): Use _dl_debug_bindings. Reference_name is always
non-NULL.
(_dl_lookup_symbol_skip): Likewise.
(_dl_lookup_versioned_symbol): Likewise.
(_dl_lookup_versioned_symbol_skip): Likewise.
* elf/dl-runtime.c (PLTREL): If ELF_MACHINE_PLT_REL is defined,
define to ElfW(Rel).
* elf/dynamic-link.h (elf_get_dynamic_info): Record selected dynamic
tags in the DT_VALRNGLO..DT_VALRNGHI and DT_ADDRRNGLO..DT_ADDRRNGHI
ranges.
Don't adjust address dynamic tags if l_addr is 0.
* elf/rtld.c (_dl_trace_prelink, _dl_trace_prelink_map): New variables.
(_dl_start): Skip ELF_DYNAMIC_RELOCATE if ld.so is prelinked.
(VALIDX, ADDRIDX): Define.
(_dl_start_final): Initialize _dl_rtld_map's l_map_start and l_map_end.
(dl_main): Print library list for LD_TRACE_PRELINKING.
If prelinking information can be used, skip relocating libraries and
call _dl_resolve_conflicts instead.
(process_envvars): Handle LD_TRACE_PRELINKING envvar.
* elf/dl-load.c (_dl_map_object): Don't create fake libs
if LD_TRACE_PRELINKING.
* include/link.h (struct link_map) [l_info]: Add DT_VALNUM
+ DT_ADDRNUM.
* sysdeps/generic/ldsodefs.h (_dl_trace_prelink_map): New declaration.
(DL_DEBUG_PRELINK): Define.
(_dl_resolve_conflicts): Add prototype.
* sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): Reinitialize
.plt for prelinked libraries where prelinking info cannot be used.
(elf_machine_rela): If relocating R_ALPHA_JMP_SLOT in .gnu.conflict
section, use RESOLVE_CONFLICT_FIND_MAP to find out reloc's link_map.
* sysdeps/arm/bits/link.h: New file.
* sysdeps/arm/dl-machine.h (elf_machine_runtime_setup): Save original
content of .got[1].
(ELF_MACHINE_NO_RELA): Only define if RTLD_BOOTSTRAP.
(ELF_MACHINE_PLT_REL): Define.
(elf_machine_rela, elf_machine_rela_relative): New.
(elf_machine_lazy_rel): Reinitialize R_ARM_JUMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/i386/bits/link.h: New file.
* sysdeps/i386/dl-machine.h (elf_machine_runtime_setup): Save original
content of .got[1].
(ELF_MACHINE_NO_RELA): Only define if RTLD_BOOTSTRAP.
(ELF_MACHINE_PLT_REL): Define.
(elf_machine_rela, elf_machine_rela_relative): New.
(elf_machine_lazy_rel): Reinitialize R_386_JUMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/powerpc/dl-machine.h (elf_machine_rela): If relocating
conflicts, skip finaladdr computation. Use RESOLVE_CONFLICT_FIND_MAP
to find out map for R_PPC_JMP_SLOT relocs.
* sysdeps/sparc/sparc32/dl-machine.h (VALIDX): Define.
(OPCODE_BA): Define.
(elf_machine_runtime_setup): Reinitialize .plt for prelinked
libraries where prelinking info cannot be used.
(sparc_fixup_plt): Renamed from elf_machine_fixup_plt.
(elf_machine_fixup_plt): Call sparc_fixup_plt.
(elf_machine_rela): Set value to 0 if relocating conflicts.
Call sparc_fixup_plt for R_SPARC_JMP_SLOT.
* sysdeps/sparc/sparc64/dl-machine.h (VALIDX): Define.
(sparc64_fixup_plt): Fix a typo.
(elf_machine_rela): Set value to 0 if relocating conflicts.
Handle R_SPARC_JMP_SLOT relocs when relocating conflicts.
(elf_machine_runtime_setup): Reinitialize .plt for prelinked
libraries where prelinking info cannot be used.
* sysdeps/sh/bits/link.h: New file.
* sysdeps/sh/dl-machine.h (elf_machine_runtime_setup): Save original
content of .got[1].
(elf_machine_lazy_rel): Reinitialize R_SH_JMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/s390/s390-32/bits/link.h: New file.
* sysdeps/s390/s390-32/dl-machine.h (elf_machine_runtime_setup):
Save original content of .got[1].
(elf_machine_lazy_rel): Reinitialize R_390_JMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/s390/s390-64/bits/link.h: New file.
* sysdeps/s390/s390-64/dl-machine.h (elf_machine_runtime_setup):
Save original content of .got[1].
(elf_machine_lazy_rel): Reinitialize R_390_JMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/x86_64/bits/link.h: New file.
* sysdeps/x86_64/dl-machine.h (elf_machine_runtime_setup):
Save original content of .got[1].
(elf_machine_lazy_rel): Reinitialize R_X86_64_JMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
2001-12-12 00:21:26 +00:00
|
|
|
$(objpfx)ld.so: $(objpfx)librtld.os $(ld-map)
|
2013-06-13 17:26:44 +00:00
|
|
|
# Link into a temporary file so that we don't touch $@ at all
|
|
|
|
# if the sanity check below fails.
|
|
|
|
$(LINK.o) -nostdlib -nostartfiles -shared -o $@.new \
|
2004-03-06 09:51:56 +00:00
|
|
|
$(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now)) \
|
2022-05-16 13:17:14 +00:00
|
|
|
$(dt-relr-ldflag) \
|
Update.
2001-12-11 Jakub Jelinek <jakub@redhat.com>
* elf/Makefile (dl-routines): Add conflict.
(rtld-ldscript-in, rtld-ldscript, rtld-parms): Remove.
(ld.so): Add _begin local symbol.
* elf/elf.h (DT_VALTAGIDX, DT_VALNUM, DT_ADDRTAGIDX, DT_ADDRNUM):
Define.
* elf/dl-deps.c (_dl_build_local_scope): New.
(_dl_map_object_deps): If LD_TRACE_PRELINKING, compute local scopes
of all libraries.
* elf/do-rel.h (VALIDX): Define.
(elf_dynamic_do_rel): If ELF_MACHINE_PLT_REL is defined, don't do
lazy binding for RELA. If DT_GNU_PRELINKED, DT_RELACOUNT relocations
can be skipped.
* elf/dl-conflict.c: New file.
* elf/dl-lookup.c (_dl_debug_bindings): New.
(_dl_lookup_symbol): Use _dl_debug_bindings. Reference_name is always
non-NULL.
(_dl_lookup_symbol_skip): Likewise.
(_dl_lookup_versioned_symbol): Likewise.
(_dl_lookup_versioned_symbol_skip): Likewise.
* elf/dl-runtime.c (PLTREL): If ELF_MACHINE_PLT_REL is defined,
define to ElfW(Rel).
* elf/dynamic-link.h (elf_get_dynamic_info): Record selected dynamic
tags in the DT_VALRNGLO..DT_VALRNGHI and DT_ADDRRNGLO..DT_ADDRRNGHI
ranges.
Don't adjust address dynamic tags if l_addr is 0.
* elf/rtld.c (_dl_trace_prelink, _dl_trace_prelink_map): New variables.
(_dl_start): Skip ELF_DYNAMIC_RELOCATE if ld.so is prelinked.
(VALIDX, ADDRIDX): Define.
(_dl_start_final): Initialize _dl_rtld_map's l_map_start and l_map_end.
(dl_main): Print library list for LD_TRACE_PRELINKING.
If prelinking information can be used, skip relocating libraries and
call _dl_resolve_conflicts instead.
(process_envvars): Handle LD_TRACE_PRELINKING envvar.
* elf/dl-load.c (_dl_map_object): Don't create fake libs
if LD_TRACE_PRELINKING.
* include/link.h (struct link_map) [l_info]: Add DT_VALNUM
+ DT_ADDRNUM.
* sysdeps/generic/ldsodefs.h (_dl_trace_prelink_map): New declaration.
(DL_DEBUG_PRELINK): Define.
(_dl_resolve_conflicts): Add prototype.
* sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): Reinitialize
.plt for prelinked libraries where prelinking info cannot be used.
(elf_machine_rela): If relocating R_ALPHA_JMP_SLOT in .gnu.conflict
section, use RESOLVE_CONFLICT_FIND_MAP to find out reloc's link_map.
* sysdeps/arm/bits/link.h: New file.
* sysdeps/arm/dl-machine.h (elf_machine_runtime_setup): Save original
content of .got[1].
(ELF_MACHINE_NO_RELA): Only define if RTLD_BOOTSTRAP.
(ELF_MACHINE_PLT_REL): Define.
(elf_machine_rela, elf_machine_rela_relative): New.
(elf_machine_lazy_rel): Reinitialize R_ARM_JUMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/i386/bits/link.h: New file.
* sysdeps/i386/dl-machine.h (elf_machine_runtime_setup): Save original
content of .got[1].
(ELF_MACHINE_NO_RELA): Only define if RTLD_BOOTSTRAP.
(ELF_MACHINE_PLT_REL): Define.
(elf_machine_rela, elf_machine_rela_relative): New.
(elf_machine_lazy_rel): Reinitialize R_386_JUMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/powerpc/dl-machine.h (elf_machine_rela): If relocating
conflicts, skip finaladdr computation. Use RESOLVE_CONFLICT_FIND_MAP
to find out map for R_PPC_JMP_SLOT relocs.
* sysdeps/sparc/sparc32/dl-machine.h (VALIDX): Define.
(OPCODE_BA): Define.
(elf_machine_runtime_setup): Reinitialize .plt for prelinked
libraries where prelinking info cannot be used.
(sparc_fixup_plt): Renamed from elf_machine_fixup_plt.
(elf_machine_fixup_plt): Call sparc_fixup_plt.
(elf_machine_rela): Set value to 0 if relocating conflicts.
Call sparc_fixup_plt for R_SPARC_JMP_SLOT.
* sysdeps/sparc/sparc64/dl-machine.h (VALIDX): Define.
(sparc64_fixup_plt): Fix a typo.
(elf_machine_rela): Set value to 0 if relocating conflicts.
Handle R_SPARC_JMP_SLOT relocs when relocating conflicts.
(elf_machine_runtime_setup): Reinitialize .plt for prelinked
libraries where prelinking info cannot be used.
* sysdeps/sh/bits/link.h: New file.
* sysdeps/sh/dl-machine.h (elf_machine_runtime_setup): Save original
content of .got[1].
(elf_machine_lazy_rel): Reinitialize R_SH_JMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/s390/s390-32/bits/link.h: New file.
* sysdeps/s390/s390-32/dl-machine.h (elf_machine_runtime_setup):
Save original content of .got[1].
(elf_machine_lazy_rel): Reinitialize R_390_JMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/s390/s390-64/bits/link.h: New file.
* sysdeps/s390/s390-64/dl-machine.h (elf_machine_runtime_setup):
Save original content of .got[1].
(elf_machine_lazy_rel): Reinitialize R_390_JMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/x86_64/bits/link.h: New file.
* sysdeps/x86_64/dl-machine.h (elf_machine_runtime_setup):
Save original content of .got[1].
(elf_machine_lazy_rel): Reinitialize R_X86_64_JMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
2001-12-12 00:21:26 +00:00
|
|
|
$(filter-out $(map-file),$^) $(load-map-file) \
|
2022-04-27 05:09:10 +00:00
|
|
|
-Wl,-soname=$(rtld-installed-name)
|
2015-02-12 21:38:47 +00:00
|
|
|
$(call after-link,$@.new)
|
2013-06-13 17:26:44 +00:00
|
|
|
$(READELF) -s $@.new \
|
2007-10-20 00:54:16 +00:00
|
|
|
| $(AWK) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
|
2013-06-13 17:26:44 +00:00
|
|
|
mv -f $@.new $@
|
Mon Jun 10 06:14:03 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/mach/hurd/dl-sysdep.c (__open): Define this instead of open.
(__close, __mmap): Likewise define with __ names now.
Mon Jun 10 05:13:18 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/dl-support.c: New file.
* elf/Makefile (CFLAGS-dl-support.c): New variable.
(routines, elide-routines.so): Add dl-support.
* elf/dl-minimal.c (_dl_pagesize): Remove common defn.
* elf/dl-load.c (_dl_pagesize): Define it here.
(_dl_map_object_from_fd): Initialize it if zero.
* elf/link.h (_dl_pagesize): Remove const.
Sun Jun 9 04:04:26 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/Makefile (routines): Add dl-symbol.
* elf/dl-lookup.c (_dl_symbol_value): Moved to ...
* elf/dl-symbol.c: New file.
* elf/elf.h (Elf32_Xword, Elf32_Sxword): New types.
(Elf32_Section, Elf64_Section): New types, 16 bits.
(Elf32_Sym, Elf64_Sym): Use it.
* elf/dl-deps.c (_dl_open): Moved to ...
* elf/dl-open.c: New file.
* Makefile (routines): Add dl-open.
* elf/Makefile (dl-routines): New variable.
(routines): Add $(dl-routines).
(elide-routines.so): New variable, set to $(dl-routines).
(libdl-inhibit-o): Variable removed; build all flavors of -ldl.
(rtld-routines): All but rtld, dl-sysdep, and dl-minimal moved to
$(dl-routines).
* elf/dl-lookup.c (_dl_lookup_symbol): Remove magic symbol grokage.
* elf/dladdr.c: Use ELFW(ST_BIND) in place of ELF32_ST_BIND.
* elf/dl-load.c (open_path): Use __ names for open and close. Avoid
using strdup.
(_dl_map_object): Likewise.
(_dl_map_object_from_fd): Use __ names for mmap, munmap, and mprotect.
* elf/dl-minimal.c (malloc): Likewise.
* elf/dl-reloc.c (_dl_relocate_object): Likewise.
* elf/dl-minimal.c (_dl_pagesize): New variable.
(malloc): Use that instead of a static variable.
* elf/dl-reloc.c (_dl_relocate_object): Use _dl_pagesize instead of
calling getpagesize.
* elf/dl-load.c (_dl_map_object_from_fd): Likewise.
* elf/link.h: Declare _dl_pagesize.
* elf/rtld.c (dl_r_debug): Renamed to _dl_r_debug.
* elf/link.h (struct link_map): Use Half for l_phnum instead of Word.
* elf/rtld.c (dl_main): Use Half for phdr count arg.
(_dl_sysdep_start): Update prototype of DL_MAIN function ptr arg.
* elf/dl-load.c (_dl_map_object_from_fd): Use explicit Elf32_Word to
extract 4-byte magic number, not ElfW(Word). Match EI_CLASS against
native wordsize, either 32 or 64.
* elf/elf.h (Elf64_Byte, Elf64_Section): Typedefs removed. In C a
char is always a byte, no need for a typedef. Section indices are
16-bit quantities in elf64, which already have a typedef Elf64_Half.
Remove partial -lelf implementation. There is now a
separately-distributed `libelf' package that implements it.
* elf/dl-lookup.c: Don't #include <libelf.h> any more.
(_dl_elf_hash): New function, moved from
libelf.h:elf_hash.
(_dl_lookup_symbol): Use it instead of elf_hash.
* elf/libelf.h: File removed.
* elf/elf_hash.c: File removed.
* elf/Makefile (headers): Remove libelf.h.
(extra-libs): Remove libelf.
(libelf-routines): Variable removed.
* elf/Makefile (libdl.so): Remove commands from this target. The
implicit rule commands are correct, this explicit rule just serves to
add some dependencies.
* elf/dl-lookup.c (_dl_lookup_symbol): Use ELFW(ST_TYPE) in place of
ELF32_ST_TYPE. Likewise ST_BIND.
* elf/do-rel.h (elf_dynamic_do_rel): Likewise R_SYM.
* elf/link.h (ElfW): New macro for wordsize-independent ElfXX_* type
naming.
(ELFW): New macro, likewise for ELFXX_* macro naming.
(_ElfW, _ElfW_1): New macros, subroutines of ElfW and ELF.
Sat Jun 8 20:52:38 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/link.h, elf/do-rel.h, elf/dynamic-link.h, elf/dl-deps.c,
elf/dl-init.c, elf/dl-load.c, elf/dl-lookup.c, elf/dl-reloc.c,
elf/dl-runtime.c, elf/dladdr.c, elf/dlclose.c, elf/dlsym.c,
elf/linux-compat.c, elf/rtld.c: Change all uses of `Elf32_XXX' to
`ElfW(XXX)' for wordsize-independence.
Sat Jun 8 20:50:42 1996 Richard Henderson <rth@tamu.edu>
* elf/elf.h: Move Elf64_* types in parity with Elf32 counterparts.
(Elf64_auxv_t): New type.
(EM_ALPHA, R_ALPHA_*): New macros for elf64-alpha format.
1996-06-10 10:18:47 +00:00
|
|
|
|
2015-06-05 22:20:13 +00:00
|
|
|
ifeq (yes,$(build-shared))
|
2014-09-16 16:50:45 +00:00
|
|
|
# interp.c exists just to get the runtime linker path into libc.so.
|
2015-06-05 22:20:13 +00:00
|
|
|
$(objpfx)interp.os: $(common-objpfx)runtime-linker.h
|
|
|
|
endif
|
1998-05-08 20:42:23 +00:00
|
|
|
|
update from main archive 970121
1997-01-21 Paul Eggert <eggert@twinsun.com>
* posix/getopt.c (_getopt_internal): Return -1, not EOF, when args
are exhausted; this is required by POSIX.2.
* catgets/gencat.c, db/makedb.c, locale/programs/locale.c,
locale/programs/localedef.c, manual/examples/subopt.c,
posix/getopt.c, posix/getopt1.c, stdio-common/bug4.c,
sunrpc/rpcinfo.c (main): Check getopt return value against -1, not EOF.
Tue Jan 21 23:10:40 1997 Ulrich Drepper <drepper@cygnus.com>
* version.h (VERSION): Bump to 1.102.
* sysdeps/unix/sysv/linux/alpha/Dist: Add kernel_sigaction.h.
* elf/Makefile: Don't use CFLAGS-dl-load.c, but instead
CPPFLAGS-dl-load.c so that dependencies can be determined correctly.
* elf/dl-load.c: Fix comment.
* time/Banner: New file.
* time/Makefile (distribute): Add Banner.
Update from ADO tzcode1997a and tzdata1997a.
* time/antarctica: Update.
* time/australia: Update.
* time/zdump.c: Update.
* time/zic.c: Update.
* time/zone.tab: Update.
Mon Jan 20 08:38:32 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* config.make.in (has-ldconfig): New variable.
* configure, configure.in (has_ldconfig): New substitute.
* sysdeps/unix/sysv/linux/configure.in (has_ldconfig): New,
check if $srcdir/elf/ldconfig.c exists.
* Makeconfig (rootsbindir): New, default as
$(exec_prefix)/sbin.
(rtld-version-installed-name): New, default as
ld-$(version).so.
* Makefile (install): Call `$(common-objpfx)elf/ldconfig -d'
only if $(cross-compiling) is no and $(build-shared) is yes.
* Makerules (make-shlib-link): New macro.
($(slibdir)/libfoo.so.$(libfoo.so-version)): Use
$(make-shlib-link) for symlink.
(install-rootsbin, install-rootsbin-nosubdir): New.
(install-no-libc.a-nosubdir): Add
install-rootsbin-nosubdir.
* Rules (others): Add $(install-rootsbin).
* config.make.in (rootsbindir): New.
* configure, configure.in (libc_cv_rootsbindir): New
substitute.
* elf/Makefile (others, install-rootsbin): New, set to
ldconfig.
(+link): New for static linking.
($(slibdir)/$(rtld-version-installed-name)): New.
($(slibdir)/$(rtld-installed-name)): Depend on
$(slibdir)/$(rtld-version-installed-name) and use
$(make-shlib-link) for symlink.
* sunrpc/xdr.c (xdr_string): Return FALSE if sp == NULL
while XDR_ENCODE.
* sysdeps/unix/sysv/linux/a.out.h: Use #include_next for
glibc internals.
* sysdeps/unix/sysv/linux/configure.in (libc_cv_rootsbindir):
New, set to "/sbin" if "$prefix" == "/usr".
Tue Jan 21 13:38:39 1997 Ulrich Drepper <drepper@cygnus.com>
* Makefile (distribute): Add glibcbug.in.
Reported by Philip Blundell <pjb27@cam.ac.uk>.
* elf/Makefile ($(objpfx)trusted-dirs.h): Create elf/ subdir in
build directory if necessary.
Reported by marcus@shannon.sysc.pdx.edu (Marcus G. Daniels).
1997-01-22 05:26:05 +00:00
|
|
|
ifneq (ld.so,$(rtld-installed-name))
|
update from main archive 961116
Sun Nov 17 03:13:57 1996 Ulrich Drepper <drepper@cygnus.com>
* db/makedb.c: Update and reformat copyright.
* elf/Makefile: Likewise.
* elf/dl-close.c: Likewise.
* elf/dl-debug.c: Likewise.
* elf/dl-deps.c: Likewise.
* elf/dl-error.c: Likewise.
* elf/dl-fini.c: Likewise.
* elf/dl-init.c: Likewise.
* elf/dl-load.c: Likewise.
* elf/dl-lookup.c: Likewise.
* elf/dl-minimal.c: Likewise.
* elf/dl-object.c: Likewise.
* elf/dl-open.c: Likewise.
* elf/dl-reloc.c: Likewise.
* elf/dl-runtime.c: Likewise.
* elf/dl-support.c: Likewise.
* elf/dl-symbol.c: Likewise.
* elf/dladdr.c: Likewise.
* elf/dlclose.c: Likewise.
* elf/dlerror.c: Likewise.
* elf/dlopen.c: Likewise.
* elf/dlsym.c: Likewise.
* elf/do-rel.h: Likewise.
* elf/dynamic-link.h: Likewise.
* elf/eval.c: Likewise.
* elf/rtld.c: Likewise.
* inet/ether_hton.c: Likewise.
* inet/ether_ntoh.c: Likewise.
* inet/ether_line.c: Likewise.
* inet/getnetgrent_r.c: Likewise.
* inet/Makefile (+gccwarn): Remove definition.
Instead set CFLAGS-rcmd.c, CFLAGS-rexec.c, and CFLAGS-ruserpass.c
to `-w'.
* inet/aliases.h: Add C++ protection.
* inet/ether_hton.c: Add prototype for __nss_ethers_lookup.
(ether_hostton): Remove unused variable result.
* inet/ether_ntoh.c: Likewise.
* inet/ether_line.c: Include <ctype.h> and <string.h>.
* inet/getnetgrent_r.c: Include <stdlib.h>.
Use casts to prevent warnings.
(innetgr): Initialize `known' and `needed'.
* inet/inet_net.c: Make local variable `i' of type u_int32_t.
* nss/getXXbyYY_r.c (INTERNAL (REENTRANT_NAME)) [NEED__RES]: Don't
return NULL. Instead set *RESULT to NULL and return -1.
* nss/getXXent_r.c (INTERNAL (REENTRANT_GETNAME)): Likewise.
(SETFUNC_NAME, ENDFUNC_NAME) [NEED__RES]: Don't return anything.
* nss/nss_files/files-alias.c: Debug function. I didn't worked at
all before.
Sat Nov 16 15:25:34 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/posix/readv.c: Don't use PTR anymore.
* sysdeps/posix/writev.c: Likewise.
* version.h (VERSION): Bump to 1.98.
* nss/db-Makefile: Generate lines for getXXXent iteration.
* sysdeps/alpha/Dist: Don't distribute removed files divlu.S,
divqu.S, remlu.S, and remqu.S.
Fri Nov 15 08:55:54 1996 Andreas Jaeger <aj@arthur.pfalz.de>
* posix/unistd.h: Correct typo in documentation.
Thu Nov 14 18:08:14 1996 a sun <asun@zoology.washington.edu>
* inet/netinet/tcp.h: Use __ protected versions instead of
BYTE_ORDER, LITTLE_ENDIAN, and BIG_ENDIAN directly.
Sat Nov 16 13:44:55 1996 Ulrich Drepper <drepper@cygnus.com>
* intl/loadmsgcat.c (_nl_msg_cat_cntr): Initialize so that
references in libc.so are not anymore undefined.
Sat Nov 16 18:17:36 1996 NIIBE Yutaka <gniibe@mri.co.jp>
* io/utime.h: Rename second parameter for utime to prevent warning
for -Wshadow.
* dirent/dirent.h: Same here for scandir prototype.
* math/mathcalls.h: Likewise for frexp and ldexp.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise for bindresvport.
Sat Nov 16 03:49:27 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/tst-strtod.c: Add test for error case below.
Sat Nov 16 03:48:39 1996 Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>
* stdlib/strtod.c: Recognize numbers like 0e-19.
Fri Nov 15 08:38:43 1996 Andreas Jaeger <aj@arthur.pfalz.de>
* time/Makefile ($(installed-localtime-file)): Fix path to
rellns-sh.
* Makefile: Don't generate and install gnu/lib-names.h if
$(build-shared) is not `yes'.
Thu Nov 14 09:23:58 1996 H.J. Lu (hjl@gnu.ai.mit.edu)
* sysdeps/posix/Makefile ($(common-objpfx)mk-stdiolim): Depend
on $(..)posix/posix1_lim.h, not ../posix/posix1_lim.h.
* Makerules (REAL_MAKE_VERSION): New, use it instead of
MAKE_VERSION.
Thu Nov 14 22:10:43 1996 Ulrich Drepper <drepper@cygnus.com>
* nss/nss_files/files-XXX.x (_nss_files_get,ENTNAME_r): Fix typo.
* nss/getXXent_r.c: Fix typo. Set correct return value when
no further service is available.
Thu Nov 14 17:48:13 1996 Ulrich Drepper <drepper@cygnus.com>
* db/recno/rec_put.c: Add cast to avoid warning.
* db/recno/rec_close.c: Likewise.
* db/mpool/mpool.c: Likewise.
* db/hash/hash_bigkey.h: Likewise.
* db/hash/hash.c: Likewise.
* db/btree/bt_split.c: Likewise.
* db/btree/bt_put.c: Likewise.
Thu Nov 14 14:11:44 1996 Ulrich Drepper <drepper@cygnus.com>
* dirent/dirent.h: Update copyright.
* elf/elf.h: Likewise.
* elf/link.h: Likewise.
* gmon/sys/gmon_out.h: Likewise.
* gnu-versions.h: Likewise.
* intl/libintl.h: Likewise.
* io/fcntl.h: Likewise.
* io/ftw.h: Likewise.
* io/sys/statfs.h: Likewise.
* io/utime.h: Likewise.
* locale/langinfo.h: Likewise.
* malloc/malloc.h: Likewise.
* malloc/obstack.h: Likewise.
* misc/ar.h: Likewise.
* misc/error.h: Likewise.
* misc/mntent.h: Likewise.
* misc/sgtty.h: Likewise.
* misc/sys/cdefs.h: Likewise.
* misc/sys/dir.h: Likewise.
* misc/sys/file.h: Likewise.
* misc/sys/ioctl.h: Likewise.
* misc/sys/ustat.h: Likewise.
* posix/fnmatch.h: Likewise.
* posix/getopt.h: Likewise.
* posix/glob.h: Likewise.
* posix/posix2_lim.h: Likewise.
* posix/regex.h: Likewise.
* posix/sys/times.h: Likewise.
* posix/sys/types.h: Likewise.
* posix/sys/utsname.h: Likewise.
* posix/tar.h: Likewise.
* posix/wordexp.h: Likewise.
* resource/sys/resource.h: Likewise.
* resource/sys/vlimit.h: Likewise.
* resource/sys/vtimes.h: Likewise.
* socket/sys/socket.h: Likewise.
* socket/sys/un.h: Likewise.
* stdio-common/printf.h: Likewise.
* stdlib/alloca.h: Likewise.
* string/argz.h: Likewise.
* string/endian.h: Likewise.
* string/envz.h: Likewise.
* string/memory.h: Likewise.
* string/strings.h: Likewise.
* sysdeps/generic/crypt.h: Likewise.
* sysdeps/generic/direntry.h: Likewise.
* sysdeps/generic/gnu/types.h: Likewise.
* sysdeps/generic/ioctl-types.h: Likewise.
* sysdeps/generic/netinet/in.h: Likewise.
* sysdeps/generic/resourcebits.h: Likewise.
* sysdeps/generic/sigset.h: Likewise.
* sysdeps/generic/sockaddrcom.h: Likewise.
* sysdeps/generic/sys/mman.h: Likewise.
* sysdeps/generic/sys/ptrace.h: Likewise.
* sysdeps/generic/termbits.h: Likewise.
* sysdeps/generic/waitstatus.h: Likewise.
* sysdeps/ieee754/huge_val.h: Likewise.
* sysdeps/ieee754/nan.h: Likewise.
* sysdeps/mach/hurd/local_lim.h: Likewise.
* sysdeps/mach/hurd/statbuf.h: Likewise.
* sysdeps/stub/huge_val.h: Likewise.
* sysdeps/stub/libc-lock.h: Likewise.
* sysdeps/stub/signum.h: Likewise.
* sysdeps/stub/statbuf.h: Likewise.
* sysdeps/stub/waitflags.h: Likewise.
* sysdeps/unix/bsd/bsd4.4/sockaddrcom.h: Likewise.
* sysdeps/unix/bsd/osf/alpha/statbuf.h: Likewise.
* sysdeps/unix/bsd/osf/sys/mman.h: Likewise.
* sysdeps/unix/bsd/signum.h: Likewise.
* sysdeps/unix/bsd/statbuf.h: Likewise.
* sysdeps/unix/bsd/sun/signum.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/resourcebits.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/termbits.h: Likewise.
* sysdeps/unix/bsd/ultrix4/sys/mman.h: Likewise.
* sysdeps/unix/bsd/waitflags.h: Likewise.
* sysdeps/unix/sysv/irix4/signum.h: Likewise.
* sysdeps/unix/sysv/irix4/statbuf.h: Likewise.
* sysdeps/unix/sysv/irix4/sys/mman.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/statbuf.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/sys/io.h: Likewise.
* sysdeps/unix/sysv/linux/direntry.h: Likewise.
* sysdeps/unix/sysv/linux/gnu/types.h: Likewise.
* sysdeps/unix/sysv/linux/ioctl-types.h: Likewise.
* sysdeps/unix/sysv/linux/local_lim.h: Likewise.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
* sysdeps/unix/sysv/linux/resourcebits.h: Likewise.
* sysdeps/unix/sysv/linux/signum.h: Likewise.
* sysdeps/unix/sysv/linux/statbuf.h: Likewise.
* sysdeps/unix/sysv/linux/sys/io.h: Likewise.
* sysdeps/unix/sysv/linux/sys/klog.h: Likewise.
* sysdeps/unix/sysv/linux/sys/mman.h: Likewise.
* sysdeps/unix/sysv/linux/sys/ptrace.h: Likewise.
* sysdeps/unix/sysv/linux/syscall.h: Likewise.
* sysdeps/unix/sysv/linux/termbits.h: Likewise.
* sysdeps/unix/sysv/local_lim.h: Likewise.
* sysdeps/unix/sysv/sco3.2.4/syscall.h: Likewise.
* sysdeps/unix/sysv/sco3.2/local_lim.h: Likewise.
* sysdeps/unix/sysv/signum.h: Likewise.
* sysdeps/unix/sysv/sysv4/i386/statbuf.h: Likewise.
* sysdeps/unix/sysv/sysv4/signum.h: Likewise.
* sysdeps/unix/sysv/sysv4/sigset.h: Likewise.
* sysdeps/unix/sysv/sysv4/solaris2/signum.h: Likewise.
* sysdeps/unix/sysv/sysv4/solaris2/statbuf.h: Likewise.
* sysdeps/unix/sysv/sysv4/waitflags.h: Likewise.
* sysdeps/vax/huge_val.h: Likewise.
* values.h: Likewise.
Thu Nov 14 04:22:41 1996 Ulrich Drepper <drepper@cygnus.com>
* malloc/obstack.h: Use memcpy instead of bcopy and define a macro
`memcpy' using bcopy if memcpy is not available.
* manual/stdio.texi: Correct description of printf customization.
The argument info function is not optional anymore and the
interface for `printf_function' also changed.
* manual/examples/rprintf.c: Define and use argument info function.
* stdio-common/printf.h (struct printf_info): Change type for field
`pad' to wchar_t.
Correct comment for `register_printf_function'.
* nss/getXXbyYY.c [NEED_H_ERRNO]: Don't pass pointer to h_errno
to reentrant function. Instead use temporary variable and set
h_errno if an error occured.
Reported by NIIBE Yutaka.
are no bits set in the masks. Reported by baldazzi@csr.unibo.it.
1996-11-17 03:15:52 +00:00
|
|
|
# Make sure ld.so.1 exists in the build directory so we can link
|
1996-06-11 21:07:00 +00:00
|
|
|
# against it.
|
|
|
|
$(objpfx)$(rtld-installed-name): $(objpfx)ld.so
|
2015-07-08 21:21:41 +00:00
|
|
|
$(make-link)
|
Update.
1998-02-10 23:57 Ulrich Drepper <drepper@happy.cygnus.com>
* misc/tst-efgcvt.c: Add more tests.
* misc/efgcvt_r.c: Correct result for above new tests.
1998-02-06 17:22 H.J. Lu <hjl@gnu.org>
* misc/efgcvt_r.c (fcvt_r, ecvt_r): Correctly handle
NDIGIT <= 0.
1998-02-10 16:48 Philip Blundell <pb@nexus.co.uk>
* Makerules (install-no-libc.a-nosubdir): Don't install-bin (etc)
if the programs weren't built.
1998-02-09 10:12 Philip Blundell <pb@nexus.co.uk>
* sysdeps/libm-ieee754/s_exp2.c (__ieee754_exp2): If we don't have
FE_TONEAREST, soldier on regardless and do the best we can.
* sysdeps/libm-ieee754/s_exp2f.c (__ieee754_exp2f): likewise.
1998-02-5 17:20 Philip Blundell <pb@nexus.co.uk>
* sysdeps/standalone/filedesc.h: Define __need_FOPEN_MAX, not
_STDIO_H, before including <bits/stdio_lim.h>.
* sysdeps/standalone/arm/bits/errno.h (EOVERFLOW): Added.
* io/fts.c (fts_build): Don't try to use d_type if it doesn't
exist.
* sysdeps/arm/sys/ucontext.h: New file.
1998-02-04 10:11 Philip Blundell <pb@nexus.co.uk>
* manual/stdio.texi (Formatted Output Functions): Explicitly say
that the return value from snprintf() does not count the
terminating NUL as a character.
1998-02-10 16:57 Ulrich Drepper <drepper@happy.cygnus.com>
* manual/users.texi: Rewrite to describe correct POSIX behaviour,
add description for sete[ug]id and general cleanup.
Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>.
1998-01-04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile (parent-clean): Don't remove makefile fragments here.
(postclean): New variable.
(clean): Remove makefile fragments here.
(realclean distclean): Likewise. Pass sysdep-subdirs to sub-make.
(generated): Add isomac and isomanc.out.
* Makeconfig ($(common-objpfx)soversions.mk): Don't generate if
avoid-generated is set.
(postclean-generated): Add soversion.mk.
($(common-objpfx)version.mk): Don't include if avoid-generated is
set.
* Makerules: Still need to include $(+sysdir_pfx)sysd-Makefile if
avoid-generated is set.
(common-generated): Add libc.so and libc.so$(libc.so-version).
(generated): Add versioned libraries.
(common-mostlyclean): Also remove %.so and %_pic.a.
* csu/Makefile (generated): Add abi-tag.h.
* db2/Makefile (extra-objs): Add getlong.o.
* elf/Makefile (generated): Add ld.so, ldd and
$(rtld-installed-name).
(others): Add ldconfig here instead of ldconfig.o to extra-objs.
* malloc/Makefile (generated): Add mtrace.
* po/Makefile: Don't include version.mk, not needed any more.
* sunrpc/Makefile (generated): Add rpc-proto.d and rpcgen.
* sysdeps/unix/Makefile: Fix local_lim.h -> bits/local_lim.h,
syscall.h -> sys/syscall.h.
(common-generated): Add s-proto.d.
(postclean-generated): Add sysd-syscalls.
* localedata/Makefile (test-output): Add all output files.
(generated): Add test-input and test-output.
(generated-dirs): Add all the dirs.
1998-01-04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile (test-output, generated, generated-dirs): New
variables.
1998-02-10 16:57 Ulrich Drepper <drepper@happy.cygnus.com>
* resolv/nss_dns/dns-host.c: Various code cleanups.
1998-02-09 08:10 H.J. Lu <hjl@gnu.org>
* resolv/gethnamaddr.c (getanswer): Fix the PTR/CNAME bug.
From Philip Blundell <pb@nexus.co.uk>.
* resolv/nss_dns/dns-host.c (getanswer_r): Ditto.
1998-02-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* libc.map: Add .rem, .div, .mul, .udiv, .umul, .urem for Sparc.
Suggested by debian/sparc porters.
1998-02-07 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* misc/tst-efgcvt.c: Totally rewritten, added a lot of new tests
for ecvt and fcvt.
1998-02-10 16:32 Ulrich Drepper <drepper@happy.cygnus.com>
* sysdeps/unix/sysv/linux/ptsname.c (__ptsname_r): Use __xstat and
__fxstat instead of stat and fstat. Use namespace clean __stpcpy.
* signal/signal.h: Always define sigset_t if __need_sigset_t is
defined even if __USE_POSIX is not defined.
1998-02-02 20:51 Zack Weinberg <zack@rabi.phys.columbia.edu>
* sysdeps/unix/sysv/linux/ptsname.c (__ptsname_r): Correct last patch
to support obsolete tty major numbers correctly.
1998-02-02 08:47 H.J. Lu <hjl@gnu.org>
* login/Makefile ($(inst_libexecdir)/pt_chown): Make the target
directory first and ignore install error.
* sysdeps/unix/sysv/linux/ptsname.c (__ptsname_r): Substract
128 from ptyno and fix a typo for the BSD style pty.
1998-02-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/Makefile ($(common-objpfx)s-proto.d): Depend on all
syscalls.list's.
1998-02-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
getresuid and getresgid.
* sysdeps/unix/sysv/linux/getresuid.c: New file.
* sysdeps/unix/sysv/linux/getresgid.c: New file.
* sysdeps/unix/sysv/linux/syscalls.list: Remove getres[ug]id, add
s_getres[ug]id.
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Add getres[ug]id.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Likewise.
1998-02-02 08:11 H.J. Lu <hjl@gnu.org>
* nscd/grpcache.c: Include <stdlib.h>.
1998-02-01 16:01 H.J. Lu <hjl@gnu.org>
* stdlib/atoll.c: Fix comments.
* sysdeps/posix/ttyname.c: Ignore stdin/stdout/stderr.
* sysdeps/posix/ttyname_r.c: Ditto.
1998-02-03 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* io/sys/stat.h: Define S_IFLNK and S_IFSOCK if __USE_BSD or
__USE_MISC, independent of __USE_UNIX98.
1998-02-10 19:18 Ulrich Drepper <drepper@happy.cygnus.com>
* sysdeps/unix/sysv/linux/i386/sigaction.c (__libc_missing_rt_sigs):
Rename from __libc_have_rt_sigs and leave as COMMON data.
1998-02-04 11:58 Richard Henderson <rth@twiddle.rth.home>
* Makeconfig (CFLAGS-.os): Kill -fno-common.
* Makerules (libc.so): Prelink libc_pic.a, allocating commons.
* libc.map (GLIBC_2.1): Add Linux/Alpha tv64 symbols.
* elf/rtld.map: New file. Needed to define the GLIBC_2.*
version symbols.
* include/libc-symbols.h (symbol_version, default_symbol_version):
Provide asm versions and correct !DO_VERSIONING versions.
* sysdeps/unix/make-syscalls.sh: Recognize version symbols in
the weak symbol list.
* sysdeps/unix/sysv/linux/sigaction.c (__libc_missing_rt_sigs):
Rename from __libc_have_rt_sigs and leave as COMMON data.
* sysdeps/unix/sysv/linux/sigpending.c: Likewise.
* sysdeps/unix/sysv/linux/sigprocmask.c: Likewise.
* sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.
1998-02-04 16:41 Zack Weinberg <zack@rabi.phys.columbia.edu>
* sunrpc/Makefile: Correct dependencies of rpcgen.
1998-02-10 03:00 Ulrich Drepper <drepper@happy.cygnus.com>
* nscd/Makefile: Fix test for available linuxthreads add-on.
Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>.
1998-02-05 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/unix/sysv/linux/syscalls.list: Fix typo in lchown.
1998-02-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/gnu/Makefile: Respect with-cvs variable.
* manual/errno.texi (Error Messages): Correct description of
strerror_r. Pointed out by jonas@bagge.se.
1998-01-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* manual/socket.texi (Host Address Functions): Clarify description
of inet_network.
1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/grantpt.c (argv): Move const to toplevel.
(grantpt): Delete superfluous cast.
1998-02-06 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile ($(inst_slibdir)/libc-$(version).so): Depend on
elf/ldso_install instead of elf/subdir_install.
(elf/ldso_install): New target.
* elf/Makefile (ldso_install): New target.
1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/powerpc/socket.S: Really do the change
of 1998-01-06.
1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* string/bits/string2.h (strcmp): Use __string2_1bptr_p only for
constant expressions.
1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* nss/test-netdb.c: Include <unistd.h> for gethostname and "nss.h"
for __nss_configure_lookup.
(output_hostent): Remove unused variable.
1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* string/tst-inlcall.c: Fix format string.
1998-02-09 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* inet/netinet/in.h: Rename second parameter of bindresvport to
avoid buggy gcc warning. [PR libc/412]
1998-02-10 20:06:30 +00:00
|
|
|
generated += $(rtld-installed-name)
|
1996-06-11 21:07:00 +00:00
|
|
|
endif
|
|
|
|
|
1997-01-21 06:10:42 +00:00
|
|
|
# Build a file mentioning all trustworthy directories to look for shared
|
|
|
|
# libraries when using LD_LIBRARY_PATH in a setuid program. The user can
|
|
|
|
# add directories to the list by defining $(user-defined-trusted-dirs)
|
|
|
|
# before starting make.
|
1998-05-25 11:34:09 +00:00
|
|
|
$(objpfx)trusted-dirs.h: $(objpfx)trusted-dirs.st; @:
|
|
|
|
$(objpfx)trusted-dirs.st: Makefile $(..)Makeconfig
|
update from main archive 970121
1997-01-21 Paul Eggert <eggert@twinsun.com>
* posix/getopt.c (_getopt_internal): Return -1, not EOF, when args
are exhausted; this is required by POSIX.2.
* catgets/gencat.c, db/makedb.c, locale/programs/locale.c,
locale/programs/localedef.c, manual/examples/subopt.c,
posix/getopt.c, posix/getopt1.c, stdio-common/bug4.c,
sunrpc/rpcinfo.c (main): Check getopt return value against -1, not EOF.
Tue Jan 21 23:10:40 1997 Ulrich Drepper <drepper@cygnus.com>
* version.h (VERSION): Bump to 1.102.
* sysdeps/unix/sysv/linux/alpha/Dist: Add kernel_sigaction.h.
* elf/Makefile: Don't use CFLAGS-dl-load.c, but instead
CPPFLAGS-dl-load.c so that dependencies can be determined correctly.
* elf/dl-load.c: Fix comment.
* time/Banner: New file.
* time/Makefile (distribute): Add Banner.
Update from ADO tzcode1997a and tzdata1997a.
* time/antarctica: Update.
* time/australia: Update.
* time/zdump.c: Update.
* time/zic.c: Update.
* time/zone.tab: Update.
Mon Jan 20 08:38:32 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* config.make.in (has-ldconfig): New variable.
* configure, configure.in (has_ldconfig): New substitute.
* sysdeps/unix/sysv/linux/configure.in (has_ldconfig): New,
check if $srcdir/elf/ldconfig.c exists.
* Makeconfig (rootsbindir): New, default as
$(exec_prefix)/sbin.
(rtld-version-installed-name): New, default as
ld-$(version).so.
* Makefile (install): Call `$(common-objpfx)elf/ldconfig -d'
only if $(cross-compiling) is no and $(build-shared) is yes.
* Makerules (make-shlib-link): New macro.
($(slibdir)/libfoo.so.$(libfoo.so-version)): Use
$(make-shlib-link) for symlink.
(install-rootsbin, install-rootsbin-nosubdir): New.
(install-no-libc.a-nosubdir): Add
install-rootsbin-nosubdir.
* Rules (others): Add $(install-rootsbin).
* config.make.in (rootsbindir): New.
* configure, configure.in (libc_cv_rootsbindir): New
substitute.
* elf/Makefile (others, install-rootsbin): New, set to
ldconfig.
(+link): New for static linking.
($(slibdir)/$(rtld-version-installed-name)): New.
($(slibdir)/$(rtld-installed-name)): Depend on
$(slibdir)/$(rtld-version-installed-name) and use
$(make-shlib-link) for symlink.
* sunrpc/xdr.c (xdr_string): Return FALSE if sp == NULL
while XDR_ENCODE.
* sysdeps/unix/sysv/linux/a.out.h: Use #include_next for
glibc internals.
* sysdeps/unix/sysv/linux/configure.in (libc_cv_rootsbindir):
New, set to "/sbin" if "$prefix" == "/usr".
Tue Jan 21 13:38:39 1997 Ulrich Drepper <drepper@cygnus.com>
* Makefile (distribute): Add glibcbug.in.
Reported by Philip Blundell <pjb27@cam.ac.uk>.
* elf/Makefile ($(objpfx)trusted-dirs.h): Create elf/ subdir in
build directory if necessary.
Reported by marcus@shannon.sysc.pdx.edu (Marcus G. Daniels).
1997-01-22 05:26:05 +00:00
|
|
|
$(make-target-directory)
|
1999-05-03 21:59:35 +00:00
|
|
|
echo "$(subst :, ,$(default-rpath) $(user-defined-trusted-dirs))" \
|
|
|
|
| $(AWK) -f gen-trusted-dirs.awk > ${@:st=T};
|
* sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/i386/dl-machine.h (elf_machine_type_class, elf_machine_rel):
Disable TLS relocs if [RTLD_BOOTSTRAP && !USE___THREAD].
* sysdeps/x86_64/dl-machine.h
(elf_machine_type_class, elf_machine_rela): Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_type_class, elf_machine_rela):
Likewise.
* include/link.h (struct link_map): Remove member l_tls_tp_initialized.
* elf/rtld.c (_dl_start_final, dl_main): Don't use it.
(_dl_start): Conditionalize PT_TLS check on [USE___THREAD].
* sysdeps/i386/dl-tls.h (__TLS_GET_ADDR): Use ___tls_get_addr_internal
instead of ___tls_get_addr.
(___tls_get_addr_internal): Add attribute_hidden to decl.
* sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
_dl_error_catch_tsd.
* elf/rtld.c (startup_error_tsd): New function.
(dl_main): Point _dl_error_catch_tsd at that.
* elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
use new function pointer instead.
* elf/dl-tsd.c: New file.
* elf/Makefile (routines): Add it.
2002-10-07 Roland McGrath <roland@redhat.com>
* elf/dl-misc.c (_dl_debug_vdprintf): Use INTERNAL_SYSCALL macro for
writev if it's available. Otherwise if [RTLD_PRIVATE_ERRNO] then
take _dl_load_lock around calling __writev.
* sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL): New macro.
(INLINE_SYSCALL): Use that.
* sysdeps/generic/dl-sysdep.h: New file.
* sysdeps/mach/hurd/dl-sysdep.h: New file.
* sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
* include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
[RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
access it directly.
* elf/dl-minimal.c (__errno_location): Removed.
* sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use GOTOFF access for errno.
* sysdeps/unix/sysv/linux/i386/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* sysdeps/unix/x86_64/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
Use PC-relative access for errno.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h
[RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
* include/tls.h: New file.
(USE___THREAD): New macro.
Define to 1 under [USE_TLS && HAVE___THREAD] and only when compiling
libc or libpthread.
* sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]: Conditional
changed from [USE_TLS && HAVE___THREAD].
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
* sysdeps/unix/i386/sysdep.S: Likewise.
* sysdeps/unix/x86_64/sysdep.S: Likewise.
* include/errno.h: Likewise.
* include/netdb.h: Likewise.
* include/resolv.h: Likewise.
* sysdeps/generic/errno.c: New file.
* csu/Makefile (aux): New variable, list errno.
* sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
* sysdeps/unix/alpha/sysdep.S: Likewise.
* sysdeps/generic/start.c: Likewise.
* sysdeps/unix/start.c: Likewise.
* sysdeps/unix/arm/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
* manual/search.texi (Tree Search Function, Hash Search Function):
Mention search.h clearly.
2002-10-05 Roland McGrath <roland@redhat.com>
* elf/dl-fxstat64.c: File removed.
* elf/dl-xstat64.c: File removed.
* elf/Makefile (rtld-routines): Remove them.
* sysdeps/unix/sysv/linux/xstat64.c: Remove RTLD_STAT64 conditionals.
Instead, use strong_alias instead of versioned_symbol in the
!SHLIB_COMPAT case.
* sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
* include/shlib-compat.h
(SHLIB_COMPAT): Require that IS_IN_##lib be defined nonzero.
[! NOT_IN_libc] (IS_IN_libc): Define it.
* cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Use -Dx=1 not just -Dx.
* elf/Makefile (CPPFLAGS-.os): Likewise.
* sunrpc/rpc_main.c (main): Don't declare with noreturn attribute.
Return the status instead of calling exit.
* Makeconfig (CFLAGS): Prepend -std=gnu99.
* Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
Remove superfluous rm command, whose @ plus make bugs hid
all these commands from the make output.
* include/stubs-prologue.h: New file. Give #error under #ifdef _LIBC.
* Makefile ($(inst_includedir)/gnu/stubs.h): Depend on it.
Use that file's contents instead of literal echo's for the prologue.
* include/features.h: Include <gnu/stubs.h> unconditionally.
* include/gnu/stubs.h: New file.
2002-09-30 Roland McGrath <roland@redhat.com>
* elf/rtld-Rules: New file.
* elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
$(objpfx)rtld-libc.a): New targets.
(generated): Add them.
(reloc-link): Remove -o $@ from the variable.
($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
(distribute): Add rtld-Rules.
(CPPFLAGS-.os): Define this instead of CFLAGS-.os.
* Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
(common-mostlyclean, common-clean): Clean up rtld-* files.
* sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
2002-10-11 10:52:20 +00:00
|
|
|
echo '#define DL_DST_LIB "$(notdir $(slibdir))"' >> ${@:st=T}
|
1998-05-25 11:34:09 +00:00
|
|
|
$(move-if-change) ${@:st=T} ${@:st=h}
|
|
|
|
touch $@
|
2017-12-11 21:11:16 +00:00
|
|
|
CPPFLAGS-dl-load.c += -I$(objpfx). -I$(csu-objpfx).
|
1995-11-07 21:46:52 +00:00
|
|
|
|
1999-03-22 17:40:43 +00:00
|
|
|
ifeq (yes,$(build-shared))
|
2021-06-28 06:33:57 +00:00
|
|
|
$(inst_rtlddir)/$(rtld-installed-name): $(objpfx)ld.so $(+force)
|
2000-03-20 00:46:01 +00:00
|
|
|
$(make-target-directory)
|
2000-08-01 22:53:40 +00:00
|
|
|
$(do-install-program)
|
update from main archive 970121
1997-01-21 Paul Eggert <eggert@twinsun.com>
* posix/getopt.c (_getopt_internal): Return -1, not EOF, when args
are exhausted; this is required by POSIX.2.
* catgets/gencat.c, db/makedb.c, locale/programs/locale.c,
locale/programs/localedef.c, manual/examples/subopt.c,
posix/getopt.c, posix/getopt1.c, stdio-common/bug4.c,
sunrpc/rpcinfo.c (main): Check getopt return value against -1, not EOF.
Tue Jan 21 23:10:40 1997 Ulrich Drepper <drepper@cygnus.com>
* version.h (VERSION): Bump to 1.102.
* sysdeps/unix/sysv/linux/alpha/Dist: Add kernel_sigaction.h.
* elf/Makefile: Don't use CFLAGS-dl-load.c, but instead
CPPFLAGS-dl-load.c so that dependencies can be determined correctly.
* elf/dl-load.c: Fix comment.
* time/Banner: New file.
* time/Makefile (distribute): Add Banner.
Update from ADO tzcode1997a and tzdata1997a.
* time/antarctica: Update.
* time/australia: Update.
* time/zdump.c: Update.
* time/zic.c: Update.
* time/zone.tab: Update.
Mon Jan 20 08:38:32 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* config.make.in (has-ldconfig): New variable.
* configure, configure.in (has_ldconfig): New substitute.
* sysdeps/unix/sysv/linux/configure.in (has_ldconfig): New,
check if $srcdir/elf/ldconfig.c exists.
* Makeconfig (rootsbindir): New, default as
$(exec_prefix)/sbin.
(rtld-version-installed-name): New, default as
ld-$(version).so.
* Makefile (install): Call `$(common-objpfx)elf/ldconfig -d'
only if $(cross-compiling) is no and $(build-shared) is yes.
* Makerules (make-shlib-link): New macro.
($(slibdir)/libfoo.so.$(libfoo.so-version)): Use
$(make-shlib-link) for symlink.
(install-rootsbin, install-rootsbin-nosubdir): New.
(install-no-libc.a-nosubdir): Add
install-rootsbin-nosubdir.
* Rules (others): Add $(install-rootsbin).
* config.make.in (rootsbindir): New.
* configure, configure.in (libc_cv_rootsbindir): New
substitute.
* elf/Makefile (others, install-rootsbin): New, set to
ldconfig.
(+link): New for static linking.
($(slibdir)/$(rtld-version-installed-name)): New.
($(slibdir)/$(rtld-installed-name)): Depend on
$(slibdir)/$(rtld-version-installed-name) and use
$(make-shlib-link) for symlink.
* sunrpc/xdr.c (xdr_string): Return FALSE if sp == NULL
while XDR_ENCODE.
* sysdeps/unix/sysv/linux/a.out.h: Use #include_next for
glibc internals.
* sysdeps/unix/sysv/linux/configure.in (libc_cv_rootsbindir):
New, set to "/sbin" if "$prefix" == "/usr".
Tue Jan 21 13:38:39 1997 Ulrich Drepper <drepper@cygnus.com>
* Makefile (distribute): Add glibcbug.in.
Reported by Philip Blundell <pjb27@cam.ac.uk>.
* elf/Makefile ($(objpfx)trusted-dirs.h): Create elf/ subdir in
build directory if necessary.
Reported by marcus@shannon.sysc.pdx.edu (Marcus G. Daniels).
1997-01-22 05:26:05 +00:00
|
|
|
|
2021-12-10 15:06:36 +00:00
|
|
|
# Creates the relative /usr/bin/ld.so symbolic link.
|
|
|
|
$(inst_bindir)/ld.so: $(inst_rtlddir)/$(rtld-installed-name)
|
|
|
|
$(make-target-directory)
|
|
|
|
$(make-link)
|
|
|
|
|
1998-08-21 17:22:56 +00:00
|
|
|
# Special target called by parent to install just the dynamic linker.
|
|
|
|
.PHONY: ldso_install
|
2013-03-18 11:44:47 +00:00
|
|
|
ldso_install: $(inst_rtlddir)/$(rtld-installed-name)
|
2021-06-28 06:33:57 +00:00
|
|
|
endif # $(build-shared)
|
1998-08-21 17:22:56 +00:00
|
|
|
|
1998-03-29 17:03:23 +00:00
|
|
|
|
2020-10-08 08:57:10 +00:00
|
|
|
# Workarounds for ${exec_prefix} expansion in configure variables.
|
|
|
|
# config.status cannot be used directly for processing ldd.bash.in or
|
|
|
|
# expanding variables such as sysconfdir because the expansion
|
|
|
|
# contains the literal string ${exec_prefix}, which is not valid in C
|
|
|
|
# headers or installed shell scripts.
|
|
|
|
|
2014-01-25 05:44:37 +00:00
|
|
|
ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \
|
|
|
|
-e 's%@VERSION@%$(version)%g' \
|
|
|
|
-e 's|@PKGVERSION@|$(PKGVERSION)|g' \
|
|
|
|
-e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \
|
2016-02-25 01:06:04 +00:00
|
|
|
-e 's%@TEXTDOMAINDIR@%$(localedir)%g'
|
1998-03-29 17:03:23 +00:00
|
|
|
|
|
|
|
ifeq ($(ldd-rewrite-script),no)
|
|
|
|
define gen-ldd
|
2014-01-25 05:44:37 +00:00
|
|
|
LC_ALL=C sed $(ldd-rewrite) < $< > $@.new
|
1998-03-29 17:03:23 +00:00
|
|
|
endef
|
update from main archive 961119
Wed Nov 20 02:04:11 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/sigsuspend.c: Make sigsuspend a weak
alias of __sigsuspend.
* grp/grp.h: Correct comment about POSIX compliance.
* pwd/pwd.h: Likewise.
* login/utmp.h: Update copyright and pretty-print prototypes.
* sysdeps/generic/paths.h: Add _PATH_LASTLOG, _PATH_UTMP and
_PATH_WTMP from utmpbits.h.
* sysdeps/unix/sysv/linux/paths.h: Likewise.
* sysdeps/generic/utmpbits.h: Remove here.
* sysdeps/gnu/utmpbits.h: Likewise.
* misc/sys/uio.h: Place __BEGIN_DECLS correctly.
Pretty-print prototypes.
* sysdeps/unix/sysv/linux/sparc/clone.S: New file. Taken from
LinuxThreads-0.5.
Tue Nov 19 13:43:07 1996 Richard Henderson <rth@tamu.edu>
* inet/ether_hton.c: Include <string.h>.
* inet/ether_ntoh.c: Likewise.
* inet/rexec.c: Get errno, index, getpass, getlogin from headers.
* misc/search.h: Fix hcreate_r argument type (unsigned -> size_t).
* misc/sys/cdefs.h: Change __long_double_t definition from typedef
to define. Jim Nance reports problems building XEmacs otherwise.
* resolv/gethnamaddr.c: Protect h_errno redefinition.
* resolv/getnetnamadr.c: Likewise.
* resolv/herror.c: Likewise.
* sysdeps/generic/sigset.h (__SIGSETFN): Operator ## doesn't work
with -traditional. Reported by Eric Youngdale. While we're at this,
don't do error checking in the __ functions. This is consistent
with the sysv4 definitions and seems Right.
* signal/signal.h: Don't __OPTIMIZE__ sigops to __ versions. Add
prototype for __sigsuspend.
* sysdeps/posix/sigblock.c: Optimize sigmask <-> sigset_t conversions
for sigset_t == unsigned long. De-ansidecl-ify. Reformat copyright.
* sysdeps/posix/sigpause.c: Likewise.
* sysdeps/posix/sigsetmask.c: Likewise.
* sysdeps/posix/sigvec.c: Likewise.
* sysdeps/posix/sigintr.c: Reformat copyright.
* sysdeps/posix/signal.c: Check signal number out of range since
__sigismember doesn't anymore. Reformat copyright.
* sysdeps/posix/sigwait.c: Use __ versions of sigfillset, sigismember,
sigdelset, sigaction, and sigsuspend.
* stdlib/drand48-iter.c (__drand48_iterate): Cast state fragments
to the wider type before shifting.
* sysdeps/alpha/bsd-_setjmp.S: Silence assembler warning "$at used
without .set noat" in profiling hook.
* sysdeps/alpha/bsd-setjmp.S: Likewise.
* sysdeps/alpha/htonl.S: Likewise.
* sysdeps/alpha/htons.S: Likewise.
* sysdeps/alpha/s_copysign.S: Likewise.
* sysdeps/alpha/setjmp.S: Likewise.
* sysdeps/alpha/stpcpy.S: Likewise.
* sysdeps/alpha/strcat.S: Likewise.
* sysdeps/alpha/strcpy.S: Likewise.
* sysdeps/alpha/strncat.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/brk.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/llseek.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise. Rename
function to __sigsuspend and add weak alias.
* sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise. Add missing END.
* sysdeps/alpha/w_sqrt.S: Define _ERRNO_H so <errnos.h> defines EDOM.
* sysdeps/unix/execve.S: Match PSEUDO_END symbol with the symbol
SYSCALL__ actually generated.
* sysdeps/unix/sysv/linux/errnos.h [_LIBC_REENTRANT]: Reflexively
#define __set_errno, as several imported subsystems (eg. BIND) check
that the symbol is defined.
* sysdeps/unix/sysv/linux/getsysstats.c: Include <alloca.h>.
* sysdeps/alpha/memcpy.S: Temporarily remove until I can find a bug
that manifests in GCC.
Tue Nov 19 11:10:05 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* sysdeps/posix/writev.c (writev): COUNT parm is now int.
* sysdeps/posix/readv.c (readv): Likewise.
Tue Nov 19 15:28:29 1996 Ulrich Drepper <drepper@cygnus.com>
* nss/nss_dns/dns-network.c: Change return type of all functions
to enum nss_status.
Reported by NIIBE Yutaka.
* nss/nss_dns/dns-host.c: Update copyright.
Fri Nov 15 20:16:38 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* config.make.in: Remove definition of top_absdir.
* configure.in: Likewise. Use $(..) instead.
* Makerules (make-link): Use $(..) to find rellns-sh script.
Sat Nov 16 15:52:29 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/nss.texi (Name Service Switch): Fix reference to
`frobnicate'.
Fri Nov 15 22:08:33 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
sys/mtio.h.
Mon Nov 18 05:51:13 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/waitstatus.h (__WIFSIGNALED): Rename local
variable from __stat to __status to prevent shadowing.
* sunrpc/rpc/clnt.h (clntudp_create, clntudp_bufcreate): Likewise
for parameter __wait.
Reported by NIIBE Yutaka.
Mon Nov 18 02:05:38 1996 Ulrich Drepper <drepper@cygnus.com>
* misc/regexp.c: New file. Implementation of obsolete interface
to regular expression matcher (required in XPG4.2).
* misc/regexp.h: New file. Header for above.
* misc/Makefile (headers): Add regexp.h.
(routines): Add regexp.c.
Update copyright.
Sun Nov 17 21:50:24 1996 Andreas Jaeger <aj@arthur.pfalz.de>
* stdlib/tst-strtod.c (main): Add arguments for main.
* stdlib/tst-strtol.c (main): Likewise.
Sun Nov 17 21:15:05 1996 Ulrich Drepper <drepper@cygnus.com>
* configure.in: Substitute libc_cv_slibdir and libc_cv_sysconfdir
in output files.
* sysdepes/unix/sysv/linux/configure: Define libc_cv_slibdir to /lib
and sysconfdir to /etc if $prefix is /usr.
* config.make.in: Add slibdir, sysconfdir and BASH to be replaced.
* elf/Makefile ($(objpfx)ldd): Install ldd.bash.in if
$(have-bash2) is yes.
* elf/ldd.bash.in: Add copyright and various cleanups.
* elf/ldd.sh.in: Likewise.
Implement RTLD_NEXT.
* elf/dlfcn.h: Define RTLD_NEXT.
* elf/dl-deps.c: Build second searchlist which contains duplicates.
* elf/dl-lookup.c (_dl_lookup_symbol_skip): New function. Used
for RTLD_NEXT lookup.
Rewrite _dl_lookup_symbol to put common parts for both lookup
functions in a separate function.
* elf/dlsym.c: Handle RTLD_NEXT by calling _dl_lookup_symbol_skip.
* elf/link.h (struct link_map): Add l_dupsearchlist and
l_ndupsearchlist.
Add prototype for _dl_lookup_symbol_skip.
* sunrpc/Makefile (rpcsvc): Add rusers.
* sunrpc/rpcsvc/rnusers.x: Remove. Obsolteted by rusers.x.
* sunrpc/rpcsvc/rusers.x: New file.
Sun Nov 17 04:24:35 1996 Ulrich Drepper <drepper@cygnus.com>
* stdio-common/vfprintf.c [USE_IN_LIBIO] (buffered_vfprintf): Call
__libc_lock_init for local lock.
Reported by a sun <asun@zoology.washington.edu>.
[!USE_IN_LIBIO] (PAD): Optimize a bit.
1996-11-20 03:45:51 +00:00
|
|
|
else
|
1998-03-29 17:03:23 +00:00
|
|
|
define gen-ldd
|
2014-01-25 05:44:37 +00:00
|
|
|
LC_ALL=C sed $(ldd-rewrite) < $< \
|
2011-09-13 08:29:43 +00:00
|
|
|
| LC_ALL=C sed -f $(patsubst $(..)/%,/%,$(..)$(ldd-rewrite-script)) > $@.new
|
1998-03-29 17:03:23 +00:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
1998-08-20 22:02:17 +00:00
|
|
|
$(objpfx)ldd: ldd.bash.in $(common-objpfx)soversions.mk \
|
1998-05-12 12:22:17 +00:00
|
|
|
$(common-objpfx)config.make
|
1998-03-29 17:03:23 +00:00
|
|
|
$(gen-ldd)
|
update from main archive 961119
Wed Nov 20 02:04:11 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/sigsuspend.c: Make sigsuspend a weak
alias of __sigsuspend.
* grp/grp.h: Correct comment about POSIX compliance.
* pwd/pwd.h: Likewise.
* login/utmp.h: Update copyright and pretty-print prototypes.
* sysdeps/generic/paths.h: Add _PATH_LASTLOG, _PATH_UTMP and
_PATH_WTMP from utmpbits.h.
* sysdeps/unix/sysv/linux/paths.h: Likewise.
* sysdeps/generic/utmpbits.h: Remove here.
* sysdeps/gnu/utmpbits.h: Likewise.
* misc/sys/uio.h: Place __BEGIN_DECLS correctly.
Pretty-print prototypes.
* sysdeps/unix/sysv/linux/sparc/clone.S: New file. Taken from
LinuxThreads-0.5.
Tue Nov 19 13:43:07 1996 Richard Henderson <rth@tamu.edu>
* inet/ether_hton.c: Include <string.h>.
* inet/ether_ntoh.c: Likewise.
* inet/rexec.c: Get errno, index, getpass, getlogin from headers.
* misc/search.h: Fix hcreate_r argument type (unsigned -> size_t).
* misc/sys/cdefs.h: Change __long_double_t definition from typedef
to define. Jim Nance reports problems building XEmacs otherwise.
* resolv/gethnamaddr.c: Protect h_errno redefinition.
* resolv/getnetnamadr.c: Likewise.
* resolv/herror.c: Likewise.
* sysdeps/generic/sigset.h (__SIGSETFN): Operator ## doesn't work
with -traditional. Reported by Eric Youngdale. While we're at this,
don't do error checking in the __ functions. This is consistent
with the sysv4 definitions and seems Right.
* signal/signal.h: Don't __OPTIMIZE__ sigops to __ versions. Add
prototype for __sigsuspend.
* sysdeps/posix/sigblock.c: Optimize sigmask <-> sigset_t conversions
for sigset_t == unsigned long. De-ansidecl-ify. Reformat copyright.
* sysdeps/posix/sigpause.c: Likewise.
* sysdeps/posix/sigsetmask.c: Likewise.
* sysdeps/posix/sigvec.c: Likewise.
* sysdeps/posix/sigintr.c: Reformat copyright.
* sysdeps/posix/signal.c: Check signal number out of range since
__sigismember doesn't anymore. Reformat copyright.
* sysdeps/posix/sigwait.c: Use __ versions of sigfillset, sigismember,
sigdelset, sigaction, and sigsuspend.
* stdlib/drand48-iter.c (__drand48_iterate): Cast state fragments
to the wider type before shifting.
* sysdeps/alpha/bsd-_setjmp.S: Silence assembler warning "$at used
without .set noat" in profiling hook.
* sysdeps/alpha/bsd-setjmp.S: Likewise.
* sysdeps/alpha/htonl.S: Likewise.
* sysdeps/alpha/htons.S: Likewise.
* sysdeps/alpha/s_copysign.S: Likewise.
* sysdeps/alpha/setjmp.S: Likewise.
* sysdeps/alpha/stpcpy.S: Likewise.
* sysdeps/alpha/strcat.S: Likewise.
* sysdeps/alpha/strcpy.S: Likewise.
* sysdeps/alpha/strncat.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/brk.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/llseek.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise. Rename
function to __sigsuspend and add weak alias.
* sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise. Add missing END.
* sysdeps/alpha/w_sqrt.S: Define _ERRNO_H so <errnos.h> defines EDOM.
* sysdeps/unix/execve.S: Match PSEUDO_END symbol with the symbol
SYSCALL__ actually generated.
* sysdeps/unix/sysv/linux/errnos.h [_LIBC_REENTRANT]: Reflexively
#define __set_errno, as several imported subsystems (eg. BIND) check
that the symbol is defined.
* sysdeps/unix/sysv/linux/getsysstats.c: Include <alloca.h>.
* sysdeps/alpha/memcpy.S: Temporarily remove until I can find a bug
that manifests in GCC.
Tue Nov 19 11:10:05 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* sysdeps/posix/writev.c (writev): COUNT parm is now int.
* sysdeps/posix/readv.c (readv): Likewise.
Tue Nov 19 15:28:29 1996 Ulrich Drepper <drepper@cygnus.com>
* nss/nss_dns/dns-network.c: Change return type of all functions
to enum nss_status.
Reported by NIIBE Yutaka.
* nss/nss_dns/dns-host.c: Update copyright.
Fri Nov 15 20:16:38 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* config.make.in: Remove definition of top_absdir.
* configure.in: Likewise. Use $(..) instead.
* Makerules (make-link): Use $(..) to find rellns-sh script.
Sat Nov 16 15:52:29 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/nss.texi (Name Service Switch): Fix reference to
`frobnicate'.
Fri Nov 15 22:08:33 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
sys/mtio.h.
Mon Nov 18 05:51:13 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/waitstatus.h (__WIFSIGNALED): Rename local
variable from __stat to __status to prevent shadowing.
* sunrpc/rpc/clnt.h (clntudp_create, clntudp_bufcreate): Likewise
for parameter __wait.
Reported by NIIBE Yutaka.
Mon Nov 18 02:05:38 1996 Ulrich Drepper <drepper@cygnus.com>
* misc/regexp.c: New file. Implementation of obsolete interface
to regular expression matcher (required in XPG4.2).
* misc/regexp.h: New file. Header for above.
* misc/Makefile (headers): Add regexp.h.
(routines): Add regexp.c.
Update copyright.
Sun Nov 17 21:50:24 1996 Andreas Jaeger <aj@arthur.pfalz.de>
* stdlib/tst-strtod.c (main): Add arguments for main.
* stdlib/tst-strtol.c (main): Likewise.
Sun Nov 17 21:15:05 1996 Ulrich Drepper <drepper@cygnus.com>
* configure.in: Substitute libc_cv_slibdir and libc_cv_sysconfdir
in output files.
* sysdepes/unix/sysv/linux/configure: Define libc_cv_slibdir to /lib
and sysconfdir to /etc if $prefix is /usr.
* config.make.in: Add slibdir, sysconfdir and BASH to be replaced.
* elf/Makefile ($(objpfx)ldd): Install ldd.bash.in if
$(have-bash2) is yes.
* elf/ldd.bash.in: Add copyright and various cleanups.
* elf/ldd.sh.in: Likewise.
Implement RTLD_NEXT.
* elf/dlfcn.h: Define RTLD_NEXT.
* elf/dl-deps.c: Build second searchlist which contains duplicates.
* elf/dl-lookup.c (_dl_lookup_symbol_skip): New function. Used
for RTLD_NEXT lookup.
Rewrite _dl_lookup_symbol to put common parts for both lookup
functions in a separate function.
* elf/dlsym.c: Handle RTLD_NEXT by calling _dl_lookup_symbol_skip.
* elf/link.h (struct link_map): Add l_dupsearchlist and
l_ndupsearchlist.
Add prototype for _dl_lookup_symbol_skip.
* sunrpc/Makefile (rpcsvc): Add rusers.
* sunrpc/rpcsvc/rnusers.x: Remove. Obsolteted by rusers.x.
* sunrpc/rpcsvc/rusers.x: New file.
Sun Nov 17 04:24:35 1996 Ulrich Drepper <drepper@cygnus.com>
* stdio-common/vfprintf.c [USE_IN_LIBIO] (buffered_vfprintf): Call
__libc_lock_init for local lock.
Reported by a sun <asun@zoology.washington.edu>.
[!USE_IN_LIBIO] (PAD): Optimize a bit.
1996-11-20 03:45:51 +00:00
|
|
|
chmod 555 $@.new
|
|
|
|
mv -f $@.new $@
|
1998-03-29 17:03:23 +00:00
|
|
|
|
2012-07-03 19:14:59 +00:00
|
|
|
$(objpfx)sln: $(sln-modules:%=$(objpfx)%.o)
|
|
|
|
|
1999-12-04 08:00:00 +00:00
|
|
|
$(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
|
2011-06-09 11:06:21 +00:00
|
|
|
|
2000-07-12 21:10:41 +00:00
|
|
|
SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-ldconfig.c += $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
|
2014-11-24 09:33:45 +00:00
|
|
|
-D'SLIBDIR="$(slibdir)"'
|
2014-11-19 06:43:54 +00:00
|
|
|
libof-ldconfig = ldconfig
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-dl-cache.c += $(SYSCONF-FLAGS)
|
|
|
|
CFLAGS-cache.c += $(SYSCONF-FLAGS)
|
|
|
|
CFLAGS-rtld.c += $(SYSCONF-FLAGS)
|
2020-10-08 13:33:00 +00:00
|
|
|
CFLAGS-dl-usage.c += $(SYSCONF-FLAGS) \
|
|
|
|
-D'RTLD="$(rtlddir)/$(rtld-installed-name)"'
|
2021-03-02 13:38:42 +00:00
|
|
|
CFLAGS-dl-diagnostics.c += $(SYSCONF-FLAGS) \
|
|
|
|
-D'PREFIX="$(prefix)"' \
|
|
|
|
-D'RTLD="$(rtlddir)/$(rtld-installed-name)"'
|
1999-12-04 08:00:00 +00:00
|
|
|
|
2014-11-19 06:43:54 +00:00
|
|
|
cpp-srcs-left := $(all-rtld-routines:=.os)
|
|
|
|
lib := rtld
|
Rename cppflags-iterator.mk to libof-iterator.mk, remove extra-modules.mk.
cppflags-iterator.mk no longer has anything to do with CPPFLAGS; all
it does is set libof-$(foo) for a list of files. extra-modules.mk
does the same thing, but with a different input variable, and doesn't
let the caller control the module. Therefore, this patch gives
cppflags-iterator.mk a better name, removes extra-modules.mk, and
updates all uses of both.
* extra-modules.mk: Delete file.
* cppflags-iterator.mk: Rename to ...
* libof-iterator.mk: ...this. Adjust comments.
* Makerules, extra-lib.mk, benchtests/Makefile, elf/Makefile
* elf/rtld-Rules, iconv/Makefile, locale/Makefile, malloc/Makefile
* nscd/Makefile, sunrpc/Makefile, sysdeps/s390/Makefile:
Use libof-iterator.mk instead of cppflags-iterator.mk or
extra-modules.mk.
* benchtests/strcoll-inputs/filelist#en_US.UTF-8: Remove
extra-modules.mk and cppflags-iterator.mk, add libof-iterator.mk.
2017-05-08 19:52:26 +00:00
|
|
|
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
|
2014-11-19 06:43:54 +00:00
|
|
|
|
2000-05-30 20:37:26 +00:00
|
|
|
test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
|
|
|
|
generated += $(addsuffix .so,$(strip $(modules-names)))
|
1999-01-16 17:09:04 +00:00
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)testobj1_1.so: $(objpfx)testobj1.so
|
|
|
|
$(objpfx)testobj2.so: $(objpfx)testobj1.so
|
|
|
|
$(objpfx)testobj6.so: $(objpfx)testobj1.so $(objpfx)testobj2.so
|
1999-01-22 09:29:52 +00:00
|
|
|
$(objpfx)failobj.so: $(objpfx)testobj6.so
|
2000-03-31 17:07:47 +00:00
|
|
|
$(objpfx)dep1.so: $(objpfx)dep2.so $(objpfx)dep4.so
|
|
|
|
$(objpfx)dep2.so: $(objpfx)dep3.so $(objpfx)dep4.so
|
|
|
|
$(objpfx)dep4.so: $(objpfx)dep3.so
|
2000-07-21 04:42:21 +00:00
|
|
|
$(objpfx)nodelmod3.so: $(objpfx)nodelmod4.so
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)neededobj2.so: $(objpfx)neededobj1.so
|
|
|
|
$(objpfx)neededobj3.so: $(objpfx)neededobj1.so $(objpfx)neededobj2.so
|
2000-10-24 17:04:14 +00:00
|
|
|
$(objpfx)neededobj4.so: $(objpfx)neededobj1.so $(objpfx)neededobj2.so \
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)neededobj3.so
|
2000-12-31 06:09:08 +00:00
|
|
|
$(objpfx)neededobj6.so: $(objpfx)neededobj5.so
|
2000-10-21 02:07:22 +00:00
|
|
|
$(objpfx)unload2mod.so: $(objpfx)unload2dep.so
|
2001-02-02 06:54:15 +00:00
|
|
|
$(objpfx)firstobj.so: $(shared-thread-library)
|
2001-05-22 23:55:23 +00:00
|
|
|
$(objpfx)reldep4mod1.so: $(objpfx)reldep4mod3.so
|
|
|
|
$(objpfx)reldep4mod2.so: $(objpfx)reldep4mod4.so
|
2001-09-06 01:03:05 +00:00
|
|
|
$(objpfx)dblloadmod1.so: $(objpfx)dblloadmod3.so
|
|
|
|
$(objpfx)dblloadmod2.so: $(objpfx)dblloadmod3.so
|
2001-09-08 16:27:08 +00:00
|
|
|
$(objpfx)reldepmod5.so: $(objpfx)reldepmod2.so
|
|
|
|
$(objpfx)reldepmod6.so: $(objpfx)reldepmod2.so
|
2001-10-01 00:14:14 +00:00
|
|
|
$(objpfx)reldep6mod1.so: $(objpfx)reldep6mod0.so
|
|
|
|
$(objpfx)reldep6mod2.so: $(objpfx)reldep6mod1.so
|
|
|
|
$(objpfx)reldep6mod3.so: $(objpfx)reldep6mod2.so
|
|
|
|
$(objpfx)reldep6mod4.so: $(objpfx)reldep6mod1.so
|
2002-02-14 07:57:19 +00:00
|
|
|
$(objpfx)tst-tlsmod3.so: $(objpfx)tst-tlsmod2.so
|
2003-04-17 19:19:29 +00:00
|
|
|
$(objpfx)tst-tlsmod8.so: $(objpfx)tst-tlsmod7.so
|
|
|
|
$(objpfx)tst-tlsmod10.so: $(objpfx)tst-tlsmod9.so
|
|
|
|
$(objpfx)tst-tlsmod12.so: $(objpfx)tst-tlsmod11.so
|
2003-04-27 06:20:14 +00:00
|
|
|
$(objpfx)tst-tlsmod13a.so: $(objpfx)tst-tlsmod13.so
|
Update.
2003-01-11 Jim Meyering <jim@meyering.net>
* io/ftw.c [HAVE_CONFIG_H]: Include <config.h>.
[HAVE_SYS_PARAM_H || _LIBC]: Guard inclusion of <sys/param.h>.
Include <sys/stat.h>, not <include/sys/stat.h>, if !_LIBC.
[!_LIBC] (__chdir, __closedir, __fchdir, __getcwd, __opendir): Define.
[!_LIBC] (__readdir64, __tdestroy, __tfind, __tsearch): Define.
[!_LIBC] (internal_function, dirent64, MAX): Define.
(__set_errno): Define if not already defined.
(open_dir_stream): When FTW_CHDIR is enabled, invoke opendir on
the basename, not the entire file name.
(process_entry): When FTW_CHDIR is enabled, invoke XSTAT or LXSTAT on
the basename, not the entire file name.
2003-01-12 Ulrich Drepper <drepper@redhat.com>
* string/tester.c (test_strcpy): Disable last added strcpy until
it is fixed.
2003-01-11 Philip Blundell <philb@gnu.org>
* sysdeps/unix/sysv/linux/arm/socket.S: Add cancellation support.
2003-01-11 Andreas Schwab <schwab@suse.de>
* Makerules: Add vpath for %.dynsym and %.so so that the
implicit rule chaining for check-abi works.
2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/unix/sysv/linux/sh/sysdep.h (SYSCALL_ERROR_HANDLER):
Add non-PIC case.
2003-01-11 Jakub Jelinek <jakub@redhat.com>
* elf/tls-macros.h [__ia64__] (__TLS_CALL_CLOBBERS): Define.
[__ia64__] (TLS_LE, TLS_IE): Fix typos. Add ;; at start of asm if
gp is used early.
[__ia64__] (TLS_LD, TLS_GD): Likewise. Use __TLS_CALL_CLOBBERS.
* elf/Makefile ($(objpfx)tst-tlsmod5.so, $(objpfx)tst-tlsmod6.so):
Ensure libc.so in DT_NEEDED.
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Move
CHECK_STATIC_TLS before l_tls_offset use.
* sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela):
Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/generic/dl-tls.c (_dl_allocate_tls_storage) [TLS_DTV_AT_TP]:
Allocate TLS_PRE_TCB_SIZE bytes below result.
(_dl_deallocate_tls) [TLS_DTV_AT_TP]: Adjust before freeing.
* sysdeps/generic/libc-tls.c (__libc_setup_tls): If
TLS_INIT_TP_EXPENSIVE is not defined, allocate even if no PT_TLS
segment has been found. If TLS_DTV_AT_TP, allocate TLS_PRE_TCB_SIZE
bytes below result and add tcb_offset to memsz.
* sysdeps/ia64/dl-tls.h (__tls_get_addr): New prototype.
* sysdeps/ia64/dl-machine.h: Include tls.h.
(elf_machine_type_class): Return ELF_RTYPE_CLASS_PLT for TLS relocs
too.
(elf_machine_rela): Assume if sym_map != NULL sym is non-NULL too.
Handle R_IA64_DTPMOD*, R_IA64_DTPREL* and R_IA64_TPREL* relocations.
* sysdeps/ia64/libc-tls.c: New file.
2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/powerpc/powerpc64/sysdep.h (PSEUDO_RET): Add branch hit.
* sysdeps/unix/sysv/linux/powerpc/bits/stat.h (STAT_VER_LINUX):
Fix type. Move definition out of #if.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/ftruncate64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S: Add cancellation
support.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Remove
ftruncate64, pread64, pwrite64, truncate64 entries.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
(INLINE_SYSCALL): New version that supports function call like
syscalls. Add __builtin_expect.
(LOADARGS_n): Add argument size safety checks.
(INTERNAL_SYSCALL): New Macro.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/truncate64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/sys/procfs.h [__PPC_ELF_H]: Avoid
redefinition of elf_fpreg_t and elf_fpregset_t.
2003-01-12 Ulrich Drepper <drepper@redhat.com>
* elf/dl-close.c (_dl_close): Add several asserts. Correct and
simplify test for unloading. If loader of a DSO is unloaded do not
use its scope anymore. Fall back to own scope and adjust opencounts.
Fix several comments.
* elf/dl-deps.c (_dl_map_object_deps): Always allocate memory for
the l_searchlist, not only for l_initfini.
* elf/dl-lookup.c (add_dependencies): Avoid creating relocation
dependencies if objects cannot be removed. Remove object with the
definition as not unloadable if necessary.
* elf/reldep6.c: Create relocation dependency before closing the first
module.
2003-01-10 Guido Gnther <agx@sigxcpu.org>
* elf/Makefile: Add rules to build and run reldep9 test.
* elf/reldep9.c: New file.
* elf/reldep9mod1.c: New file.
* elf/reldep9mod2.c: New file.
* elf/reldep9mod3.c: New file.
2003-01-09 Jakub Jelinek <jakub@redhat.com>
* elf/Makefile: Add rules to build and run nodelete2 test.
* elf/nodelete2.c: New file.
* elf/nodel2mod1.c: New file.
* elf/nodel2mod2.c: New file.
* elf/nodel2mod3.c: New file.
2003-01-09 Jakub Jelinek <jakub@redhat.com>
2003-01-12 10:11:16 +00:00
|
|
|
# For tst-tls9-static, make sure the modules it dlopens have libc.so in DT_NEEDED
|
|
|
|
$(objpfx)tst-tlsmod5.so: $(common-objpfx)libc.so
|
|
|
|
$(objpfx)tst-tlsmod6.so: $(common-objpfx)libc.so
|
2011-05-15 01:25:43 +00:00
|
|
|
$(objpfx)tst-tls19mod1.so: $(objpfx)tst-tls19mod2.so $(objpfx)tst-tls19mod3.so
|
|
|
|
$(objpfx)tst-tls19mod3.so: $(objpfx)ld.so
|
2002-12-30 21:15:31 +00:00
|
|
|
$(objpfx)reldep8mod3.so: $(objpfx)reldep8mod1.so $(objpfx)reldep8mod2.so
|
Update.
2003-01-11 Jim Meyering <jim@meyering.net>
* io/ftw.c [HAVE_CONFIG_H]: Include <config.h>.
[HAVE_SYS_PARAM_H || _LIBC]: Guard inclusion of <sys/param.h>.
Include <sys/stat.h>, not <include/sys/stat.h>, if !_LIBC.
[!_LIBC] (__chdir, __closedir, __fchdir, __getcwd, __opendir): Define.
[!_LIBC] (__readdir64, __tdestroy, __tfind, __tsearch): Define.
[!_LIBC] (internal_function, dirent64, MAX): Define.
(__set_errno): Define if not already defined.
(open_dir_stream): When FTW_CHDIR is enabled, invoke opendir on
the basename, not the entire file name.
(process_entry): When FTW_CHDIR is enabled, invoke XSTAT or LXSTAT on
the basename, not the entire file name.
2003-01-12 Ulrich Drepper <drepper@redhat.com>
* string/tester.c (test_strcpy): Disable last added strcpy until
it is fixed.
2003-01-11 Philip Blundell <philb@gnu.org>
* sysdeps/unix/sysv/linux/arm/socket.S: Add cancellation support.
2003-01-11 Andreas Schwab <schwab@suse.de>
* Makerules: Add vpath for %.dynsym and %.so so that the
implicit rule chaining for check-abi works.
2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/unix/sysv/linux/sh/sysdep.h (SYSCALL_ERROR_HANDLER):
Add non-PIC case.
2003-01-11 Jakub Jelinek <jakub@redhat.com>
* elf/tls-macros.h [__ia64__] (__TLS_CALL_CLOBBERS): Define.
[__ia64__] (TLS_LE, TLS_IE): Fix typos. Add ;; at start of asm if
gp is used early.
[__ia64__] (TLS_LD, TLS_GD): Likewise. Use __TLS_CALL_CLOBBERS.
* elf/Makefile ($(objpfx)tst-tlsmod5.so, $(objpfx)tst-tlsmod6.so):
Ensure libc.so in DT_NEEDED.
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Move
CHECK_STATIC_TLS before l_tls_offset use.
* sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela):
Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/generic/dl-tls.c (_dl_allocate_tls_storage) [TLS_DTV_AT_TP]:
Allocate TLS_PRE_TCB_SIZE bytes below result.
(_dl_deallocate_tls) [TLS_DTV_AT_TP]: Adjust before freeing.
* sysdeps/generic/libc-tls.c (__libc_setup_tls): If
TLS_INIT_TP_EXPENSIVE is not defined, allocate even if no PT_TLS
segment has been found. If TLS_DTV_AT_TP, allocate TLS_PRE_TCB_SIZE
bytes below result and add tcb_offset to memsz.
* sysdeps/ia64/dl-tls.h (__tls_get_addr): New prototype.
* sysdeps/ia64/dl-machine.h: Include tls.h.
(elf_machine_type_class): Return ELF_RTYPE_CLASS_PLT for TLS relocs
too.
(elf_machine_rela): Assume if sym_map != NULL sym is non-NULL too.
Handle R_IA64_DTPMOD*, R_IA64_DTPREL* and R_IA64_TPREL* relocations.
* sysdeps/ia64/libc-tls.c: New file.
2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/powerpc/powerpc64/sysdep.h (PSEUDO_RET): Add branch hit.
* sysdeps/unix/sysv/linux/powerpc/bits/stat.h (STAT_VER_LINUX):
Fix type. Move definition out of #if.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/ftruncate64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S: Add cancellation
support.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Remove
ftruncate64, pread64, pwrite64, truncate64 entries.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
(INLINE_SYSCALL): New version that supports function call like
syscalls. Add __builtin_expect.
(LOADARGS_n): Add argument size safety checks.
(INTERNAL_SYSCALL): New Macro.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/truncate64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/sys/procfs.h [__PPC_ELF_H]: Avoid
redefinition of elf_fpreg_t and elf_fpregset_t.
2003-01-12 Ulrich Drepper <drepper@redhat.com>
* elf/dl-close.c (_dl_close): Add several asserts. Correct and
simplify test for unloading. If loader of a DSO is unloaded do not
use its scope anymore. Fall back to own scope and adjust opencounts.
Fix several comments.
* elf/dl-deps.c (_dl_map_object_deps): Always allocate memory for
the l_searchlist, not only for l_initfini.
* elf/dl-lookup.c (add_dependencies): Avoid creating relocation
dependencies if objects cannot be removed. Remove object with the
definition as not unloadable if necessary.
* elf/reldep6.c: Create relocation dependency before closing the first
module.
2003-01-10 Guido Gnther <agx@sigxcpu.org>
* elf/Makefile: Add rules to build and run reldep9 test.
* elf/reldep9.c: New file.
* elf/reldep9mod1.c: New file.
* elf/reldep9mod2.c: New file.
* elf/reldep9mod3.c: New file.
2003-01-09 Jakub Jelinek <jakub@redhat.com>
* elf/Makefile: Add rules to build and run nodelete2 test.
* elf/nodelete2.c: New file.
* elf/nodel2mod1.c: New file.
* elf/nodel2mod2.c: New file.
* elf/nodel2mod3.c: New file.
2003-01-09 Jakub Jelinek <jakub@redhat.com>
2003-01-12 10:11:16 +00:00
|
|
|
$(objpfx)nodel2mod3.so: $(objpfx)nodel2mod1.so $(objpfx)nodel2mod2.so
|
|
|
|
$(objpfx)reldep9mod2.so: $(objpfx)reldep9mod1.so
|
|
|
|
$(objpfx)reldep9mod3.so: $(objpfx)reldep9mod1.so $(objpfx)reldep9mod2.so
|
2005-03-03 08:24:29 +00:00
|
|
|
$(objpfx)unload3mod1.so: $(objpfx)unload3mod3.so
|
|
|
|
$(objpfx)unload3mod2.so: $(objpfx)unload3mod3.so
|
|
|
|
$(objpfx)unload3mod3.so: $(objpfx)unload3mod4.so
|
2005-03-18 11:11:42 +00:00
|
|
|
$(objpfx)unload4mod1.so: $(objpfx)unload4mod2.so $(objpfx)unload4mod3.so
|
|
|
|
$(objpfx)unload4mod2.so: $(objpfx)unload4mod4.so $(objpfx)unload4mod3.so
|
2006-09-19 14:42:12 +00:00
|
|
|
$(objpfx)unload7mod2.so: $(objpfx)unload7mod1.so
|
2011-08-24 07:32:13 +00:00
|
|
|
$(objpfx)unload8mod1.so: $(objpfx)unload8mod2.so
|
|
|
|
$(objpfx)unload8mod2.so: $(objpfx)unload8mod3.so
|
2011-01-19 20:32:35 +00:00
|
|
|
$(objpfx)tst-initordera2.so: $(objpfx)tst-initordera1.so
|
|
|
|
$(objpfx)tst-initorderb2.so: $(objpfx)tst-initorderb1.so $(objpfx)tst-initordera2.so
|
|
|
|
$(objpfx)tst-initordera3.so: $(objpfx)tst-initorderb2.so $(objpfx)tst-initorderb1.so
|
|
|
|
$(objpfx)tst-initordera4.so: $(objpfx)tst-initordera3.so
|
|
|
|
$(objpfx)tst-initorder: $(objpfx)tst-initordera4.so $(objpfx)tst-initordera1.so $(objpfx)tst-initorderb2.so
|
2013-05-29 16:00:20 +00:00
|
|
|
$(objpfx)tst-null-argv: $(objpfx)tst-null-argv-lib.so
|
2015-05-06 20:32:18 +00:00
|
|
|
$(objpfx)tst-tlsalign: $(objpfx)tst-tlsalign-lib.so
|
2015-07-16 03:23:28 +00:00
|
|
|
$(objpfx)tst-nodelete-opened.out: $(objpfx)tst-nodelete-opened-lib.so
|
2015-05-06 20:32:18 +00:00
|
|
|
|
2015-06-02 23:55:36 +00:00
|
|
|
$(objpfx)tst-tlsalign-extern: $(objpfx)tst-tlsalign-vars.o
|
|
|
|
$(objpfx)tst-tlsalign-extern-static: $(objpfx)tst-tlsalign-vars.o
|
|
|
|
|
2013-05-29 16:00:20 +00:00
|
|
|
tst-null-argv-ENV = LD_DEBUG=all LD_DEBUG_OUTPUT=$(objpfx)tst-null-argv.debug.out
|
2019-12-03 09:58:52 +00:00
|
|
|
LDFLAGS-nodel2mod3.so = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-reldepmod5.so = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-reldep6mod1.so = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-reldep6mod4.so = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-reldep8mod3.so = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-unload4mod1.so = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-unload4mod2.so = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-tst-initorder = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-tst-initordera2.so = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-tst-initordera3.so = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-tst-initordera4.so = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-tst-initorderb2.so = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-tst-tlsmod5.so = -nostdlib -Wl,--no-as-needed
|
|
|
|
LDFLAGS-tst-tlsmod6.so = -nostdlib -Wl,--no-as-needed
|
2002-10-22 06:22:38 +00:00
|
|
|
|
2003-07-21 22:40:24 +00:00
|
|
|
testobj1.so-no-z-defs = yes
|
|
|
|
testobj3.so-no-z-defs = yes
|
|
|
|
testobj4.so-no-z-defs = yes
|
|
|
|
testobj5.so-no-z-defs = yes
|
|
|
|
testobj6.so-no-z-defs = yes
|
|
|
|
failobj.so-no-z-defs = yes
|
|
|
|
constload2.so-no-z-defs = yes
|
|
|
|
constload3.so-no-z-defs = yes
|
|
|
|
nodelmod1.so-no-z-defs = yes
|
|
|
|
nodelmod2.so-no-z-defs = yes
|
|
|
|
nodelmod4.so-no-z-defs = yes
|
|
|
|
nodel2mod2.so-no-z-defs = yes
|
|
|
|
reldepmod2.so-no-z-defs = yes
|
|
|
|
reldepmod3.so-no-z-defs = yes
|
|
|
|
reldepmod4.so-no-z-defs = yes
|
|
|
|
reldep4mod4.so-no-z-defs = yes
|
|
|
|
reldep4mod2.so-no-z-defs = yes
|
|
|
|
ltglobmod2.so-no-z-defs = yes
|
|
|
|
dblloadmod3.so-no-z-defs = yes
|
|
|
|
tst-tlsmod1.so-no-z-defs = yes
|
|
|
|
tst-tlsmod2.so-no-z-defs = yes
|
|
|
|
tst-tlsmod3.so-no-z-defs = yes
|
|
|
|
tst-tlsmod4.so-no-z-defs = yes
|
|
|
|
tst-tlsmod7.so-no-z-defs = yes
|
|
|
|
tst-tlsmod8.so-no-z-defs = yes
|
|
|
|
tst-tlsmod9.so-no-z-defs = yes
|
|
|
|
tst-tlsmod10.so-no-z-defs = yes
|
|
|
|
tst-tlsmod12.so-no-z-defs = yes
|
2003-07-24 20:07:00 +00:00
|
|
|
tst-tlsmod14a.so-no-z-defs = yes
|
|
|
|
tst-tlsmod14b.so-no-z-defs = yes
|
2005-03-20 22:25:59 +00:00
|
|
|
tst-tlsmod15a.so-no-z-defs = yes
|
2008-01-17 20:20:00 +00:00
|
|
|
tst-tlsmod16b.so-no-z-defs = yes
|
2003-07-21 22:40:24 +00:00
|
|
|
circlemod2.so-no-z-defs = yes
|
|
|
|
circlemod3.so-no-z-defs = yes
|
|
|
|
circlemod3a.so-no-z-defs = yes
|
|
|
|
reldep8mod2.so-no-z-defs = yes
|
|
|
|
reldep9mod1.so-no-z-defs = yes
|
2005-03-03 08:24:29 +00:00
|
|
|
unload3mod4.so-no-z-defs = yes
|
2005-03-18 11:11:42 +00:00
|
|
|
unload4mod1.so-no-z-defs = yes
|
2009-06-03 23:21:40 +00:00
|
|
|
ifuncmod1.so-no-z-defs = yes
|
2009-06-22 22:07:40 +00:00
|
|
|
ifuncmod5.so-no-z-defs = yes
|
|
|
|
ifuncmod6.so-no-z-defs = yes
|
2014-02-25 18:00:36 +00:00
|
|
|
tst-auditmod9a.so-no-z-defs = yes
|
|
|
|
tst-auditmod9b.so-no-z-defs = yes
|
2015-07-07 15:45:46 +00:00
|
|
|
tst-nodelete-uniquemod.so-no-z-defs = yes
|
|
|
|
tst-nodelete-rtldmod.so-no-z-defs = yes
|
|
|
|
tst-nodelete-zmod.so-no-z-defs = yes
|
2015-08-10 07:47:54 +00:00
|
|
|
tst-nodelete2mod.so-no-z-defs = yes
|
2004-12-22 20:10:10 +00:00
|
|
|
|
2003-07-29 08:36:30 +00:00
|
|
|
ifeq ($(build-shared),yes)
|
|
|
|
# Build all the modules even when not actually running test programs.
|
|
|
|
tests: $(test-modules)
|
|
|
|
endif
|
|
|
|
|
1999-01-16 17:09:04 +00:00
|
|
|
LDFLAGS-loadtest = -rdynamic
|
|
|
|
|
|
|
|
$(objpfx)loadtest.out: $(test-modules)
|
1999-01-19 23:47:25 +00:00
|
|
|
|
2000-10-21 00:02:39 +00:00
|
|
|
$(objpfx)neededtest.out: $(objpfx)neededobj1.so $(objpfx)neededobj2.so \
|
2000-10-24 17:04:14 +00:00
|
|
|
$(objpfx)neededobj3.so
|
2000-10-21 00:02:39 +00:00
|
|
|
|
2000-10-23 22:58:40 +00:00
|
|
|
$(objpfx)neededtest2.out: $(objpfx)neededobj1.so $(objpfx)neededobj2.so \
|
2000-10-24 17:04:14 +00:00
|
|
|
$(objpfx)neededobj3.so
|
|
|
|
|
|
|
|
$(objpfx)neededtest3.out: $(objpfx)neededobj1.so $(objpfx)neededobj2.so \
|
|
|
|
$(objpfx)neededobj3.so $(objpfx)neededobj4.so
|
2000-10-23 22:58:40 +00:00
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)neededtest4: $(objpfx)neededobj1.so
|
2000-12-31 06:09:08 +00:00
|
|
|
$(objpfx)neededtest4.out: $(objpfx)neededobj5.so $(objpfx)neededobj6.so
|
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)restest1: $(objpfx)testobj1.so $(objpfx)testobj1_1.so
|
1999-01-22 09:29:52 +00:00
|
|
|
LDFLAGS-restest1 = -rdynamic
|
1999-01-19 23:47:25 +00:00
|
|
|
|
Update.
2001-05-20 Bruno Haible <haible@clisp.cons.org>
* iconvdata/cp1255.c: Completely rewritten.
* iconvdata/Makefile (gen-8bit-gap-modules): Remove cp1255.
* iconvdata/testdata/WINDOWS-1255: New file.
* iconvdata/testdata/WINDOWS-1255..UTF8: New file.
* iconvdata/TESTS: Add WINDOWS-1255 test.
* iconvdata/CP1255.irreversible: New file.
2001-05-20 Bruno Haible <haible@clisp.cons.org>
* iconvdata/cp1258.c: Completely rewritten.
* iconvdata/Makefile (gen-8bit-gap-modules): Remove cp1258.
* iconvdata/testdata/WINDOWS-1258: New file.
* iconvdata/testdata/WINDOWS-1258..UTF8: New file.
* iconvdata/TESTS: Add WINDOWS-1258 test.
* iconvdata/tst-table-from.c (try): Reset the iconv descriptor before
the main call, and flush it afterwards.
(utf8_decode): Return a string, possibly containing several Unicode
characters.
(main): Update all utf8_decode calls.
* iconvdata/CP1258.irreversible: New file.
2001-05-20 Bruno Haible <haible@clisp.cons.org>
* iconv/gconv.c (__gconv): For flush without output, pass do_flush = 2.
* iconv/skeleton.c: Distinguish do_flush = 1 and do_flush = 2. In the
first case, set outbuf, outstart, outend, and call PREPARE_LOOP before
EMIT_SHIFT_TO_INIT; then pass the output produced by this step down to
the next step. In the second case, clear the state without calling
EMIT_SHIFT_TO_INIT.
* iconvdata/ibm930.c (EMIT_SHIFT_TO_INIT): Use outbuf instead of
data->__outbuf, and outend instead of data->__outbufend.
* iconvdata/ibm933.c (EMIT_SHIFT_TO_INIT): Likewise.
* iconvdata/ibm935.c (EMIT_SHIFT_TO_INIT): Likewise.
* iconvdata/ibm937.c (EMIT_SHIFT_TO_INIT): Likewise.
* iconvdata/ibm939.c (EMIT_SHIFT_TO_INIT): Likewise.
* iconvdata/iso-2022-cn.c (EMIT_SHIFT_TO_INIT): Likewise.
* iconvdata/iso-2022-cn-ext.c (EMIT_SHIFT_TO_INIT): Likewise.
* iconvdata/iso-2022-jp.c (EMIT_SHIFT_TO_INIT): Likewise.
* iconvdata/iso-2022-kr.c (EMIT_SHIFT_TO_INIT): Likewise.
* iconvdata/utf-7.c (EMIT_SHIFT_TO_INIT): Likewise.
2001-05-21 Jakub Jelinek <jakub@redhat.com>
* elf/rtld.c (dl_main): Compute l_map_end for the main program.
* elf/dl-sym.c (_dl_sym): Don't check for l_addr == 0.
If match == _dl_loaded, caller can still come from the main program.
(_dl_vsym): Likewise.
* elf/dl-open.c (dl_open_worker): Don't check for l_addr == 0.
* elf/dl-error.c (_dl_signal_error): Change NULL objname into "".
* elf/restest2.c: New test.
* elf/Makefile (tests): Add restest2.
(restest2, LDFLAGS-restest2): Add rules.
2001-05-22 22:30:18 +00:00
|
|
|
LDFLAGS-restest2 = -rdynamic
|
|
|
|
|
1999-01-19 23:47:25 +00:00
|
|
|
$(objpfx)restest1.out: $(test-modules)
|
1999-01-20 00:34:52 +00:00
|
|
|
|
1999-01-22 09:29:52 +00:00
|
|
|
preloadtest-preloads = testobj1 testobj2 testobj3 testobj4 testobj5
|
1999-01-21 23:13:24 +00:00
|
|
|
$(objpfx)preloadtest: $(objpfx)testobj6.so
|
|
|
|
LDFLAGS-preloadtest = -rdynamic
|
1999-01-22 09:29:52 +00:00
|
|
|
$(objpfx)preloadtest.out: $(preloadtest-preloads:%=$(objpfx)%.so)
|
|
|
|
preloadtest-ENV = \
|
|
|
|
LD_PRELOAD=$(subst $(empty) ,:,$(strip $(preloadtest-preloads:=.so)))
|
1999-01-20 20:01:17 +00:00
|
|
|
|
|
|
|
LDFLAGS-loadfail = -rdynamic
|
|
|
|
|
2022-01-28 10:51:49 +00:00
|
|
|
$(objpfx)loadfail.out: $(objpfx)failobj.so $(objpfx)testobj1.so \
|
|
|
|
$(objpfx)testobj2.so $(objpfx)testobj3.so \
|
|
|
|
$(objpfx)testobj4.so $(objpfx)testobj5.so
|
1999-02-19 00:00:05 +00:00
|
|
|
|
|
|
|
LDFLAGS-multiload = -rdynamic
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-multiload.c += -DOBJDIR=\"$(elf-objpfx)\"
|
1999-02-19 00:00:05 +00:00
|
|
|
|
|
|
|
$(objpfx)multiload.out: $(objpfx)testobj1.so
|
1999-05-05 23:29:18 +00:00
|
|
|
|
2000-06-30 18:11:39 +00:00
|
|
|
LDFLAGS-origtest = -rdynamic
|
1999-05-05 23:29:18 +00:00
|
|
|
$(objpfx)origtest.out: $(objpfx)testobj1.so
|
1999-08-01 21:43:03 +00:00
|
|
|
|
|
|
|
ifeq ($(have-thread-library),yes)
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)resolvfail: $(shared-thread-library)
|
1999-08-01 21:43:03 +00:00
|
|
|
endif
|
2000-03-17 02:17:59 +00:00
|
|
|
|
|
|
|
$(objpfx)constload1.out: $(objpfx)constload2.so $(objpfx)constload3.so
|
2000-03-31 17:07:47 +00:00
|
|
|
|
2002-06-30 07:17:02 +00:00
|
|
|
$(objpfx)circleload1.out: $(objpfx)circlemod1.so \
|
|
|
|
$(objpfx)circlemod1a.so
|
|
|
|
|
|
|
|
$(objpfx)circlemod1.so: $(objpfx)circlemod2.so
|
|
|
|
$(objpfx)circlemod2.so: $(objpfx)circlemod3.so
|
|
|
|
$(objpfx)circlemod1a.so: $(objpfx)circlemod2a.so
|
|
|
|
$(objpfx)circlemod2a.so: $(objpfx)circlemod3a.so
|
|
|
|
|
2000-03-31 17:07:47 +00:00
|
|
|
$(objpfx)order: $(addprefix $(objpfx),dep4.so dep3.so dep2.so dep1.so)
|
|
|
|
|
Split up rules for tests that compare output with baselines.
This patch splits makefile rules that generate a file then run cmp to
check the contents of that file into separate rules to generate and
compare the file. This simplifies making those tests generate PASS /
FAIL results, by removing the need to insert && between commands in
the test so that a $(evaluate-test) call is reached. It also avoids
the oddity of the .out file being an intermediate file rather than the
final result generated, as noted for some of these tests in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.
In many cases, the rule to run the program was no longer needed
because the default rules for running test programs on the host to
generate a .out file sufficed. (I'm not asserting the commands run
after this patch are *exactly* the same as before, simply that the
rules did nothing special that appeared deliberate or relevant to
anything about what the tests were testing. In cases where the rules
redirected stderr as well as stdout, I left the existing rule's
redirection in place to avoid changing what gets compared with the
expected results.)
It's clear there is a lot in common between the various -cmp.out rules
and it might be possible in future to refactor them into more generic
support for the case of comparing test output against a baseline.
(Some baselines are *.exp, some *.expect, some directly embedded in
the makefiles, and nptl/tst-cleanupx0.expect appears unused.)
Tested x86_64.
* elf/Makefile ($(objpfx)order.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order-cmp.out.
($(objpfx)order-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out,
$(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out,
$(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and
$(objpfx)tst-array5-static-cmp.out.
($(objpfx)tst-array1.out): Remove rule.
($(objpfx)tst-array1-cmp.out): New rule.
($(objpfx)tst-array1-static.out): Remove rule.
($(objpfx)tst-array1-static-cmp.out): New rule.
($(objpfx)tst-array2.out): Remove rule.
($(objpfx)tst-array2-cmp.out): New rule.
($(objpfx)tst-array3.out): Remove rule.
($(objpfx)tst-array3-cmp.out): New rule.
($(objpfx)tst-array4.out): Remove rule.
($(objpfx)tst-array4-cmp.out): New rule.
($(objpfx)tst-array5.out): Remove rule.
($(objpfx)tst-array5-cmp.out): New rule.
($(objpfx)tst-array5-static.out): Remove rule.
($(objpfx)tst-array5-static-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order2-cmp.out.
($(objpfx)order2.out): Remove rule.
($(objpfx)order2-cmp.out): New rule.
($(objpfx)tst-initorder.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder-cmp.out.
($(objpfx)tst-initorder-cmp.out): New rule.
($(objpfx)tst-initorder2.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder2-cmp.out.
($(objpfx)tst-initorder2-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-unused-dep-cmp.out.
($(objpfx)tst-unused-dep-cmp.out): Do not run cmp.
($(objpfx)tst-unused-dep-cmp.out): New rule.
* stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend
on $(objpfx)tst-setvbuf1-cmp.out.
($(objpfx)tst-setvbuf1.out): Do not run cmp.
($(objpfx)tst-setvbuf1-cmp.out): New rule.
* string/Makefile [$(run-built-tests) = yes] (tests): Depend
$(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out.
($(objpfx)tst-svc.out): Remove rule.
($(objpfx)tst-svc-cmp.out): New rule.
nptl:
* Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-cleanup0-cmp.out.
($(objpfx)tst-cleanup0-cmp.out): New rule.
2014-02-14 13:42:44 +00:00
|
|
|
$(objpfx)order-cmp.out: $(objpfx)order.out
|
2014-02-21 21:48:08 +00:00
|
|
|
(echo "0123456789" | cmp $< -) > $@; \
|
|
|
|
$(evaluate-test)
|
2000-05-23 18:10:54 +00:00
|
|
|
|
|
|
|
$(objpfx)vismain: $(addprefix $(objpfx),vismod1.so vismod2.so)
|
|
|
|
$(objpfx)vismain.out: $(addprefix $(objpfx),vismod3.so)
|
|
|
|
vismain-ENV = LD_PRELOAD=$(addprefix $(objpfx),vismod3.so)
|
2000-07-20 22:21:58 +00:00
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)noload: $(objpfx)testobj1.so
|
2019-12-03 09:58:52 +00:00
|
|
|
LDFLAGS-noload = -rdynamic -Wl,--no-as-needed
|
2000-07-20 22:21:58 +00:00
|
|
|
$(objpfx)noload.out: $(objpfx)testobj5.so
|
2000-07-21 00:15:14 +00:00
|
|
|
|
2014-03-07 03:29:23 +00:00
|
|
|
$(objpfx)noload-mem.out: $(objpfx)noload.out
|
2014-02-21 21:48:08 +00:00
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)noload.mtrace > $@; \
|
|
|
|
$(evaluate-test)
|
2021-07-22 13:07:59 +00:00
|
|
|
noload-ENV = MALLOC_TRACE=$(objpfx)noload.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2011-02-26 01:49:48 +00:00
|
|
|
|
2000-08-25 19:33:19 +00:00
|
|
|
LDFLAGS-nodelete = -rdynamic
|
2000-07-21 00:15:14 +00:00
|
|
|
LDFLAGS-nodelmod1.so = -Wl,--enable-new-dtags,-z,nodelete
|
2000-07-21 04:42:21 +00:00
|
|
|
LDFLAGS-nodelmod4.so = -Wl,--enable-new-dtags,-z,nodelete
|
|
|
|
$(objpfx)nodelete.out: $(objpfx)nodelmod1.so $(objpfx)nodelmod2.so \
|
|
|
|
$(objpfx)nodelmod3.so
|
2000-07-21 04:12:25 +00:00
|
|
|
|
|
|
|
LDFLAGS-nodlopenmod.so = -Wl,--enable-new-dtags,-z,nodlopen
|
|
|
|
$(objpfx)nodlopen.out: $(objpfx)nodlopenmod.so
|
2000-07-21 06:58:27 +00:00
|
|
|
|
2002-02-10 22:40:17 +00:00
|
|
|
$(objpfx)nodlopenmod2.so: $(objpfx)nodlopenmod.so
|
|
|
|
$(objpfx)nodlopen2.out: $(objpfx)nodlopenmod2.so
|
|
|
|
|
2000-07-21 07:21:02 +00:00
|
|
|
$(objpfx)filtmod1.so: $(objpfx)filtmod1.os $(objpfx)filtmod2.so
|
|
|
|
$(LINK.o) -shared -o $@ -B$(csu-objpfx) $(LDFLAGS.so) \
|
2022-05-16 13:17:14 +00:00
|
|
|
$(dt-relr-ldflag) \
|
2000-07-21 07:21:02 +00:00
|
|
|
-L$(subst :, -L,$(rpath-link)) \
|
|
|
|
-Wl,-rpath-link=$(rpath-link) \
|
|
|
|
$< -Wl,-F,$(objpfx)filtmod2.so
|
2000-07-21 06:58:27 +00:00
|
|
|
$(objpfx)filter: $(objpfx)filtmod1.so
|
Update.
2000-08-26 Ulrich Drepper <drepper@redhat.com>
* elf/Makefile (distribute): Add unloadmod.c, reldepmod1.c,
reldepmod2.c, reldepmod3.c, and reldepmod4.c.
(tests): Add unload, reldep, reldep2, and reldep3.
(modules-names): Add unloadmod, reldepmod1, reldepmod2, reldepmod3,
and reldepmod4.
Add rules to build and run unload, reldep, reldep2, and reldep3.
* elf/dl-lookup.c (_dl_lookup_symbol): Add new parameter explicit.
Don't create relocation dependency if it is nonzero.
(_dl_lookup_symbol_skip): Remove relocation dependency stuff. This
can never happen here.
(_dl_lookup_versioned_symbol): Add new parameter explicit.
Don't create relocation dependency if it is nonzero.
(_dl_lookup_versioned_symbol_skip): Remove relocation dependency
stuff. This can never happen here.
* sysdeps/generic/ldsodefs.h: Change prototypes.
* elf/dl-reloc.c (RESOLVE_MAP): Pass 0 in explicit parameter to
_dl_lookup_up and _dl_lookup_versioned_symbol.
(RESOLV): Likewise.
* elf/dl-runtime.c (fixup): Likewise.
(profile_fixup): Likewise.
* elf/dl-libc.c (do_dlsym): Pass 1 in explicit parameter to
_dl_lookup_symbol.
* elf/dl-symbol.c (_dl_symbol_value): Likewise.
* elf/rtld.c (dl_main): Likewise.
* elf/dl-sym.c (_dl_sym): Pass 1 in explicit parameter to
_dl_lookup_symbol if handle is not RTLD_DEFAULT. Always compute
and pass down the caller map.
(_dl_vsym): Likewise.
* elf/reldep.c: New file.
* elf/reldep2.c: New file.
* elf/reldep3.c: New file.
* elf/reldepmod1.c: New file.
* elf/reldepmod2.c: New file.
* elf/reldepmod3.c: New file.
* elf/reldepmod4.c: New file.
* elf/unload.c: New file.
* elf/unloadmod.c: New file.
* elf/do-lookup.h: Remove unused undef_name parameter.
* elf/dl-lookup.c: Adjust callers.
2000-08-26 23:41:19 +00:00
|
|
|
|
2016-12-26 09:09:00 +00:00
|
|
|
# This does not link against libc.
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-filtmod1.c += $(no-stack-protector)
|
2016-12-26 09:09:00 +00:00
|
|
|
|
Update.
2000-08-26 Ulrich Drepper <drepper@redhat.com>
* elf/Makefile (distribute): Add unloadmod.c, reldepmod1.c,
reldepmod2.c, reldepmod3.c, and reldepmod4.c.
(tests): Add unload, reldep, reldep2, and reldep3.
(modules-names): Add unloadmod, reldepmod1, reldepmod2, reldepmod3,
and reldepmod4.
Add rules to build and run unload, reldep, reldep2, and reldep3.
* elf/dl-lookup.c (_dl_lookup_symbol): Add new parameter explicit.
Don't create relocation dependency if it is nonzero.
(_dl_lookup_symbol_skip): Remove relocation dependency stuff. This
can never happen here.
(_dl_lookup_versioned_symbol): Add new parameter explicit.
Don't create relocation dependency if it is nonzero.
(_dl_lookup_versioned_symbol_skip): Remove relocation dependency
stuff. This can never happen here.
* sysdeps/generic/ldsodefs.h: Change prototypes.
* elf/dl-reloc.c (RESOLVE_MAP): Pass 0 in explicit parameter to
_dl_lookup_up and _dl_lookup_versioned_symbol.
(RESOLV): Likewise.
* elf/dl-runtime.c (fixup): Likewise.
(profile_fixup): Likewise.
* elf/dl-libc.c (do_dlsym): Pass 1 in explicit parameter to
_dl_lookup_symbol.
* elf/dl-symbol.c (_dl_symbol_value): Likewise.
* elf/rtld.c (dl_main): Likewise.
* elf/dl-sym.c (_dl_sym): Pass 1 in explicit parameter to
_dl_lookup_symbol if handle is not RTLD_DEFAULT. Always compute
and pass down the caller map.
(_dl_vsym): Likewise.
* elf/reldep.c: New file.
* elf/reldep2.c: New file.
* elf/reldep3.c: New file.
* elf/reldepmod1.c: New file.
* elf/reldepmod2.c: New file.
* elf/reldepmod3.c: New file.
* elf/reldepmod4.c: New file.
* elf/unload.c: New file.
* elf/unloadmod.c: New file.
* elf/do-lookup.h: Remove unused undef_name parameter.
* elf/dl-lookup.c: Adjust callers.
2000-08-26 23:41:19 +00:00
|
|
|
$(objpfx)unload.out: $(objpfx)unloadmod.so
|
|
|
|
|
|
|
|
$(objpfx)reldep.out: $(objpfx)reldepmod1.so $(objpfx)reldepmod2.so
|
|
|
|
|
|
|
|
$(objpfx)reldep2.out: $(objpfx)reldepmod1.so $(objpfx)reldepmod3.so
|
|
|
|
|
|
|
|
$(objpfx)reldep3.out: $(objpfx)reldepmod1.so $(objpfx)reldepmod4.so
|
2000-09-15 17:35:04 +00:00
|
|
|
|
2001-05-22 23:55:23 +00:00
|
|
|
$(objpfx)reldep4.out: $(objpfx)reldep4mod1.so $(objpfx)reldep4mod2.so
|
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)next: $(objpfx)nextmod1.so $(objpfx)nextmod2.so
|
2019-12-03 09:58:52 +00:00
|
|
|
LDFLAGS-next = -Wl,--no-as-needed
|
2000-10-21 02:07:22 +00:00
|
|
|
|
2022-05-27 19:34:49 +00:00
|
|
|
$(objpfx)tst-next-ver: $(objpfx)nextmod3.so
|
|
|
|
LDFLAGS-tst-next-ver = -Wl,--no-as-needed
|
|
|
|
|
2000-10-21 02:07:22 +00:00
|
|
|
$(objpfx)unload2.out: $(objpfx)unload2mod.so $(objpfx)unload2dep.so
|
2000-10-21 07:16:18 +00:00
|
|
|
|
|
|
|
$(objpfx)lateglobal.out: $(objpfx)ltglobmod1.so $(objpfx)ltglobmod2.so
|
2000-10-30 00:13:29 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-pathopt.out: tst-pathopt.sh $(objpfx)tst-pathopt \
|
|
|
|
$(objpfx)pathoptobj.so
|
Don't require test wrappers to preserve environment variables, use more consistent environment.
One wart in the original support for test wrappers for cross testing,
as noted in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00722.html>, is the
requirement for test wrappers to pass a poorly-defined set of
environment variables from the build system to the system running the
glibc under test. Although some variables are passed explicitly via
$(test-wrapper-env), including LD_* variables that simply can't be
passed implicitly because of the side effects they'd have on the build
system's dynamic linker, others are passed implicitly, including
variables such as GCONV_PATH and LOCPATH that could potentially affect
the build system's libc (so effectively relying on any such effects
not breaking the wrappers). In addition, the code in
cross-test-ssh.sh for preserving environment variables is fragile (it
depends on how bash formats a list of exported variables, and could
well break for multi-line variable definitions where the contents
contain things looking like other variable definitions).
This patch moves to explicitly passing environment variables via
$(test-wrapper-env). Makefile variables that previously used
$(test-wrapper) are split up into -before-env and -after-env parts
that can be passed separately to the various .sh files used in
testing, so those files can then insert environment settings between
the two parts.
The common default environment settings in make-test-out are made into
a separate makefile variable that can also be passed to scripts,
rather than many scripts duplicating those settings (for testing an
installed glibc, it is desirable to have the GCONV_PATH setting on
just one place, so just that one place needs to support it pointing to
an installed sysroot instead of the build tree). The default settings
are included in the variables such as $(test-program-prefix), so that
if tests do not need any non-default settings they can continue to use
single variables rather than the split-up variables.
Although this patch cleans up LC_ALL=C settings (that being part of
the common defaults), various LANG=C and LANGUAGE=C settings remain.
Those are generally unnecessary and I propose a subsequent cleanup to
remove them. LC_ALL takes precedence over LANG, and while LANGUAGE
takes precedence over LC_ALL, it only does so for settings other than
LC_ALL=C. So LC_ALL=C on its own is sufficient to ensure the C
locale, and anything that gets LC_ALL=C does not need the other
settings.
While preparing this patch I noticed some tests with .sh files that
appeared to do nothing beyond what the generic makefile support for
tests can do (localedata/tst-wctype.sh - the makefiles support -ENV
variables and .input files - and localedata/tst-mbswcs.sh - just runs
five tests that could be run individually from the makefile). So I
propose another subsequent cleanup to move those to using the generic
support instead of special .sh files.
Tested x86_64 (native) and powerpc32 (cross).
* Makeconfig (run-program-env): New variable.
(run-program-prefix-before-env): Likewise.
(run-program-prefix-after-env): Likewise.
(run-program-prefix): Define in terms of new variables.
(built-program-cmd-before-env): New variable.
(built-program-cmd-after-env): Likewise.
(built-program-cmd): Define in terms of new variables.
(test-program-prefix-before-env): New variable.
(test-program-prefix-after-env): Likewise.
(test-program-prefix): Define in terms of new variables.
(test-program-cmd-before-env): New variable.
(test-program-cmd-after-env): Likewise.
(test-program-cmd): Define in terms of new variables.
* Rules (make-test-out): Use $(run-program-env).
* scripts/cross-test-ssh.sh (env_blacklist): Remove variable.
(help): Do not mention environment variables. Mention
--timeoutfactor option.
(timeoutfactor): New variable.
(blacklist_exports): Remove function.
(exports): Remove variable.
(command): Do not include ${exports}.
* manual/install.texi (Configuring and compiling): Do not mention
test wrappers preserving environment variables. Mention that last
assignment to a variable must take precedence.
* INSTALL: Regenerated.
* benchtests/Makefile (run-bench): Use $(run-program-env).
* catgets/Makefile ($(objpfx)test1.cat): Use
$(built-program-cmd-before-env), $(run-program-env) and
$(built-program-cmd-after-env).
($(objpfx)test2.cat): Do not specify environment variables
explicitly.
($(objpfx)de/libc.cat): Use $(built-program-cmd-before-env),
$(run-program-env) and $(built-program-cmd-after-env).
($(objpfx)test-gencat.out): Use $(test-program-cmd-before-env),
$(run-program-env) and $(test-program-cmd-after-env).
($(objpfx)sample.SJIS.cat): Do not specify environment variables
explicitly.
* catgets/test-gencat.sh: Use test_program_cmd_before_env,
run_program_env and test_program_cmd_after_env arguments.
* elf/Makefile ($(objpfx)tst-pathopt.out): Use $(run-program-env).
* elf/tst-pathopt.sh: Use run_program_env argument.
* iconvdata/Makefile ($(objpfx)iconv-test.out): Use
$(test-wrapper-env) and $(run-program-env).
* iconvdata/run-iconv-test.sh: Use test_wrapper_env and
run_program_env arguments.
* iconvdata/tst-table.sh: Do not set GCONV_PATH explicitly.
* intl/Makefile ($(objpfx)tst-gettext.out): Use
$(test-program-prefix-before-env), $(run-program-env) and
$(test-program-prefix-after-env).
($(objpfx)tst-gettext2.out): Likewise.
* intl/tst-gettext.sh: Use test_program_prefix_before_env,
run_program_env and test_program_prefix_after_env arguments.
* intl/tst-gettext2.sh: Likewise.
* intl/tst-gettext4.sh: Do not set environment variables
explicitly.
* intl/tst-gettext6.sh: Likewise.
* intl/tst-translit.sh: Likewise.
* malloc/Makefile ($(objpfx)tst-mtrace.out): Use
$(test-program-prefix-before-env), $(run-program-env) and
$(test-program-prefix-after-env).
* malloc/tst-mtrace.sh: Use test_program_prefix_before_env,
run_program_env and test_program_prefix_after_env arguments.
* math/Makefile (run-regen-ulps): Use $(run-program-env).
* nptl/Makefile ($(objpfx)tst-tls6.out): Use $(run-program-env).
* nptl/tst-tls6.sh: Use run_program_env argument. Set LANG=C
explicitly with each use of ${test_wrapper_env}.
* posix/Makefile ($(objpfx)wordexp-tst.out): Use
$(test-program-prefix-before-env), $(run-program-env) and
$(test-program-prefix-after-env).
* posix/tst-getconf.sh: Do not set environment variables
explicitly.
* posix/wordexp-tst.sh: Use test_program_prefix_before_env,
run_program_env and test_program_prefix_after_env arguments.
* stdio-common/tst-printf.sh: Do not set environment variables
explicitly.
* stdlib/Makefile ($(objpfx)tst-fmtmsg.out): Use
$(test-program-prefix-before-env), $(run-program-env) and
$(test-program-prefix-after-env).
* stdlib/tst-fmtmsg.sh: Use test_program_prefix_before_env,
run_program_env and test_program_prefix_after_env arguments.
Split $test calls into $test_pre and $test.
* timezone/Makefile (build-testdata): Use
$(built-program-cmd-before-env), $(run-program-env) and
$(built-program-cmd-after-env).
localedata/ChangeLog:
* Makefile ($(addprefix $(objpfx),$(CTYPE_FILES))): Use
$(built-program-cmd-before-env), $(run-program-env) and
$(built-program-cmd-after-env).
($(objpfx)sort-test.out): Use $(test-program-prefix-before-env),
$(run-program-env) and $(test-program-prefix-after-env).
($(objpfx)tst-fmon.out): Use $(run-program-prefix-before-env),
$(run-program-env) and $(run-program-prefix-after-env).
($(objpfx)tst-locale.out): Use $(built-program-cmd-before-env),
$(run-program-env) and $(built-program-cmd-after-env).
($(objpfx)tst-trans.out): Use $(run-program-prefix-before-env),
$(run-program-env), $(run-program-prefix-after-env),
$(test-program-prefix-before-env) and
$(test-program-prefix-after-env).
($(objpfx)tst-ctype.out): Use $(test-program-cmd-before-env),
$(run-program-env) and $(test-program-cmd-after-env).
($(objpfx)tst-wctype.out): Likewise.
($(objpfx)tst-langinfo.out): Likewise.
($(objpfx)tst-langinfo-static.out): Likewise.
* gen-locale.sh: Use localedef_before_env, run_program_env and
localedef_after_env arguments.
* sort-test.sh: Use test_program_prefix_before_env,
run_program_env and test_program_prefix_after_env arguments.
* tst-ctype.sh: Use tst_ctype_before_env, run_program_env and
tst_ctype_after_env arguments.
* tst-fmon.sh: Use run_program_prefix_before_env, run_program_env
and run_program_prefix_after_env arguments.
* tst-langinfo.sh: Use tst_langinfo_before_env, run_program_env
and tst_langinfo_after_env arguments.
* tst-locale.sh: Use localedef_before_env, run_program_env and
localedef_after_env arguments.
* tst-mbswcs.sh: Do not set environment variables explicitly.
* tst-numeric.sh: Likewise.
* tst-rpmatch.sh: Likewise.
* tst-trans.sh: Use run_program_prefix_before_env,
run_program_env, run_program_prefix_after_env,
test_program_prefix_before_env and test_program_prefix_after_env
arguments.
* tst-wctype.sh: Use tst_wctype_before_env, run_program_env and
tst_wctype_after_env arguments.
2014-06-06 22:19:27 +00:00
|
|
|
$(SHELL) $< $(common-objpfx) '$(test-wrapper-env)' \
|
2020-10-01 13:42:38 +00:00
|
|
|
'$(run-program-env)'; \
|
2014-02-21 21:48:08 +00:00
|
|
|
$(evaluate-test)
|
2001-02-02 06:54:15 +00:00
|
|
|
|
2012-08-22 00:43:21 +00:00
|
|
|
$(objpfx)tst-rtld-load-self.out: tst-rtld-load-self.sh $(objpfx)ld.so
|
2014-02-21 21:48:08 +00:00
|
|
|
$(SHELL) $^ '$(test-wrapper)' '$(test-wrapper-env)' > $@; \
|
|
|
|
$(evaluate-test)
|
2012-08-22 00:43:21 +00:00
|
|
|
|
2019-02-04 12:35:11 +00:00
|
|
|
tst-rtld-preload-OBJS = $(subst $(empty) ,:,$(strip $(preloadtest-preloads:=.so)))
|
|
|
|
$(objpfx)tst-rtld-preload.out: tst-rtld-preload.sh $(objpfx)ld.so \
|
|
|
|
$(objpfx)preloadtest \
|
|
|
|
$(preloadtest-preloads:%=$(objpfx)%.so)
|
|
|
|
$(SHELL) $< $(objpfx)ld.so $(objpfx)preloadtest \
|
2020-01-24 17:22:13 +00:00
|
|
|
'$(test-wrapper-env)' '$(run_program_env)' \
|
2019-02-04 12:35:11 +00:00
|
|
|
'$(rpath-link)' '$(tst-rtld-preload-OBJS)' > $@; \
|
|
|
|
$(evaluate-test)
|
|
|
|
|
2001-02-02 06:54:15 +00:00
|
|
|
$(objpfx)initfirst.out: $(objpfx)firstobj.so
|
2001-03-04 19:51:54 +00:00
|
|
|
|
|
|
|
$(objpfx)global: $(objpfx)globalmod1.so
|
2021-10-15 18:29:24 +00:00
|
|
|
$(objpfx)global.out: $(objpfx)reldepmod1.so $(objpfx)reldepmod4.so
|
2001-09-06 01:03:05 +00:00
|
|
|
|
|
|
|
$(objpfx)dblload.out: $(objpfx)dblloadmod1.so $(objpfx)dblloadmod2.so
|
|
|
|
|
|
|
|
$(objpfx)dblunload.out: $(objpfx)dblloadmod1.so $(objpfx)dblloadmod2.so
|
2001-09-08 16:27:08 +00:00
|
|
|
|
2006-01-10 01:46:10 +00:00
|
|
|
$(objpfx)reldep5.out: $(objpfx)reldepmod5.so $(objpfx)reldepmod6.so
|
2001-10-01 00:14:14 +00:00
|
|
|
|
|
|
|
$(objpfx)reldep6.out: $(objpfx)reldep6mod3.so $(objpfx)reldep6mod4.so
|
2002-02-11 06:00:19 +00:00
|
|
|
|
2002-04-15 17:10:22 +00:00
|
|
|
$(objpfx)reldep7.out: $(objpfx)reldep7mod1.so $(objpfx)reldep7mod2.so
|
|
|
|
|
2002-12-30 20:25:40 +00:00
|
|
|
$(objpfx)reldep8.out: $(objpfx)reldep8mod3.so
|
|
|
|
|
Update.
2003-01-11 Jim Meyering <jim@meyering.net>
* io/ftw.c [HAVE_CONFIG_H]: Include <config.h>.
[HAVE_SYS_PARAM_H || _LIBC]: Guard inclusion of <sys/param.h>.
Include <sys/stat.h>, not <include/sys/stat.h>, if !_LIBC.
[!_LIBC] (__chdir, __closedir, __fchdir, __getcwd, __opendir): Define.
[!_LIBC] (__readdir64, __tdestroy, __tfind, __tsearch): Define.
[!_LIBC] (internal_function, dirent64, MAX): Define.
(__set_errno): Define if not already defined.
(open_dir_stream): When FTW_CHDIR is enabled, invoke opendir on
the basename, not the entire file name.
(process_entry): When FTW_CHDIR is enabled, invoke XSTAT or LXSTAT on
the basename, not the entire file name.
2003-01-12 Ulrich Drepper <drepper@redhat.com>
* string/tester.c (test_strcpy): Disable last added strcpy until
it is fixed.
2003-01-11 Philip Blundell <philb@gnu.org>
* sysdeps/unix/sysv/linux/arm/socket.S: Add cancellation support.
2003-01-11 Andreas Schwab <schwab@suse.de>
* Makerules: Add vpath for %.dynsym and %.so so that the
implicit rule chaining for check-abi works.
2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/unix/sysv/linux/sh/sysdep.h (SYSCALL_ERROR_HANDLER):
Add non-PIC case.
2003-01-11 Jakub Jelinek <jakub@redhat.com>
* elf/tls-macros.h [__ia64__] (__TLS_CALL_CLOBBERS): Define.
[__ia64__] (TLS_LE, TLS_IE): Fix typos. Add ;; at start of asm if
gp is used early.
[__ia64__] (TLS_LD, TLS_GD): Likewise. Use __TLS_CALL_CLOBBERS.
* elf/Makefile ($(objpfx)tst-tlsmod5.so, $(objpfx)tst-tlsmod6.so):
Ensure libc.so in DT_NEEDED.
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Move
CHECK_STATIC_TLS before l_tls_offset use.
* sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela):
Likewise.
* sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/generic/dl-tls.c (_dl_allocate_tls_storage) [TLS_DTV_AT_TP]:
Allocate TLS_PRE_TCB_SIZE bytes below result.
(_dl_deallocate_tls) [TLS_DTV_AT_TP]: Adjust before freeing.
* sysdeps/generic/libc-tls.c (__libc_setup_tls): If
TLS_INIT_TP_EXPENSIVE is not defined, allocate even if no PT_TLS
segment has been found. If TLS_DTV_AT_TP, allocate TLS_PRE_TCB_SIZE
bytes below result and add tcb_offset to memsz.
* sysdeps/ia64/dl-tls.h (__tls_get_addr): New prototype.
* sysdeps/ia64/dl-machine.h: Include tls.h.
(elf_machine_type_class): Return ELF_RTYPE_CLASS_PLT for TLS relocs
too.
(elf_machine_rela): Assume if sym_map != NULL sym is non-NULL too.
Handle R_IA64_DTPMOD*, R_IA64_DTPREL* and R_IA64_TPREL* relocations.
* sysdeps/ia64/libc-tls.c: New file.
2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/powerpc/powerpc64/sysdep.h (PSEUDO_RET): Add branch hit.
* sysdeps/unix/sysv/linux/powerpc/bits/stat.h (STAT_VER_LINUX):
Fix type. Move definition out of #if.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/ftruncate64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S: Add cancellation
support.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Remove
ftruncate64, pread64, pwrite64, truncate64 entries.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
(INLINE_SYSCALL): New version that supports function call like
syscalls. Add __builtin_expect.
(LOADARGS_n): Add argument size safety checks.
(INTERNAL_SYSCALL): New Macro.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/truncate64.c: New file.
* sysdeps/unix/sysv/linux/powerpc/sys/procfs.h [__PPC_ELF_H]: Avoid
redefinition of elf_fpreg_t and elf_fpregset_t.
2003-01-12 Ulrich Drepper <drepper@redhat.com>
* elf/dl-close.c (_dl_close): Add several asserts. Correct and
simplify test for unloading. If loader of a DSO is unloaded do not
use its scope anymore. Fall back to own scope and adjust opencounts.
Fix several comments.
* elf/dl-deps.c (_dl_map_object_deps): Always allocate memory for
the l_searchlist, not only for l_initfini.
* elf/dl-lookup.c (add_dependencies): Avoid creating relocation
dependencies if objects cannot be removed. Remove object with the
definition as not unloadable if necessary.
* elf/reldep6.c: Create relocation dependency before closing the first
module.
2003-01-10 Guido Gnther <agx@sigxcpu.org>
* elf/Makefile: Add rules to build and run reldep9 test.
* elf/reldep9.c: New file.
* elf/reldep9mod1.c: New file.
* elf/reldep9mod2.c: New file.
* elf/reldep9mod3.c: New file.
2003-01-09 Jakub Jelinek <jakub@redhat.com>
* elf/Makefile: Add rules to build and run nodelete2 test.
* elf/nodelete2.c: New file.
* elf/nodel2mod1.c: New file.
* elf/nodel2mod2.c: New file.
* elf/nodel2mod3.c: New file.
2003-01-09 Jakub Jelinek <jakub@redhat.com>
2003-01-12 10:11:16 +00:00
|
|
|
LDFLAGS-nodel2mod2.so = -Wl,--enable-new-dtags,-z,nodelete
|
|
|
|
$(objpfx)nodelete2.out: $(objpfx)nodel2mod3.so
|
|
|
|
|
|
|
|
$(objpfx)reldep9.out: $(objpfx)reldep9mod3.so
|
|
|
|
|
2002-02-11 06:00:19 +00:00
|
|
|
$(objpfx)tst-tls3: $(objpfx)tst-tlsmod1.so
|
2002-02-13 08:03:56 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-tls4.out: $(objpfx)tst-tlsmod2.so
|
|
|
|
|
|
|
|
$(objpfx)tst-tls5.out: $(objpfx)tst-tlsmod2.so
|
2002-02-14 03:54:02 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-tls6.out: $(objpfx)tst-tlsmod2.so
|
2002-02-14 07:57:19 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-tls7.out: $(objpfx)tst-tlsmod3.so
|
2002-02-14 10:34:55 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-tls8.out: $(objpfx)tst-tlsmod3.so $(objpfx)tst-tlsmod4.so
|
2002-10-22 06:22:38 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-tls9.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
|
|
|
|
|
2010-07-02 16:49:05 +00:00
|
|
|
$(objpfx)tst-tls10: $(objpfx)tst-tlsmod8.so $(objpfx)tst-tlsmod7.so
|
2003-04-17 19:19:29 +00:00
|
|
|
|
2010-07-02 16:49:05 +00:00
|
|
|
$(objpfx)tst-tls11: $(objpfx)tst-tlsmod10.so $(objpfx)tst-tlsmod9.so
|
2003-04-17 19:19:29 +00:00
|
|
|
|
2010-07-02 16:49:05 +00:00
|
|
|
$(objpfx)tst-tls12: $(objpfx)tst-tlsmod12.so $(objpfx)tst-tlsmod11.so
|
2003-04-17 19:19:29 +00:00
|
|
|
|
2003-04-27 06:20:14 +00:00
|
|
|
$(objpfx)tst-tls13.out: $(objpfx)tst-tlsmod13a.so
|
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-tls14: $(objpfx)tst-tlsmod14a.so
|
2005-03-20 22:25:59 +00:00
|
|
|
$(objpfx)tst-tls14.out: $(objpfx)tst-tlsmod14b.so
|
|
|
|
|
|
|
|
$(objpfx)tst-tls15.out: $(objpfx)tst-tlsmod15a.so $(objpfx)tst-tlsmod15b.so
|
2003-07-24 20:07:00 +00:00
|
|
|
|
2006-03-01 06:18:49 +00:00
|
|
|
$(objpfx)tst-tls-dlinfo.out: $(objpfx)tst-tlsmod2.so
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-17 20:20:00 +00:00
|
|
|
$(objpfx)tst-tls16.out: $(objpfx)tst-tlsmod16a.so $(objpfx)tst-tlsmod16b.so
|
|
|
|
|
2008-10-17 15:24:10 +00:00
|
|
|
$(objpfx)tst-tls17.out: $(objpfx)tst-tlsmod17b.so
|
2011-01-17 02:32:07 +00:00
|
|
|
$(patsubst %,$(objpfx)%.os,$(tlsmod17a-modules)): $(objpfx)tst-tlsmod17a%.os: tst-tlsmod17a.c
|
|
|
|
$(compile-command.c) -DN=$*
|
|
|
|
$(patsubst %,$(objpfx)%.so,$(tlsmod17a-modules)): $(objpfx)tst-tlsmod17a%.so: $(objpfx)ld.so
|
|
|
|
$(objpfx)tst-tlsmod17b.so: $(patsubst %,$(objpfx)%.so,$(tlsmod17a-modules))
|
2008-10-17 15:24:10 +00:00
|
|
|
|
2011-01-17 02:32:07 +00:00
|
|
|
$(objpfx)tst-tls18.out: $(patsubst %,$(objpfx)%.so,$(tlsmod18a-modules))
|
|
|
|
$(patsubst %,$(objpfx)%.os,$(tlsmod18a-modules)): $(objpfx)tst-tlsmod18a%.os : tst-tlsmod18a.c
|
|
|
|
$(compile-command.c) -DN=$*
|
|
|
|
$(patsubst %,$(objpfx)%.so,$(tlsmod18a-modules)): $(objpfx)tst-tlsmod18a%.so: $(objpfx)ld.so
|
2008-10-31 20:50:16 +00:00
|
|
|
|
2011-05-15 01:25:43 +00:00
|
|
|
$(objpfx)tst-tls19.out: $(objpfx)tst-tls19mod1.so
|
|
|
|
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-tst-align.c += $(stack-align-test-flags)
|
|
|
|
CFLAGS-tst-align2.c += $(stack-align-test-flags)
|
|
|
|
CFLAGS-tst-alignmod.c += $(stack-align-test-flags)
|
|
|
|
CFLAGS-tst-alignmod2.c += $(stack-align-test-flags)
|
2003-09-17 18:23:49 +00:00
|
|
|
$(objpfx)tst-align.out: $(objpfx)tst-alignmod.so
|
2005-01-22 07:55:35 +00:00
|
|
|
$(objpfx)tst-align2: $(objpfx)tst-alignmod2.so
|
2021-12-09 15:01:33 +00:00
|
|
|
$(objpfx)tst-align3: $(objpfx)tst-alignmod3.so
|
|
|
|
ifeq (yes,$(have-fpie))
|
|
|
|
CFLAGS-tst-align3.c += $(PIE-ccflag)
|
|
|
|
endif
|
|
|
|
LDFLAGS-tst-align3 += -Wl,-z,max-page-size=0x200000
|
|
|
|
LDFLAGS-tst-alignmod3.so += -Wl,-z,max-page-size=0x200000
|
|
|
|
$(objpfx)tst-alignmod3.so: $(libsupport)
|
2003-09-17 18:23:49 +00:00
|
|
|
|
2005-03-03 08:24:29 +00:00
|
|
|
$(objpfx)unload3.out: $(objpfx)unload3mod1.so $(objpfx)unload3mod2.so \
|
|
|
|
$(objpfx)unload3mod3.so $(objpfx)unload3mod4.so
|
|
|
|
|
2005-03-18 11:11:42 +00:00
|
|
|
$(objpfx)unload4.out: $(objpfx)unload4mod1.so $(objpfx)unload4mod3.so
|
|
|
|
|
|
|
|
$(objpfx)unload5.out: $(objpfx)unload3mod1.so $(objpfx)unload3mod2.so \
|
|
|
|
$(objpfx)unload3mod3.so $(objpfx)unload3mod4.so
|
|
|
|
|
2005-04-27 01:39:11 +00:00
|
|
|
$(objpfx)unload6.out: $(objpfx)unload6mod1.so $(objpfx)unload6mod2.so \
|
|
|
|
$(objpfx)unload6mod3.so
|
|
|
|
|
2006-09-19 14:42:12 +00:00
|
|
|
$(objpfx)unload7.out: $(objpfx)unload7mod1.so $(objpfx)unload7mod2.so
|
|
|
|
unload7-ENV = MALLOC_PERTURB_=85
|
|
|
|
|
2011-08-24 07:32:13 +00:00
|
|
|
$(objpfx)unload8.out: $(objpfx)unload8mod1.so $(objpfx)unload8mod1x.so
|
|
|
|
|
2002-10-22 06:22:38 +00:00
|
|
|
$(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
|
2002-11-07 22:28:16 +00:00
|
|
|
|
2003-09-23 12:07:26 +00:00
|
|
|
ifeq ($(have-z-execstack),yes)
|
|
|
|
$(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so
|
2017-12-11 21:11:16 +00:00
|
|
|
CPPFLAGS-tst-execstack.c += -DUSE_PTHREADS=0
|
2003-09-23 12:07:26 +00:00
|
|
|
LDFLAGS-tst-execstack = -Wl,-z,noexecstack
|
2018-10-25 11:08:24 +00:00
|
|
|
LDFLAGS-tst-execstack-mod.so = -Wl,-z,execstack
|
2003-09-23 12:07:26 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-execstack-needed: $(objpfx)tst-execstack-mod.so
|
|
|
|
LDFLAGS-tst-execstack-needed = -Wl,-z,noexecstack
|
2003-09-24 01:56:08 +00:00
|
|
|
|
|
|
|
LDFLAGS-tst-execstack-prog = -Wl,-z,execstack
|
2015-01-08 16:32:06 +00:00
|
|
|
CFLAGS-tst-execstack-prog.c += -Wno-trampolines
|
|
|
|
CFLAGS-tst-execstack-mod.c += -Wno-trampolines
|
2003-09-23 12:07:26 +00:00
|
|
|
endif
|
|
|
|
|
2019-12-03 09:58:52 +00:00
|
|
|
LDFLAGS-tst-array2 = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-tst-array5 = -Wl,--no-as-needed
|
2013-01-23 06:05:33 +00:00
|
|
|
|
Split up rules for tests that compare output with baselines.
This patch splits makefile rules that generate a file then run cmp to
check the contents of that file into separate rules to generate and
compare the file. This simplifies making those tests generate PASS /
FAIL results, by removing the need to insert && between commands in
the test so that a $(evaluate-test) call is reached. It also avoids
the oddity of the .out file being an intermediate file rather than the
final result generated, as noted for some of these tests in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.
In many cases, the rule to run the program was no longer needed
because the default rules for running test programs on the host to
generate a .out file sufficed. (I'm not asserting the commands run
after this patch are *exactly* the same as before, simply that the
rules did nothing special that appeared deliberate or relevant to
anything about what the tests were testing. In cases where the rules
redirected stderr as well as stdout, I left the existing rule's
redirection in place to avoid changing what gets compared with the
expected results.)
It's clear there is a lot in common between the various -cmp.out rules
and it might be possible in future to refactor them into more generic
support for the case of comparing test output against a baseline.
(Some baselines are *.exp, some *.expect, some directly embedded in
the makefiles, and nptl/tst-cleanupx0.expect appears unused.)
Tested x86_64.
* elf/Makefile ($(objpfx)order.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order-cmp.out.
($(objpfx)order-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out,
$(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out,
$(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and
$(objpfx)tst-array5-static-cmp.out.
($(objpfx)tst-array1.out): Remove rule.
($(objpfx)tst-array1-cmp.out): New rule.
($(objpfx)tst-array1-static.out): Remove rule.
($(objpfx)tst-array1-static-cmp.out): New rule.
($(objpfx)tst-array2.out): Remove rule.
($(objpfx)tst-array2-cmp.out): New rule.
($(objpfx)tst-array3.out): Remove rule.
($(objpfx)tst-array3-cmp.out): New rule.
($(objpfx)tst-array4.out): Remove rule.
($(objpfx)tst-array4-cmp.out): New rule.
($(objpfx)tst-array5.out): Remove rule.
($(objpfx)tst-array5-cmp.out): New rule.
($(objpfx)tst-array5-static.out): Remove rule.
($(objpfx)tst-array5-static-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order2-cmp.out.
($(objpfx)order2.out): Remove rule.
($(objpfx)order2-cmp.out): New rule.
($(objpfx)tst-initorder.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder-cmp.out.
($(objpfx)tst-initorder-cmp.out): New rule.
($(objpfx)tst-initorder2.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder2-cmp.out.
($(objpfx)tst-initorder2-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-unused-dep-cmp.out.
($(objpfx)tst-unused-dep-cmp.out): Do not run cmp.
($(objpfx)tst-unused-dep-cmp.out): New rule.
* stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend
on $(objpfx)tst-setvbuf1-cmp.out.
($(objpfx)tst-setvbuf1.out): Do not run cmp.
($(objpfx)tst-setvbuf1-cmp.out): New rule.
* string/Makefile [$(run-built-tests) = yes] (tests): Depend
$(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out.
($(objpfx)tst-svc.out): Remove rule.
($(objpfx)tst-svc-cmp.out): New rule.
nptl:
* Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-cleanup0-cmp.out.
($(objpfx)tst-cleanup0-cmp.out): New rule.
2014-02-14 13:42:44 +00:00
|
|
|
$(objpfx)tst-array1-cmp.out: tst-array1.exp $(objpfx)tst-array1.out
|
2014-02-21 21:48:08 +00:00
|
|
|
cmp $^ > $@; \
|
|
|
|
$(evaluate-test)
|
Split up rules for tests that compare output with baselines.
This patch splits makefile rules that generate a file then run cmp to
check the contents of that file into separate rules to generate and
compare the file. This simplifies making those tests generate PASS /
FAIL results, by removing the need to insert && between commands in
the test so that a $(evaluate-test) call is reached. It also avoids
the oddity of the .out file being an intermediate file rather than the
final result generated, as noted for some of these tests in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.
In many cases, the rule to run the program was no longer needed
because the default rules for running test programs on the host to
generate a .out file sufficed. (I'm not asserting the commands run
after this patch are *exactly* the same as before, simply that the
rules did nothing special that appeared deliberate or relevant to
anything about what the tests were testing. In cases where the rules
redirected stderr as well as stdout, I left the existing rule's
redirection in place to avoid changing what gets compared with the
expected results.)
It's clear there is a lot in common between the various -cmp.out rules
and it might be possible in future to refactor them into more generic
support for the case of comparing test output against a baseline.
(Some baselines are *.exp, some *.expect, some directly embedded in
the makefiles, and nptl/tst-cleanupx0.expect appears unused.)
Tested x86_64.
* elf/Makefile ($(objpfx)order.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order-cmp.out.
($(objpfx)order-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out,
$(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out,
$(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and
$(objpfx)tst-array5-static-cmp.out.
($(objpfx)tst-array1.out): Remove rule.
($(objpfx)tst-array1-cmp.out): New rule.
($(objpfx)tst-array1-static.out): Remove rule.
($(objpfx)tst-array1-static-cmp.out): New rule.
($(objpfx)tst-array2.out): Remove rule.
($(objpfx)tst-array2-cmp.out): New rule.
($(objpfx)tst-array3.out): Remove rule.
($(objpfx)tst-array3-cmp.out): New rule.
($(objpfx)tst-array4.out): Remove rule.
($(objpfx)tst-array4-cmp.out): New rule.
($(objpfx)tst-array5.out): Remove rule.
($(objpfx)tst-array5-cmp.out): New rule.
($(objpfx)tst-array5-static.out): Remove rule.
($(objpfx)tst-array5-static-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order2-cmp.out.
($(objpfx)order2.out): Remove rule.
($(objpfx)order2-cmp.out): New rule.
($(objpfx)tst-initorder.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder-cmp.out.
($(objpfx)tst-initorder-cmp.out): New rule.
($(objpfx)tst-initorder2.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder2-cmp.out.
($(objpfx)tst-initorder2-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-unused-dep-cmp.out.
($(objpfx)tst-unused-dep-cmp.out): Do not run cmp.
($(objpfx)tst-unused-dep-cmp.out): New rule.
* stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend
on $(objpfx)tst-setvbuf1-cmp.out.
($(objpfx)tst-setvbuf1.out): Do not run cmp.
($(objpfx)tst-setvbuf1-cmp.out): New rule.
* string/Makefile [$(run-built-tests) = yes] (tests): Depend
$(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out.
($(objpfx)tst-svc.out): Remove rule.
($(objpfx)tst-svc-cmp.out): New rule.
nptl:
* Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-cleanup0-cmp.out.
($(objpfx)tst-cleanup0-cmp.out): New rule.
2014-02-14 13:42:44 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-array1-static-cmp.out: tst-array1.exp \
|
|
|
|
$(objpfx)tst-array1-static.out
|
2014-02-21 21:48:08 +00:00
|
|
|
cmp $^ > $@; \
|
|
|
|
$(evaluate-test)
|
2005-02-14 21:25:50 +00:00
|
|
|
|
2002-11-07 22:28:16 +00:00
|
|
|
$(objpfx)tst-array2: $(objpfx)tst-array2dep.so
|
Split up rules for tests that compare output with baselines.
This patch splits makefile rules that generate a file then run cmp to
check the contents of that file into separate rules to generate and
compare the file. This simplifies making those tests generate PASS /
FAIL results, by removing the need to insert && between commands in
the test so that a $(evaluate-test) call is reached. It also avoids
the oddity of the .out file being an intermediate file rather than the
final result generated, as noted for some of these tests in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.
In many cases, the rule to run the program was no longer needed
because the default rules for running test programs on the host to
generate a .out file sufficed. (I'm not asserting the commands run
after this patch are *exactly* the same as before, simply that the
rules did nothing special that appeared deliberate or relevant to
anything about what the tests were testing. In cases where the rules
redirected stderr as well as stdout, I left the existing rule's
redirection in place to avoid changing what gets compared with the
expected results.)
It's clear there is a lot in common between the various -cmp.out rules
and it might be possible in future to refactor them into more generic
support for the case of comparing test output against a baseline.
(Some baselines are *.exp, some *.expect, some directly embedded in
the makefiles, and nptl/tst-cleanupx0.expect appears unused.)
Tested x86_64.
* elf/Makefile ($(objpfx)order.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order-cmp.out.
($(objpfx)order-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out,
$(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out,
$(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and
$(objpfx)tst-array5-static-cmp.out.
($(objpfx)tst-array1.out): Remove rule.
($(objpfx)tst-array1-cmp.out): New rule.
($(objpfx)tst-array1-static.out): Remove rule.
($(objpfx)tst-array1-static-cmp.out): New rule.
($(objpfx)tst-array2.out): Remove rule.
($(objpfx)tst-array2-cmp.out): New rule.
($(objpfx)tst-array3.out): Remove rule.
($(objpfx)tst-array3-cmp.out): New rule.
($(objpfx)tst-array4.out): Remove rule.
($(objpfx)tst-array4-cmp.out): New rule.
($(objpfx)tst-array5.out): Remove rule.
($(objpfx)tst-array5-cmp.out): New rule.
($(objpfx)tst-array5-static.out): Remove rule.
($(objpfx)tst-array5-static-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order2-cmp.out.
($(objpfx)order2.out): Remove rule.
($(objpfx)order2-cmp.out): New rule.
($(objpfx)tst-initorder.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder-cmp.out.
($(objpfx)tst-initorder-cmp.out): New rule.
($(objpfx)tst-initorder2.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder2-cmp.out.
($(objpfx)tst-initorder2-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-unused-dep-cmp.out.
($(objpfx)tst-unused-dep-cmp.out): Do not run cmp.
($(objpfx)tst-unused-dep-cmp.out): New rule.
* stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend
on $(objpfx)tst-setvbuf1-cmp.out.
($(objpfx)tst-setvbuf1.out): Do not run cmp.
($(objpfx)tst-setvbuf1-cmp.out): New rule.
* string/Makefile [$(run-built-tests) = yes] (tests): Depend
$(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out.
($(objpfx)tst-svc.out): Remove rule.
($(objpfx)tst-svc-cmp.out): New rule.
nptl:
* Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-cleanup0-cmp.out.
($(objpfx)tst-cleanup0-cmp.out): New rule.
2014-02-14 13:42:44 +00:00
|
|
|
$(objpfx)tst-array2-cmp.out: tst-array2.exp $(objpfx)tst-array2.out
|
2014-02-21 21:48:08 +00:00
|
|
|
cmp $^ > $@; \
|
|
|
|
$(evaluate-test)
|
2002-11-07 22:28:16 +00:00
|
|
|
|
Split up rules for tests that compare output with baselines.
This patch splits makefile rules that generate a file then run cmp to
check the contents of that file into separate rules to generate and
compare the file. This simplifies making those tests generate PASS /
FAIL results, by removing the need to insert && between commands in
the test so that a $(evaluate-test) call is reached. It also avoids
the oddity of the .out file being an intermediate file rather than the
final result generated, as noted for some of these tests in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.
In many cases, the rule to run the program was no longer needed
because the default rules for running test programs on the host to
generate a .out file sufficed. (I'm not asserting the commands run
after this patch are *exactly* the same as before, simply that the
rules did nothing special that appeared deliberate or relevant to
anything about what the tests were testing. In cases where the rules
redirected stderr as well as stdout, I left the existing rule's
redirection in place to avoid changing what gets compared with the
expected results.)
It's clear there is a lot in common between the various -cmp.out rules
and it might be possible in future to refactor them into more generic
support for the case of comparing test output against a baseline.
(Some baselines are *.exp, some *.expect, some directly embedded in
the makefiles, and nptl/tst-cleanupx0.expect appears unused.)
Tested x86_64.
* elf/Makefile ($(objpfx)order.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order-cmp.out.
($(objpfx)order-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out,
$(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out,
$(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and
$(objpfx)tst-array5-static-cmp.out.
($(objpfx)tst-array1.out): Remove rule.
($(objpfx)tst-array1-cmp.out): New rule.
($(objpfx)tst-array1-static.out): Remove rule.
($(objpfx)tst-array1-static-cmp.out): New rule.
($(objpfx)tst-array2.out): Remove rule.
($(objpfx)tst-array2-cmp.out): New rule.
($(objpfx)tst-array3.out): Remove rule.
($(objpfx)tst-array3-cmp.out): New rule.
($(objpfx)tst-array4.out): Remove rule.
($(objpfx)tst-array4-cmp.out): New rule.
($(objpfx)tst-array5.out): Remove rule.
($(objpfx)tst-array5-cmp.out): New rule.
($(objpfx)tst-array5-static.out): Remove rule.
($(objpfx)tst-array5-static-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order2-cmp.out.
($(objpfx)order2.out): Remove rule.
($(objpfx)order2-cmp.out): New rule.
($(objpfx)tst-initorder.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder-cmp.out.
($(objpfx)tst-initorder-cmp.out): New rule.
($(objpfx)tst-initorder2.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder2-cmp.out.
($(objpfx)tst-initorder2-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-unused-dep-cmp.out.
($(objpfx)tst-unused-dep-cmp.out): Do not run cmp.
($(objpfx)tst-unused-dep-cmp.out): New rule.
* stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend
on $(objpfx)tst-setvbuf1-cmp.out.
($(objpfx)tst-setvbuf1.out): Do not run cmp.
($(objpfx)tst-setvbuf1-cmp.out): New rule.
* string/Makefile [$(run-built-tests) = yes] (tests): Depend
$(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out.
($(objpfx)tst-svc.out): Remove rule.
($(objpfx)tst-svc-cmp.out): New rule.
nptl:
* Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-cleanup0-cmp.out.
($(objpfx)tst-cleanup0-cmp.out): New rule.
2014-02-14 13:42:44 +00:00
|
|
|
$(objpfx)tst-array3-cmp.out: tst-array1.exp $(objpfx)tst-array3.out
|
2014-02-21 21:48:08 +00:00
|
|
|
cmp $^ > $@; \
|
|
|
|
$(evaluate-test)
|
2002-12-12 21:51:52 +00:00
|
|
|
|
Split up rules for tests that compare output with baselines.
This patch splits makefile rules that generate a file then run cmp to
check the contents of that file into separate rules to generate and
compare the file. This simplifies making those tests generate PASS /
FAIL results, by removing the need to insert && between commands in
the test so that a $(evaluate-test) call is reached. It also avoids
the oddity of the .out file being an intermediate file rather than the
final result generated, as noted for some of these tests in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.
In many cases, the rule to run the program was no longer needed
because the default rules for running test programs on the host to
generate a .out file sufficed. (I'm not asserting the commands run
after this patch are *exactly* the same as before, simply that the
rules did nothing special that appeared deliberate or relevant to
anything about what the tests were testing. In cases where the rules
redirected stderr as well as stdout, I left the existing rule's
redirection in place to avoid changing what gets compared with the
expected results.)
It's clear there is a lot in common between the various -cmp.out rules
and it might be possible in future to refactor them into more generic
support for the case of comparing test output against a baseline.
(Some baselines are *.exp, some *.expect, some directly embedded in
the makefiles, and nptl/tst-cleanupx0.expect appears unused.)
Tested x86_64.
* elf/Makefile ($(objpfx)order.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order-cmp.out.
($(objpfx)order-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out,
$(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out,
$(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and
$(objpfx)tst-array5-static-cmp.out.
($(objpfx)tst-array1.out): Remove rule.
($(objpfx)tst-array1-cmp.out): New rule.
($(objpfx)tst-array1-static.out): Remove rule.
($(objpfx)tst-array1-static-cmp.out): New rule.
($(objpfx)tst-array2.out): Remove rule.
($(objpfx)tst-array2-cmp.out): New rule.
($(objpfx)tst-array3.out): Remove rule.
($(objpfx)tst-array3-cmp.out): New rule.
($(objpfx)tst-array4.out): Remove rule.
($(objpfx)tst-array4-cmp.out): New rule.
($(objpfx)tst-array5.out): Remove rule.
($(objpfx)tst-array5-cmp.out): New rule.
($(objpfx)tst-array5-static.out): Remove rule.
($(objpfx)tst-array5-static-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order2-cmp.out.
($(objpfx)order2.out): Remove rule.
($(objpfx)order2-cmp.out): New rule.
($(objpfx)tst-initorder.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder-cmp.out.
($(objpfx)tst-initorder-cmp.out): New rule.
($(objpfx)tst-initorder2.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder2-cmp.out.
($(objpfx)tst-initorder2-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-unused-dep-cmp.out.
($(objpfx)tst-unused-dep-cmp.out): Do not run cmp.
($(objpfx)tst-unused-dep-cmp.out): New rule.
* stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend
on $(objpfx)tst-setvbuf1-cmp.out.
($(objpfx)tst-setvbuf1.out): Do not run cmp.
($(objpfx)tst-setvbuf1-cmp.out): New rule.
* string/Makefile [$(run-built-tests) = yes] (tests): Depend
$(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out.
($(objpfx)tst-svc.out): Remove rule.
($(objpfx)tst-svc-cmp.out): New rule.
nptl:
* Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-cleanup0-cmp.out.
($(objpfx)tst-cleanup0-cmp.out): New rule.
2014-02-14 13:42:44 +00:00
|
|
|
$(objpfx)tst-array4.out: $(objpfx)tst-array2dep.so
|
|
|
|
$(objpfx)tst-array4-cmp.out: tst-array4.exp $(objpfx)tst-array4.out
|
2014-02-21 21:48:08 +00:00
|
|
|
cmp $^ > $@; \
|
|
|
|
$(evaluate-test)
|
2002-12-12 21:51:52 +00:00
|
|
|
|
2005-07-07 23:00:02 +00:00
|
|
|
$(objpfx)tst-array5: $(objpfx)tst-array5dep.so
|
Split up rules for tests that compare output with baselines.
This patch splits makefile rules that generate a file then run cmp to
check the contents of that file into separate rules to generate and
compare the file. This simplifies making those tests generate PASS /
FAIL results, by removing the need to insert && between commands in
the test so that a $(evaluate-test) call is reached. It also avoids
the oddity of the .out file being an intermediate file rather than the
final result generated, as noted for some of these tests in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.
In many cases, the rule to run the program was no longer needed
because the default rules for running test programs on the host to
generate a .out file sufficed. (I'm not asserting the commands run
after this patch are *exactly* the same as before, simply that the
rules did nothing special that appeared deliberate or relevant to
anything about what the tests were testing. In cases where the rules
redirected stderr as well as stdout, I left the existing rule's
redirection in place to avoid changing what gets compared with the
expected results.)
It's clear there is a lot in common between the various -cmp.out rules
and it might be possible in future to refactor them into more generic
support for the case of comparing test output against a baseline.
(Some baselines are *.exp, some *.expect, some directly embedded in
the makefiles, and nptl/tst-cleanupx0.expect appears unused.)
Tested x86_64.
* elf/Makefile ($(objpfx)order.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order-cmp.out.
($(objpfx)order-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out,
$(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out,
$(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and
$(objpfx)tst-array5-static-cmp.out.
($(objpfx)tst-array1.out): Remove rule.
($(objpfx)tst-array1-cmp.out): New rule.
($(objpfx)tst-array1-static.out): Remove rule.
($(objpfx)tst-array1-static-cmp.out): New rule.
($(objpfx)tst-array2.out): Remove rule.
($(objpfx)tst-array2-cmp.out): New rule.
($(objpfx)tst-array3.out): Remove rule.
($(objpfx)tst-array3-cmp.out): New rule.
($(objpfx)tst-array4.out): Remove rule.
($(objpfx)tst-array4-cmp.out): New rule.
($(objpfx)tst-array5.out): Remove rule.
($(objpfx)tst-array5-cmp.out): New rule.
($(objpfx)tst-array5-static.out): Remove rule.
($(objpfx)tst-array5-static-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order2-cmp.out.
($(objpfx)order2.out): Remove rule.
($(objpfx)order2-cmp.out): New rule.
($(objpfx)tst-initorder.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder-cmp.out.
($(objpfx)tst-initorder-cmp.out): New rule.
($(objpfx)tst-initorder2.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder2-cmp.out.
($(objpfx)tst-initorder2-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-unused-dep-cmp.out.
($(objpfx)tst-unused-dep-cmp.out): Do not run cmp.
($(objpfx)tst-unused-dep-cmp.out): New rule.
* stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend
on $(objpfx)tst-setvbuf1-cmp.out.
($(objpfx)tst-setvbuf1.out): Do not run cmp.
($(objpfx)tst-setvbuf1-cmp.out): New rule.
* string/Makefile [$(run-built-tests) = yes] (tests): Depend
$(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out.
($(objpfx)tst-svc.out): Remove rule.
($(objpfx)tst-svc-cmp.out): New rule.
nptl:
* Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-cleanup0-cmp.out.
($(objpfx)tst-cleanup0-cmp.out): New rule.
2014-02-14 13:42:44 +00:00
|
|
|
$(objpfx)tst-array5-cmp.out: tst-array5.exp $(objpfx)tst-array5.out
|
2014-02-21 21:48:08 +00:00
|
|
|
cmp $^ > $@; \
|
|
|
|
$(evaluate-test)
|
2005-07-07 23:00:02 +00:00
|
|
|
|
Split up rules for tests that compare output with baselines.
This patch splits makefile rules that generate a file then run cmp to
check the contents of that file into separate rules to generate and
compare the file. This simplifies making those tests generate PASS /
FAIL results, by removing the need to insert && between commands in
the test so that a $(evaluate-test) call is reached. It also avoids
the oddity of the .out file being an intermediate file rather than the
final result generated, as noted for some of these tests in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.
In many cases, the rule to run the program was no longer needed
because the default rules for running test programs on the host to
generate a .out file sufficed. (I'm not asserting the commands run
after this patch are *exactly* the same as before, simply that the
rules did nothing special that appeared deliberate or relevant to
anything about what the tests were testing. In cases where the rules
redirected stderr as well as stdout, I left the existing rule's
redirection in place to avoid changing what gets compared with the
expected results.)
It's clear there is a lot in common between the various -cmp.out rules
and it might be possible in future to refactor them into more generic
support for the case of comparing test output against a baseline.
(Some baselines are *.exp, some *.expect, some directly embedded in
the makefiles, and nptl/tst-cleanupx0.expect appears unused.)
Tested x86_64.
* elf/Makefile ($(objpfx)order.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order-cmp.out.
($(objpfx)order-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out,
$(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out,
$(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and
$(objpfx)tst-array5-static-cmp.out.
($(objpfx)tst-array1.out): Remove rule.
($(objpfx)tst-array1-cmp.out): New rule.
($(objpfx)tst-array1-static.out): Remove rule.
($(objpfx)tst-array1-static-cmp.out): New rule.
($(objpfx)tst-array2.out): Remove rule.
($(objpfx)tst-array2-cmp.out): New rule.
($(objpfx)tst-array3.out): Remove rule.
($(objpfx)tst-array3-cmp.out): New rule.
($(objpfx)tst-array4.out): Remove rule.
($(objpfx)tst-array4-cmp.out): New rule.
($(objpfx)tst-array5.out): Remove rule.
($(objpfx)tst-array5-cmp.out): New rule.
($(objpfx)tst-array5-static.out): Remove rule.
($(objpfx)tst-array5-static-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order2-cmp.out.
($(objpfx)order2.out): Remove rule.
($(objpfx)order2-cmp.out): New rule.
($(objpfx)tst-initorder.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder-cmp.out.
($(objpfx)tst-initorder-cmp.out): New rule.
($(objpfx)tst-initorder2.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder2-cmp.out.
($(objpfx)tst-initorder2-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-unused-dep-cmp.out.
($(objpfx)tst-unused-dep-cmp.out): Do not run cmp.
($(objpfx)tst-unused-dep-cmp.out): New rule.
* stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend
on $(objpfx)tst-setvbuf1-cmp.out.
($(objpfx)tst-setvbuf1.out): Do not run cmp.
($(objpfx)tst-setvbuf1-cmp.out): New rule.
* string/Makefile [$(run-built-tests) = yes] (tests): Depend
$(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out.
($(objpfx)tst-svc.out): Remove rule.
($(objpfx)tst-svc-cmp.out): New rule.
nptl:
* Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-cleanup0-cmp.out.
($(objpfx)tst-cleanup0-cmp.out): New rule.
2014-02-14 13:42:44 +00:00
|
|
|
$(objpfx)tst-array5-static-cmp.out: tst-array5-static.exp \
|
|
|
|
$(objpfx)tst-array5-static.out
|
2014-02-21 21:48:08 +00:00
|
|
|
cmp $^ > $@; \
|
|
|
|
$(evaluate-test)
|
2005-07-07 23:00:02 +00:00
|
|
|
|
2008-07-26 22:22:24 +00:00
|
|
|
CFLAGS-tst-pie1.c += $(pie-ccflag)
|
2014-03-12 22:58:39 +00:00
|
|
|
CFLAGS-tst-pie2.c += $(pie-ccflag)
|
2004-07-16 17:56:45 +00:00
|
|
|
|
2016-12-09 07:18:27 +00:00
|
|
|
$(objpfx)tst-piemod1.so: $(libsupport)
|
2011-05-14 03:31:43 +00:00
|
|
|
$(objpfx)tst-pie1: $(objpfx)tst-piemod1.so
|
2019-06-18 14:42:10 +00:00
|
|
|
$(objpfx)tst-dlopen-pie.out: $(objpfx)tst-pie1
|
2004-07-16 17:56:45 +00:00
|
|
|
|
2002-12-12 21:51:52 +00:00
|
|
|
ifeq (yes,$(build-shared))
|
x86: Support IBT and SHSTK in Intel CET [BZ #21598]
Intel Control-flow Enforcement Technology (CET) instructions:
https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-en
forcement-technology-preview.pdf
includes Indirect Branch Tracking (IBT) and Shadow Stack (SHSTK).
GNU_PROPERTY_X86_FEATURE_1_IBT is added to GNU program property to
indicate that all executable sections are compatible with IBT when
ENDBR instruction starts each valid target where an indirect branch
instruction can land. Linker sets GNU_PROPERTY_X86_FEATURE_1_IBT on
output only if it is set on all relocatable inputs.
On an IBT capable processor, the following steps should be taken:
1. When loading an executable without an interpreter, enable IBT and
lock IBT if GNU_PROPERTY_X86_FEATURE_1_IBT is set on the executable.
2. When loading an executable with an interpreter, enable IBT if
GNU_PROPERTY_X86_FEATURE_1_IBT is set on the interpreter.
a. If GNU_PROPERTY_X86_FEATURE_1_IBT isn't set on the executable,
disable IBT.
b. Lock IBT.
3. If IBT is enabled, when loading a shared object without
GNU_PROPERTY_X86_FEATURE_1_IBT:
a. If legacy interwork is allowed, then mark all pages in executable
PT_LOAD segments in legacy code page bitmap. Failure of legacy code
page bitmap allocation causes an error.
b. If legacy interwork isn't allowed, it causes an error.
GNU_PROPERTY_X86_FEATURE_1_SHSTK is added to GNU program property to
indicate that all executable sections are compatible with SHSTK where
return address popped from shadow stack always matches return address
popped from normal stack. Linker sets GNU_PROPERTY_X86_FEATURE_1_SHSTK
on output only if it is set on all relocatable inputs.
On a SHSTK capable processor, the following steps should be taken:
1. When loading an executable without an interpreter, enable SHSTK if
GNU_PROPERTY_X86_FEATURE_1_SHSTK is set on the executable.
2. When loading an executable with an interpreter, enable SHSTK if
GNU_PROPERTY_X86_FEATURE_1_SHSTK is set on interpreter.
a. If GNU_PROPERTY_X86_FEATURE_1_SHSTK isn't set on the executable
or any shared objects loaded via the DT_NEEDED tag, disable SHSTK.
b. Otherwise lock SHSTK.
3. After SHSTK is enabled, it is an error to load a shared object
without GNU_PROPERTY_X86_FEATURE_1_SHSTK.
To enable CET support in glibc, --enable-cet is required to configure
glibc. When CET is enabled, both compiler and assembler must support
CET. Otherwise, it is a configure-time error.
To support CET run-time control,
1. _dl_x86_feature_1 is added to the writable ld.so namespace to indicate
if IBT or SHSTK are enabled at run-time. It should be initialized by
init_cpu_features.
2. For dynamic executables:
a. A l_cet field is added to struct link_map to indicate if IBT or
SHSTK is enabled in an ELF module. _dl_process_pt_note or
_rtld_process_pt_note is called to process PT_NOTE segment for
GNU program property and set l_cet.
b. _dl_open_check is added to check IBT and SHSTK compatibilty when
dlopening a shared object.
3. Replace i386 _dl_runtime_resolve and _dl_runtime_profile with
_dl_runtime_resolve_shstk and _dl_runtime_profile_shstk, respectively if
SHSTK is enabled.
CET run-time control can be changed via GLIBC_TUNABLES with
$ export GLIBC_TUNABLES=glibc.tune.x86_shstk=[permissive|on|off]
$ export GLIBC_TUNABLES=glibc.tune.x86_ibt=[permissive|on|off]
1. permissive: SHSTK is disabled when dlopening a legacy ELF module.
2. on: IBT or SHSTK are always enabled, regardless if there are IBT or
SHSTK bits in GNU program property.
3. off: IBT or SHSTK are always disabled, regardless if there are IBT or
SHSTK bits in GNU program property.
<cet.h> from CET-enabled GCC is automatically included by assembly codes
to add GNU_PROPERTY_X86_FEATURE_1_IBT and GNU_PROPERTY_X86_FEATURE_1_SHSTK
to GNU program property. _CET_ENDBR is added at the entrance of all
assembly functions whose address may be taken. _CET_NOTRACK is used to
insert NOTRACK prefix with indirect jump table to support IBT. It is
defined as notrack when _CET_NOTRACK is defined in <cet.h>.
[BZ #21598]
* configure.ac: Add --enable-cet.
* configure: Regenerated.
* elf/Makefille (all-built-dso): Add a comment.
* elf/dl-load.c (filebuf): Moved before "dynamic-link.h".
Include <dl-prop.h>.
(_dl_map_object_from_fd): Call _dl_process_pt_note on PT_NOTE
segment.
* elf/dl-open.c: Include <dl-prop.h>.
(dl_open_worker): Call _dl_open_check.
* elf/rtld.c: Include <dl-prop.h>.
(dl_main): Call _rtld_process_pt_note on PT_NOTE segment. Call
_rtld_main_check.
* sysdeps/generic/dl-prop.h: New file.
* sysdeps/i386/dl-cet.c: Likewise.
* sysdeps/unix/sysv/linux/x86/cpu-features.c: Likewise.
* sysdeps/unix/sysv/linux/x86/dl-cet.h: Likewise.
* sysdeps/x86/cet-tunables.h: Likewise.
* sysdeps/x86/check-cet.awk: Likewise.
* sysdeps/x86/configure: Likewise.
* sysdeps/x86/configure.ac: Likewise.
* sysdeps/x86/dl-cet.c: Likewise.
* sysdeps/x86/dl-procruntime.c: Likewise.
* sysdeps/x86/dl-prop.h: Likewise.
* sysdeps/x86/libc-start.h: Likewise.
* sysdeps/x86/link_map.h: Likewise.
* sysdeps/i386/dl-trampoline.S (_dl_runtime_resolve): Add
_CET_ENDBR.
(_dl_runtime_profile): Likewise.
(_dl_runtime_resolve_shstk): New.
(_dl_runtime_profile_shstk): Likewise.
* sysdeps/linux/x86/Makefile (sysdep-dl-routines): Add dl-cet
if CET is enabled.
(CFLAGS-.o): Add -fcf-protection if CET is enabled.
(CFLAGS-.os): Likewise.
(CFLAGS-.op): Likewise.
(CFLAGS-.oS): Likewise.
(asm-CPPFLAGS): Add -fcf-protection -include cet.h if CET
is enabled.
(tests-special): Add $(objpfx)check-cet.out.
(cet-built-dso): New.
(+$(cet-built-dso:=.note)): Likewise.
(common-generated): Add $(cet-built-dso:$(common-objpfx)%=%.note).
($(objpfx)check-cet.out): New.
(generated): Add check-cet.out.
* sysdeps/x86/cpu-features.c: Include <dl-cet.h> and
<cet-tunables.h>.
(TUNABLE_CALLBACK (set_x86_ibt)): New prototype.
(TUNABLE_CALLBACK (set_x86_shstk)): Likewise.
(init_cpu_features): Call get_cet_status to check CET status
and update dl_x86_feature_1 with CET status. Call
TUNABLE_CALLBACK (set_x86_ibt) and TUNABLE_CALLBACK
(set_x86_shstk). Disable and lock CET in libc.a.
* sysdeps/x86/cpu-tunables.c: Include <cet-tunables.h>.
(TUNABLE_CALLBACK (set_x86_ibt)): New function.
(TUNABLE_CALLBACK (set_x86_shstk)): Likewise.
* sysdeps/x86/sysdep.h (_CET_NOTRACK): New.
(_CET_ENDBR): Define if not defined.
(ENTRY): Add _CET_ENDBR.
* sysdeps/x86/dl-tunables.list (glibc.tune): Add x86_ibt and
x86_shstk.
* sysdeps/x86_64/dl-trampoline.h (_dl_runtime_resolve): Add
_CET_ENDBR.
(_dl_runtime_profile): Likewise.
2018-07-16 21:08:15 +00:00
|
|
|
# NB: Please keep cet-built-dso in sysdeps/x86/Makefile in sync with
|
|
|
|
# all-built-dso here.
|
2014-11-06 20:48:44 +00:00
|
|
|
all-built-dso := $(common-objpfx)elf/ld.so $(common-objpfx)libc.so \
|
2012-04-30 22:00:14 +00:00
|
|
|
$(filter-out $(common-objpfx)linkobj/libc.so, \
|
|
|
|
$(sort $(wildcard $(addprefix $(common-objpfx), \
|
|
|
|
*/lib*.so \
|
|
|
|
iconvdata/*.so))))
|
2011-01-17 02:32:07 +00:00
|
|
|
|
2012-04-30 22:00:14 +00:00
|
|
|
$(all-built-dso:=.dyn): %.dyn: %
|
|
|
|
@rm -f $@T
|
|
|
|
LC_ALL=C $(READELF) -W -d $< > $@T
|
|
|
|
test -s $@T
|
|
|
|
mv -f $@T $@
|
2012-05-03 16:52:29 +00:00
|
|
|
common-generated += $(all-built-dso:$(common-objpfx)%=%.dyn)
|
2012-04-30 22:00:14 +00:00
|
|
|
|
|
|
|
$(objpfx)check-textrel.out: $(..)scripts/check-textrel.awk \
|
|
|
|
$(all-built-dso:=.dyn)
|
2014-02-21 21:48:08 +00:00
|
|
|
LC_ALL=C $(AWK) -f $^ > $@; \
|
|
|
|
$(evaluate-test)
|
2012-04-30 22:00:14 +00:00
|
|
|
generated += check-textrel.out
|
2004-01-24 20:12:10 +00:00
|
|
|
|
2012-04-30 22:41:15 +00:00
|
|
|
$(objpfx)execstack-default: $(first-word $(wildcard $(sysdirs:%=%/stackinfo.h)))
|
|
|
|
$(make-target-directory)
|
|
|
|
{ echo '#include <elf.h>'; \
|
|
|
|
echo '#include <stackinfo.h>'; \
|
|
|
|
echo '#if (DEFAULT_STACK_PERMS & PF_X) == 0'; \
|
|
|
|
echo '@@@execstack-no@@@'; \
|
|
|
|
echo '#else'; \
|
|
|
|
echo '@@@execstack-yes@@@'; \
|
|
|
|
echo '#endif'; } | \
|
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) -E -x c-header - | \
|
|
|
|
sed -n -e 's/^@@@\(.*\)@@@/\1/p' > $@T
|
|
|
|
mv -f $@T $@
|
|
|
|
generated += execstack-default
|
|
|
|
|
|
|
|
$(all-built-dso:=.phdr): %.phdr: %
|
|
|
|
@rm -f $@T
|
|
|
|
LC_ALL=C $(READELF) -W -l $< > $@T
|
|
|
|
test -s $@T
|
|
|
|
mv -f $@T $@
|
2012-05-03 16:52:29 +00:00
|
|
|
common-generated += $(all-built-dso:$(common-objpfx)%=%.phdr)
|
2012-04-30 22:41:15 +00:00
|
|
|
|
|
|
|
$(objpfx)check-execstack.out: $(..)scripts/check-execstack.awk \
|
|
|
|
$(objpfx)execstack-default \
|
|
|
|
$(all-built-dso:=.phdr)
|
2018-07-20 00:49:44 +00:00
|
|
|
LC_ALL=C $(AWK) -v "xfail=$(check-execstack-xfail)" -f $^ > $@; \
|
2014-02-21 21:48:08 +00:00
|
|
|
$(evaluate-test)
|
2012-04-30 22:41:15 +00:00
|
|
|
generated += check-execstack.out
|
2009-05-15 15:01:09 +00:00
|
|
|
|
2020-03-02 13:24:27 +00:00
|
|
|
$(objpfx)check-wx-segment.out: $(..)scripts/check-wx-segment.py \
|
|
|
|
$(all-built-dso:=.phdr)
|
|
|
|
$(PYTHON) $^ --xfail="$(check-wx-segment-xfail)" > $@; \
|
|
|
|
$(evaluate-test)
|
|
|
|
generated += check-wx-segment.out
|
|
|
|
|
2004-01-24 20:12:10 +00:00
|
|
|
$(objpfx)tst-dlmodcount.out: $(test-modules)
|
|
|
|
|
2012-05-01 16:26:23 +00:00
|
|
|
$(all-built-dso:=.jmprel): %.jmprel: % Makefile
|
|
|
|
@rm -f $@T
|
|
|
|
LC_ALL=C $(READELF) -W -S -d -r $< > $@T
|
|
|
|
test -s $@T
|
|
|
|
mv -f $@T $@
|
2012-05-03 16:52:29 +00:00
|
|
|
common-generated += $(all-built-dso:$(common-objpfx)%=%.jmprel)
|
2012-05-01 16:26:23 +00:00
|
|
|
|
|
|
|
localplt-built-dso := $(addprefix $(common-objpfx),\
|
|
|
|
libc.so \
|
2014-11-06 20:48:44 +00:00
|
|
|
elf/ld.so \
|
2012-05-01 16:26:23 +00:00
|
|
|
math/libm.so \
|
|
|
|
dlfcn/libdl.so \
|
|
|
|
resolv/libresolv.so \
|
|
|
|
)
|
2015-05-25 18:20:20 +00:00
|
|
|
ifeq ($(build-mathvec),yes)
|
|
|
|
localplt-built-dso += $(addprefix $(common-objpfx), mathvec/libmvec.so)
|
|
|
|
endif
|
2006-01-11 22:18:24 +00:00
|
|
|
ifeq ($(have-thread-library),yes)
|
2012-05-01 16:26:23 +00:00
|
|
|
localplt-built-dso += $(filter-out %_nonshared.a, $(shared-thread-library))
|
2006-01-11 22:18:24 +00:00
|
|
|
endif
|
2018-06-29 14:53:47 +00:00
|
|
|
ifeq ($(build-crypt),yes)
|
|
|
|
localplt-built-dso += $(addprefix $(common-objpfx), crypt/libcrypt.so)
|
|
|
|
endif
|
2021-06-28 07:51:01 +00:00
|
|
|
ifneq ($(pthread-in-libc),yes)
|
|
|
|
localplt-built-dso += $(addprefix $(common-objpfx), rt/librt.so)
|
|
|
|
endif
|
2006-01-11 22:18:24 +00:00
|
|
|
|
2012-07-20 19:20:34 +00:00
|
|
|
vpath localplt.data $(+sysdep_dirs)
|
|
|
|
|
2012-05-01 16:26:23 +00:00
|
|
|
$(objpfx)check-localplt.out: $(..)scripts/check-localplt.awk \
|
|
|
|
$(..)scripts/localplt.awk \
|
|
|
|
$(localplt-built-dso:=.jmprel) \
|
2012-07-20 19:20:34 +00:00
|
|
|
localplt.data
|
|
|
|
LC_ALL=C $(AWK) -f $(filter-out $< %localplt.data,$^) | \
|
|
|
|
LC_ALL=C $(AWK) -f $< $(filter %localplt.data,$^) - \
|
2014-02-21 21:48:08 +00:00
|
|
|
> $@; \
|
|
|
|
$(evaluate-test)
|
2006-01-11 20:44:32 +00:00
|
|
|
endif
|
2004-08-15 20:23:40 +00:00
|
|
|
|
2018-06-08 17:28:38 +00:00
|
|
|
$(all-built-dso:=.dynsym): %.dynsym: %
|
|
|
|
@rm -f $@T
|
|
|
|
LC_ALL=C $(READELF) -W --dyn-syms $< > $@T
|
|
|
|
test -s $@T
|
|
|
|
mv -f $@T $@
|
|
|
|
common-generated += $(all-built-dso:$(common-objpfx)%=%.dynsym)
|
|
|
|
|
|
|
|
$(objpfx)check-initfini.out: $(..)scripts/check-initfini.awk \
|
|
|
|
$(all-built-dso:=.dynsym)
|
|
|
|
LC_ALL=C $(AWK) -f $^ > $@; \
|
|
|
|
$(evaluate-test)
|
|
|
|
generated += check-initfini.out
|
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-dlopenrpath: $(objpfx)tst-dlopenrpathmod.so
|
2004-08-15 20:23:40 +00:00
|
|
|
CFLAGS-tst-dlopenrpath.c += -DPFX=\"$(objpfx)\"
|
|
|
|
LDFLAGS-tst-dlopenrpathmod.so += -Wl,-rpath,\$$ORIGIN/test-subdir
|
|
|
|
$(objpfx)tst-dlopenrpath.out: $(objpfx)firstobj.so
|
2004-09-23 07:45:38 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-deep1mod2.so: $(objpfx)tst-deep1mod3.so
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-deep1: $(objpfx)tst-deep1mod1.so
|
2004-09-23 07:45:38 +00:00
|
|
|
$(objpfx)tst-deep1.out: $(objpfx)tst-deep1mod2.so
|
|
|
|
LDFLAGS-tst-deep1 += -rdynamic
|
|
|
|
tst-deep1mod3.so-no-z-defs = yes
|
[BZ #77]
Update.
Add support for namespaces in the dynamic linker.
* dlfcn/Makefile (libdl-routines): Add dlmopen.
* dlfcn/Versions [libdl, GLIBC_2.3.4]: Add dlmopen.
* dlfcn/dlfcn.h: Define Lmid_t, LM_ID_BASE, and LM_ID_NEWLM.
Declare dlmopen. Document RTLD_DI_LMID.
* dlfcn/dlinfo.c: Handle RTLD_DI_LMID.
* dlfcn/dlmopen.c: New file.
* dlfcn/dlopen.c: Pass new parameter to _dl_open.
* dlfcn/dlopenold.c: Likewise.
* elf/dl-addr.c: Adjust for removal of GL(dl_loaded).
* elf/dl-caller.c: Likewise.
* elf/dl-close.c: Likewise.
* elf/dl-conflict.c: Likewise.
* elf/dl-debug.c: Likewise.
* elf/dl-lookup.c: Likewise.
* elf/dl-sym.c: Likewise.
* elf/dl-version.c: Likewise.
* elf/do-lookup.h: Likewise.
* elf/rtld.c: Likewise.
* sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise.
* elf/dl-depsc: Likewise. Add new parameter to _dl_map_object.
* elf/dl-fini.c: Call destructors in all namespaces.
* elf/dl-iteratephdr.c: Compute total nloaded. Adjust for removal of
GL(dl_loaded).
* elf/dl-libc.c: Pass new parameter to _dl_open. Adjust for removal
of GL(dl_loaded).
* elf/dl-load.c (_dl_map_object_from_fd): Don't load ld.so a second
time. Reuse the one from the main namespace in all others.
Pass new parameter to _dl_new_object.
Adjust for removal of GL(dl_loaded).
* elf/dl-object.c: Take new parameter. Use it to initialize l_ns.
Adjust for removal of GL(dl_loaded).
* elf/dl-open.c (_dl_open): Take new parameter.
Adjust for removal of GL(dl_loaded).
* elf/dl-support.c: Replace global _dl_loaded etc variables with
_dl_ns variable.
* include/dlfcn.h: Adjust prototype of _dl_open.
Define __LM_ID_CALLER.
* include/link.h: Add l_real, l_ns, and l_direct_opencount elements.
* sysdeps/generic/dl-tls.c: Bump TLS_STATIC_SURPLUS. Since libc is
using TLS we need memory appropriate to the number of namespaces.
* sysdeps/generic/ldsodefs.h (struct rtld_global): Replace _dl_loaded,
_dl_nloaded, _dl_global_scope, _dl_main_searchlist, and
_dl_global_scope_alloc with _dl_ns element. Define DL_NNS.
Adjust prototypes of _dl_map_object and member in rtld_global_ro.
* malloc/malloc.c: Include <dlfcn.h>.
* malloc/arena.c (ptmalloc_init): If libc is not in primary namespace,
never use brk.
* elf/Makefile: Add rules to build and run tst-dlmopen1 and
tst-dlmopen2.
* elf/tst-dlmopen1.c: New file.
* elf/tst-dlmopen1mod.c: New file.
* elf/tst-dlmopen2.c: New file.
* elf/dl-close.c: Improve reference counting by tracking direct loads.
* elf/dl-lookup.c (add_dependency): Likewise.
* elf/dl-open.c (dl_open_worker): Likewise.
* elf/rtld.c (dl_main): Likewise.
2004-09-09 GOTO Masanori <gotom@debian.or.jp>
[BZ #77]
* elf/dl-close.c: Count down l_opencount to check not only for
l_reldeps, but also l_initfini.
2004-10-13 Ulrich Drepper <drepper@redhat.com>
2004-10-14 02:08:23 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-dlmopen1.out: $(objpfx)tst-dlmopen1mod.so
|
|
|
|
|
|
|
|
$(objpfx)tst-dlmopen2.out: $(objpfx)tst-dlmopen1mod.so
|
2004-10-27 20:27:40 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-dlmopen3.out: $(objpfx)tst-dlmopen1mod.so
|
2005-01-06 22:40:27 +00:00
|
|
|
|
2021-08-18 02:35:48 +00:00
|
|
|
$(objpfx)tst-dlmopen4.out: $(objpfx)tst-dlmopen1mod.so
|
|
|
|
|
2005-01-06 22:40:27 +00:00
|
|
|
$(objpfx)tst-audit1.out: $(objpfx)tst-auditmod1.so
|
|
|
|
tst-audit1-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so
|
2005-03-03 08:24:29 +00:00
|
|
|
|
Make sure that calloc is called at least once
PLT relocations aren't required when -z now used. Linker on master with:
commit 25070364b0ce33eed46aa5d78ebebbec6accec7e
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sat May 16 07:00:21 2015 -0700
Don't generate PLT relocations for now binding
There is no need for PLT relocations with -z now. We can use GOT
relocations, which take less space, instead and replace 16-byte .plt
entres with 8-byte .plt.got entries.
bfd/
* elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
for now binding.
(elf_i386_allocate_dynrelocs): Use .plt.got section for now
binding.
* elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
section for now binding.
(elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
binding.
won't generate PLT relocations with -z now. elf/tst-audit2.c expect
certain order of execution in ld.so. With PLT relocations, the GOTPLT
entry of calloc is update to calloc defined in tst-audit2:
(gdb) bt
skip_ifunc=<optimized out>, reloc_addr_arg=<optimized out>,
version=<optimized out>, sym=<optimized out>, map=<optimized out>)
at ../sysdeps/i386/dl-machine.h:329
out>,
nrelative=<optimized out>, relsize=<optimized out>,
reladdr=<optimized out>, map=<optimized out>) at do-rel.h:137
reloc_mode=reloc_mode@entry=0,
consider_profiling=1, consider_profiling@entry=0) at dl-reloc.c:258
user_entry=0xffffcf1c, auxv=0xffffd0a8) at rtld.c:2133
start_argptr=start_argptr@entry=0xffffcfb0,
dl_main=dl_main@entry=0xf7fda6f0 <dl_main>) at
../elf/dl-sysdep.c:249
from /export/build/gnu/glibc-32bit/build-i686-linux/elf/ld.so
(gdb)
and then calloc is called:
(gdb) c
Continuing.
Breakpoint 4, calloc (n=n@entry=20, m=4) at tst-audit2.c:18
18 {
(gdb) bt
reloc_mode=reloc_mode@entry=0, consider_profiling=1,
consider_profiling@entry=0) at dl-reloc.c:272
user_entry=0xffffcf1c, auxv=0xffffd0a8) at rtld.c:2133
start_argptr=start_argptr@entry=0xffffcfb0,
dl_main=dl_main@entry=0xf7fda6f0 <dl_main>) at
../elf/dl-sysdep.c:249
from /export/build/gnu/glibc-32bit/build-i686-linux/elf/ld.so
(gdb)
With GOT relocation, calloc in ld.so is called first:
(gdb) bt
consider_profiling=1) at dl-reloc.c:272
user_entry=0xffffcf0c, auxv=0xffffd098) at rtld.c:2074
start_argptr=start_argptr@entry=0xffffcfa0,
dl_main=dl_main@entry=0xf7fda6c0 <dl_main>) at
../elf/dl-sysdep.c:249
from /export/build/gnu/glibc-32bit-test/build-i686-linux/elf/ld.so
(gdb)
and then the GOT entry of calloc is updated:
(gdb) bt
skip_ifunc=<optimized out>, reloc_addr_arg=<optimized out>,
version=<optimized out>, sym=<optimized out>, map=<optimized out>)
at ../sysdeps/i386/dl-machine.h:329
out>,
nrelative=<optimized out>, relsize=<optimized out>,
reladdr=<optimized out>, map=<optimized out>) at do-rel.h:137
reloc_mode=reloc_mode@entry=0,
consider_profiling=1, consider_profiling@entry=0) at dl-reloc.c:258
user_entry=0xffffcf0c, auxv=0xffffd098) at rtld.c:2133
start_argptr=start_argptr@entry=0xffffcfa0,
dl_main=dl_main@entry=0xf7fda6c0 <dl_main>) at
../elf/dl-sysdep.c:249
from /export/build/gnu/glibc-32bit-test/build-i686-linux/elf/ld.so
(gdb)
After that, since calloc isn't called from ld.so nor any other modules,
magic in tst-audit2 isn't updated. Both orders are correct. This patch
makes sure that calloc in tst-audit2.c is called at least once from ld.so.
[BZ #18422]
* Makefile ($(objpfx)tst-audit2): Depend on $(libdl).
($(objpfx)tst-audit2.out): Also depend on
$(objpfx)tst-auditmod9b.so.
* elf/tst-audit2.c: Include <dlfcn.h>.
(calloc_called): New.
(calloc): Allow to be called more than once.
(do_test): dllopen/dlclose $ORIGIN/tst-auditmod9b.so.
2015-05-28 12:06:27 +00:00
|
|
|
$(objpfx)tst-audit2.out: $(objpfx)tst-auditmod1.so $(objpfx)tst-auditmod9b.so
|
2015-01-22 16:54:21 +00:00
|
|
|
# Prevent GCC-5 from translating a malloc/memset pair into calloc
|
|
|
|
CFLAGS-tst-audit2.c += -fno-builtin
|
2006-03-19 07:48:05 +00:00
|
|
|
tst-audit2-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so
|
|
|
|
|
2014-02-25 18:00:36 +00:00
|
|
|
$(objpfx)tst-audit9.out: $(objpfx)tst-auditmod9a.so $(objpfx)tst-auditmod9b.so
|
|
|
|
tst-audit9-ENV = LD_AUDIT=$(objpfx)tst-auditmod9a.so
|
|
|
|
|
Use existing makefile variables for dependencies on glibc libraries.
glibc's Makeconfig defines some variables such as $(libm) and $(libdl)
for linking with libraries built by glibc, and nptl/Makeconfig
(included by the toplevel Makeconfig) defines others such as
$(shared-thread-library).
In some places glibc's Makefiles use those variables when linking
against the relevant libraries, but in other places they hardcode the
location of the libraries in the build tree. This patch cleans up
various places to use the variables that already exist (in the case of
libm, replacing several duplicate definitions of a $(link-libm)
variable in subdirectory Makefiles). (It's not necessarily exactly
equivalent to what the existing code does - in particular,
$(shared-thread-library) includes libpthread_nonshared, but is
replacing places that just referred to libpthread.so. But I think
that change is desirable on the general principle of linking things as
close as possible to the way in which they would be linked with an
installed library, unless there is a clear reason not to do so.)
To support running tests with an installed copy of glibc without
needing the full build tree from when that copy was built, I think it
will be useful to use such variables more generally and systematically
- every time the rules for building a test refer to some file from the
build tree that's also installed by glibc, use a makefile variable so
that the installed-testing case can point those variables to installed
copies of the files. This patch just deals with straightforward cases
where such variables already exist.
It's quite possible some uses of $(shared-thread-library) should
actually be a new $(thread-library) variable that's set appropriately
in the --disable-shared case, if those uses would in fact work without
shared libraries. I didn't change the status quo that those cases
hardcode use of a shared library whether or not it's actually needed
(but other uses such as $(libm) and $(libdl) would now get the static
library if the shared library isn't built, when some previously
hardcoded use of the shared library - if they actually need shared
libraries, the test itself needs an enable-shared conditional anyway).
Tested x86_64.
* benchtests/Makefile
($(addprefix $(objpfx)bench-,$(bench-math))): Depend on $(libm),
not $(common-objpfx)math/libm.so.
($(addprefix $(objpfx)bench-,$(bench-pthread))): Depend on
$(shared-thread-library), not $(common-objpfx)nptl/libpthread.so.
* elf/Makefile ($(objpfx)noload): Depend on $(libdl), not
$(common-objpfx)dlfcn/libdl.so.
($(objpfx)tst-audit8): Depend on $(libm), not
$(common-objpfx)math/libm.so.
* malloc/Makefile ($(objpfx)libmemusage.so): Depend on $(libdl),
not $(common-objpfx)dlfcn/libdl.so.
* math/Makefile
($(addprefix $(objpfx),$(filter-out $(tests-static),$(tests)))):
Depend on $(libm), not $(objpfx)libm.so. Do not condition on
[$(build-shared) = yes].
($(objpfx)test-fenv-tls): Depend on $(shared-thread-library), not
$(common-objpfx)nptl/libpthread.so.
* misc/Makefile ($(objpfx)tst-tsearch): Depend on $(libm), not
$(common-objpfx)math/libm.so$(libm.so-version) or
$(common-objpfx)math/libm.a depending on [$(build-shared) = yes].
* nptl/Makefile ($(objpfx)tst-unload): Depend on $(libdl), not
$(common-objpfx)dlfcn/libdl.so.
* setjmp/Makefile (link-libm): Remove variable.
($(objpfx)tst-setjmp-fp): Depend on $(libm), not $(link-libm).
* stdio-common/Makefile (link-libm): Remove variable.
($(objpfx)tst-printf-round): Depend on $(libm), not $(link-libm).
* stdlib/Makefile (link-libm): Remove variable.
($(objpfx)bug-getcontext): Depend on $(libm), not $(link-libm).
($(objpfx)tst-strtod-round): Likewise.
($(objpfx)tst-tininess): Likewise.
($(objpfx)tst-strtod-underflow): Likewise.
($(objpfx)tst-strtod6): Likewise.
($(objpfx)tst-tls-atexit): Depend on $(shared-thread-library) and
$(libdl), not $(common-objpfx)nptl/libpthread.so and
$(common-objpfx)dlfcn/libdl.so.
2014-05-16 21:38:08 +00:00
|
|
|
$(objpfx)tst-audit8: $(libm)
|
2012-11-14 23:44:40 +00:00
|
|
|
$(objpfx)tst-audit8.out: $(objpfx)tst-auditmod1.so
|
|
|
|
tst-audit8-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so
|
|
|
|
|
2005-03-03 08:24:29 +00:00
|
|
|
$(objpfx)tst-global1.out: $(objpfx)testobj6.so $(objpfx)testobj2.so
|
2005-03-19 08:04:37 +00:00
|
|
|
|
2021-10-15 13:33:05 +00:00
|
|
|
$(objpfx)tst-global2: $(objpfx)tst-globalmod2.so
|
|
|
|
$(objpfx)tst-global2.out: $(objpfx)reldepmod1.so $(objpfx)reldepmod4.so
|
|
|
|
LDFLAGS-tst-global2 = -Wl,--enable-new-dtags
|
|
|
|
LDFLAGS-tst-globalmod2.so = -Wl,--enable-new-dtags
|
|
|
|
|
Split up rules for tests that compare output with baselines.
This patch splits makefile rules that generate a file then run cmp to
check the contents of that file into separate rules to generate and
compare the file. This simplifies making those tests generate PASS /
FAIL results, by removing the need to insert && between commands in
the test so that a $(evaluate-test) call is reached. It also avoids
the oddity of the .out file being an intermediate file rather than the
final result generated, as noted for some of these tests in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.
In many cases, the rule to run the program was no longer needed
because the default rules for running test programs on the host to
generate a .out file sufficed. (I'm not asserting the commands run
after this patch are *exactly* the same as before, simply that the
rules did nothing special that appeared deliberate or relevant to
anything about what the tests were testing. In cases where the rules
redirected stderr as well as stdout, I left the existing rule's
redirection in place to avoid changing what gets compared with the
expected results.)
It's clear there is a lot in common between the various -cmp.out rules
and it might be possible in future to refactor them into more generic
support for the case of comparing test output against a baseline.
(Some baselines are *.exp, some *.expect, some directly embedded in
the makefiles, and nptl/tst-cleanupx0.expect appears unused.)
Tested x86_64.
* elf/Makefile ($(objpfx)order.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order-cmp.out.
($(objpfx)order-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out,
$(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out,
$(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and
$(objpfx)tst-array5-static-cmp.out.
($(objpfx)tst-array1.out): Remove rule.
($(objpfx)tst-array1-cmp.out): New rule.
($(objpfx)tst-array1-static.out): Remove rule.
($(objpfx)tst-array1-static-cmp.out): New rule.
($(objpfx)tst-array2.out): Remove rule.
($(objpfx)tst-array2-cmp.out): New rule.
($(objpfx)tst-array3.out): Remove rule.
($(objpfx)tst-array3-cmp.out): New rule.
($(objpfx)tst-array4.out): Remove rule.
($(objpfx)tst-array4-cmp.out): New rule.
($(objpfx)tst-array5.out): Remove rule.
($(objpfx)tst-array5-cmp.out): New rule.
($(objpfx)tst-array5-static.out): Remove rule.
($(objpfx)tst-array5-static-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order2-cmp.out.
($(objpfx)order2.out): Remove rule.
($(objpfx)order2-cmp.out): New rule.
($(objpfx)tst-initorder.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder-cmp.out.
($(objpfx)tst-initorder-cmp.out): New rule.
($(objpfx)tst-initorder2.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder2-cmp.out.
($(objpfx)tst-initorder2-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-unused-dep-cmp.out.
($(objpfx)tst-unused-dep-cmp.out): Do not run cmp.
($(objpfx)tst-unused-dep-cmp.out): New rule.
* stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend
on $(objpfx)tst-setvbuf1-cmp.out.
($(objpfx)tst-setvbuf1.out): Do not run cmp.
($(objpfx)tst-setvbuf1-cmp.out): New rule.
* string/Makefile [$(run-built-tests) = yes] (tests): Depend
$(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out.
($(objpfx)tst-svc.out): Remove rule.
($(objpfx)tst-svc-cmp.out): New rule.
nptl:
* Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-cleanup0-cmp.out.
($(objpfx)tst-cleanup0-cmp.out): New rule.
2014-02-14 13:42:44 +00:00
|
|
|
$(objpfx)order2.out: $(objpfx)order2mod1.so $(objpfx)order2mod2.so
|
|
|
|
$(objpfx)order2-cmp.out: $(objpfx)order2.out
|
2014-02-21 21:48:08 +00:00
|
|
|
(echo "12345" | cmp $< -) > $@; \
|
|
|
|
$(evaluate-test)
|
2005-03-19 08:04:37 +00:00
|
|
|
$(objpfx)order2mod1.so: $(objpfx)order2mod4.so
|
|
|
|
$(objpfx)order2mod4.so: $(objpfx)order2mod3.so
|
|
|
|
$(objpfx)order2mod2.so: $(objpfx)order2mod3.so
|
|
|
|
order2mod2.so-no-z-defs = yes
|
2019-12-03 09:58:52 +00:00
|
|
|
LDFLAGS-order2mod1.so = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-order2mod2.so = -Wl,--no-as-needed
|
2005-06-26 18:14:26 +00:00
|
|
|
|
2013-01-11 15:14:18 +00:00
|
|
|
tst-stackguard1-ARGS = --command "$(host-test-program-cmd) --child"
|
2005-06-26 18:14:26 +00:00
|
|
|
tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
|
2006-03-15 19:26:13 +00:00
|
|
|
|
2013-09-23 04:52:09 +00:00
|
|
|
tst-ptrguard1-ARGS = --command "$(host-test-program-cmd) --child"
|
2013-09-23 05:44:38 +00:00
|
|
|
# When built statically, the pointer guard interface uses
|
|
|
|
# __pointer_chk_guard_local.
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-tst-ptrguard1-static.c += -DPTRGUARD_LOCAL
|
2013-09-23 04:52:09 +00:00
|
|
|
tst-ptrguard1-static-ARGS = --command "$(objpfx)tst-ptrguard1-static --child"
|
|
|
|
|
2014-03-07 03:29:23 +00:00
|
|
|
$(objpfx)tst-leaks1-mem.out: $(objpfx)tst-leaks1.out
|
2014-02-21 21:48:08 +00:00
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1.mtrace > $@; \
|
|
|
|
$(evaluate-test)
|
2006-03-15 19:26:13 +00:00
|
|
|
|
2021-07-22 13:07:59 +00:00
|
|
|
tst-leaks1-ENV = MALLOC_TRACE=$(objpfx)tst-leaks1.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2006-08-24 20:21:08 +00:00
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-thrlock: $(shared-thread-library)
|
2021-07-08 08:09:19 +00:00
|
|
|
$(objpfx)tst-thrlock.out: $(libm)
|
|
|
|
$(objpfx)tst-noload.out: $(libm)
|
2019-10-04 19:23:51 +00:00
|
|
|
|
2019-10-17 06:51:21 +00:00
|
|
|
tst-tst-dlopen-tlsmodid-no-pie = yes
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-dlopen-tlsmodid: $(shared-thread-library)
|
2019-10-17 06:51:21 +00:00
|
|
|
$(objpfx)tst-dlopen-tlsmodid.out: $(objpfx)tst-dlopen-self
|
|
|
|
CFLAGS-tst-dlopen-tlsmodid-pie.c += $(pie-ccflag)
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-dlopen-tlsmodid-pie: $(shared-thread-library)
|
2019-10-17 06:51:21 +00:00
|
|
|
$(objpfx)tst-dlopen-tlsmodid-pie.out: $(objpfx)tst-dlopen-self-pie
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-dlopen-tlsmodid-container: $(shared-thread-library)
|
2019-10-17 06:51:21 +00:00
|
|
|
LDFLAGS-tst-dlopen-tlsmodid-container += -Wl,-rpath,\$$ORIGIN
|
|
|
|
|
|
|
|
tst-tst-dlopen-self-no-pie = yes
|
|
|
|
CFLAGS-tst-dlopen-self-pie.c += $(pie-ccflag)
|
|
|
|
LDFLAGS-tst-dlopen-self-container += -Wl,-rpath,\$$ORIGIN
|
2009-06-03 23:21:40 +00:00
|
|
|
|
|
|
|
CFLAGS-ifuncmain1pic.c += $(pic-ccflag)
|
|
|
|
CFLAGS-ifuncmain1picstatic.c += $(pic-ccflag)
|
|
|
|
CFLAGS-ifuncmain1staticpic.c += $(pic-ccflag)
|
|
|
|
CFLAGS-ifuncdep1pic.c += $(pic-ccflag)
|
|
|
|
CFLAGS-ifuncmain1vispic.c += $(pic-ccflag)
|
|
|
|
CFLAGS-ifuncmain2pic.c += $(pic-ccflag)
|
|
|
|
CFLAGS-ifuncmain2picstatic.c += $(pic-ccflag)
|
|
|
|
CFLAGS-ifuncdep2pic.c += $(pic-ccflag)
|
|
|
|
CFLAGS-ifuncmain4picstatic.c += $(pic-ccflag)
|
2009-06-22 22:07:40 +00:00
|
|
|
CFLAGS-ifuncmain5pic.c += $(pic-ccflag)
|
|
|
|
CFLAGS-ifuncmain5picstatic.c += $(pic-ccflag)
|
|
|
|
CFLAGS-ifuncmain5staticpic.c += $(pic-ccflag)
|
|
|
|
CFLAGS-ifuncdep5pic.c += $(pic-ccflag)
|
|
|
|
CFLAGS-ifuncmain7pic.c += $(pic-ccflag)
|
|
|
|
CFLAGS-ifuncmain7picstatic.c += $(pic-ccflag)
|
2019-02-28 10:52:44 +00:00
|
|
|
CFLAGS-ifuncmain9pic.c += $(pic-ccflag)
|
|
|
|
CFLAGS-ifuncmain9picstatic.c += $(pic-ccflag)
|
2009-06-03 23:21:40 +00:00
|
|
|
|
|
|
|
LDFLAGS-ifuncmain3 = -Wl,-export-dynamic
|
|
|
|
|
|
|
|
CFLAGS-ifuncmain1pie.c += $(pie-ccflag)
|
|
|
|
CFLAGS-ifuncmain1vispie.c += $(pie-ccflag)
|
2009-06-22 22:07:40 +00:00
|
|
|
CFLAGS-ifuncmain1staticpie.c += $(pie-ccflag)
|
|
|
|
CFLAGS-ifuncmain5pie.c += $(pie-ccflag)
|
|
|
|
CFLAGS-ifuncmain6pie.c += $(pie-ccflag)
|
|
|
|
CFLAGS-ifuncmain7pie.c += $(pie-ccflag)
|
2019-02-28 10:52:44 +00:00
|
|
|
CFLAGS-ifuncmain9pie.c += $(pie-ccflag)
|
Fix ifunc support with DT_TEXTREL segments (BZ#20480)
Currently, DT_TEXTREL is incompatible with IFUNC. When DT_TEXTREL or
DF_TEXTREL is seen, the dynamic linker calls __mprotect on the segments
with PROT_READ|PROT_WRITE before applying dynamic relocations. It leads
to segfault when performing IFUNC resolution (which requires PROT_EXEC
as well for the IFUNC resolver).
This patch makes it call __mprotect with extra PROT_WRITE bit, which
will keep the PROT_EXEC bit if exists, and thus fixes the segfault.
FreeBSD rtld libexec/rtld-elf/rtld.c (reloc_textrel_prot) does the same.
Checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu,
sparc64-linux-gnu, sparcv9-linux-gnu, and armv8-linux-gnueabihf.
Adam J. Richte <adam_richter2004@yahoo.com>
Adhemerval Zanella <adhemerval.zanella@linaro.org>
Fangrui Song <maskray@google.com>
[BZ #20480]
* config.h.in (CAN_TEXTREL_IFUNC): New define.
* configure.ac: Add check if linker supports textrel relocation with
ifunc.
* elf/dl-reloc.c (_dl_relocate_object): Use all required flags on
DT_TEXTREL segments, not only PROT_READ and PROT_WRITE.
* elf/Makefile (ifunc-pie-tests): Add tst-ifunc-textrel.
(CFLAGS-tst-ifunc-textrel.c): New rule.
* elf/tst-ifunc-textrel.c: New file.
2018-08-27 19:16:43 +00:00
|
|
|
CFLAGS-tst-ifunc-textrel.c += $(pic-ccflag)
|
2009-06-03 23:21:40 +00:00
|
|
|
|
2021-01-04 22:25:39 +00:00
|
|
|
LDFLAGS-ifuncmain6pie = -Wl,-z,lazy
|
|
|
|
|
2011-05-14 03:31:43 +00:00
|
|
|
$(objpfx)ifuncmain1pie: $(objpfx)ifuncmod1.so
|
|
|
|
$(objpfx)ifuncmain1staticpie: $(objpfx)ifuncdep1pic.o
|
|
|
|
$(objpfx)ifuncmain1vispie: $(objpfx)ifuncmod1.so
|
|
|
|
$(objpfx)ifuncmain5pie: $(objpfx)ifuncmod5.so
|
|
|
|
$(objpfx)ifuncmain6pie: $(objpfx)ifuncmod6.so
|
2009-06-03 23:21:40 +00:00
|
|
|
|
|
|
|
$(objpfx)ifuncmain1: $(addprefix $(objpfx),ifuncmod1.so)
|
|
|
|
$(objpfx)ifuncmain1pic: $(addprefix $(objpfx),ifuncmod1.so)
|
|
|
|
$(objpfx)ifuncmain1staticpic: $(addprefix $(objpfx),ifuncdep1pic.o)
|
|
|
|
$(objpfx)ifuncmain1static: $(addprefix $(objpfx),ifuncdep1.o)
|
|
|
|
$(objpfx)ifuncmain1picstatic: $(addprefix $(objpfx),ifuncdep1pic.o)
|
|
|
|
$(objpfx)ifuncmain1vis: $(addprefix $(objpfx),ifuncmod1.so)
|
|
|
|
$(objpfx)ifuncmain1vispic: $(addprefix $(objpfx),ifuncmod1.so)
|
|
|
|
$(objpfx)ifuncmain2: $(addprefix $(objpfx),ifuncdep2.o)
|
|
|
|
$(objpfx)ifuncmain2pic: $(addprefix $(objpfx),ifuncdep2pic.o)
|
|
|
|
$(objpfx)ifuncmain2static: $(addprefix $(objpfx),ifuncdep2.o)
|
|
|
|
$(objpfx)ifuncmain2picstatic: $(addprefix $(objpfx),ifuncdep2pic.o)
|
|
|
|
|
|
|
|
$(objpfx)ifuncmain3.out: $(objpfx)ifuncmod3.so
|
2009-06-22 22:07:40 +00:00
|
|
|
|
|
|
|
$(objpfx)ifuncmain5: $(addprefix $(objpfx),ifuncmod5.so)
|
|
|
|
$(objpfx)ifuncmain5pic: $(addprefix $(objpfx),ifuncmod5.so)
|
|
|
|
$(objpfx)ifuncmain5static: $(addprefix $(objpfx),ifuncdep5.o)
|
|
|
|
$(objpfx)ifuncmain5staticpic: $(addprefix $(objpfx),ifuncdep5pic.o)
|
|
|
|
$(objpfx)ifuncmain5picstatic: $(addprefix $(objpfx),ifuncdep5pic.o)
|
2009-07-10 06:52:22 +00:00
|
|
|
|
2019-11-29 16:55:22 +00:00
|
|
|
LDFLAGS-tst-ifunc-fault-lazy = -Wl,-z,lazy
|
|
|
|
LDFLAGS-tst-ifunc-fault-bindnow = -Wl,-z,now
|
|
|
|
define tst-ifunc-fault-script
|
2020-01-23 14:34:16 +00:00
|
|
|
( $(test-wrapper) $(rtld-prefix) --verify $^ \
|
|
|
|
&& $(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1 $(rtld-prefix) $^ \
|
|
|
|
&& $(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1 LD_DEBUG=unused \
|
|
|
|
$(rtld-prefix) $^ \
|
2019-11-29 16:55:22 +00:00
|
|
|
) > $@; $(evaluate-test)
|
|
|
|
endef
|
|
|
|
$(objpfx)tst-ifunc-fault-lazy.out: $(objpfx)tst-ifunc-fault-lazy $(objpfx)ld.so
|
|
|
|
$(tst-ifunc-fault-script)
|
|
|
|
$(objpfx)tst-ifunc-fault-bindnow.out: $(objpfx)tst-ifunc-fault-bindnow \
|
|
|
|
$(objpfx)ld.so
|
|
|
|
$(tst-ifunc-fault-script)
|
|
|
|
|
2009-07-10 06:52:22 +00:00
|
|
|
$(objpfx)tst-unique1.out: $(objpfx)tst-unique1mod1.so \
|
|
|
|
$(objpfx)tst-unique1mod2.so
|
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-unique2: $(objpfx)tst-unique2mod1.so
|
2009-07-10 06:52:22 +00:00
|
|
|
$(objpfx)tst-unique2.out: $(objpfx)tst-unique2mod2.so
|
2009-07-10 19:04:14 +00:00
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-unique3: $(objpfx)tst-unique3lib.so
|
2011-03-10 17:51:33 +00:00
|
|
|
$(objpfx)tst-unique3.out: $(objpfx)tst-unique3lib2.so
|
2011-03-10 08:18:21 +00:00
|
|
|
|
2011-05-13 01:59:09 +00:00
|
|
|
$(objpfx)tst-unique4: $(objpfx)tst-unique4lib.so
|
|
|
|
|
2015-07-07 15:45:46 +00:00
|
|
|
$(objpfx)tst-nodelete.out: $(objpfx)tst-nodelete-uniquemod.so \
|
|
|
|
$(objpfx)tst-nodelete-rtldmod.so \
|
|
|
|
$(objpfx)tst-nodelete-zmod.so
|
|
|
|
|
|
|
|
LDFLAGS-tst-nodelete = -rdynamic
|
|
|
|
LDFLAGS-tst-nodelete-zmod.so = -Wl,--enable-new-dtags,-z,nodelete
|
|
|
|
|
2015-08-10 07:47:54 +00:00
|
|
|
$(objpfx)tst-nodelete2.out: $(objpfx)tst-nodelete2mod.so
|
|
|
|
|
|
|
|
LDFLAGS-tst-nodelete2 = -rdynamic
|
|
|
|
|
Split up rules for tests that compare output with baselines.
This patch splits makefile rules that generate a file then run cmp to
check the contents of that file into separate rules to generate and
compare the file. This simplifies making those tests generate PASS /
FAIL results, by removing the need to insert && between commands in
the test so that a $(evaluate-test) call is reached. It also avoids
the oddity of the .out file being an intermediate file rather than the
final result generated, as noted for some of these tests in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.
In many cases, the rule to run the program was no longer needed
because the default rules for running test programs on the host to
generate a .out file sufficed. (I'm not asserting the commands run
after this patch are *exactly* the same as before, simply that the
rules did nothing special that appeared deliberate or relevant to
anything about what the tests were testing. In cases where the rules
redirected stderr as well as stdout, I left the existing rule's
redirection in place to avoid changing what gets compared with the
expected results.)
It's clear there is a lot in common between the various -cmp.out rules
and it might be possible in future to refactor them into more generic
support for the case of comparing test output against a baseline.
(Some baselines are *.exp, some *.expect, some directly embedded in
the makefiles, and nptl/tst-cleanupx0.expect appears unused.)
Tested x86_64.
* elf/Makefile ($(objpfx)order.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order-cmp.out.
($(objpfx)order-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out,
$(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out,
$(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and
$(objpfx)tst-array5-static-cmp.out.
($(objpfx)tst-array1.out): Remove rule.
($(objpfx)tst-array1-cmp.out): New rule.
($(objpfx)tst-array1-static.out): Remove rule.
($(objpfx)tst-array1-static-cmp.out): New rule.
($(objpfx)tst-array2.out): Remove rule.
($(objpfx)tst-array2-cmp.out): New rule.
($(objpfx)tst-array3.out): Remove rule.
($(objpfx)tst-array3-cmp.out): New rule.
($(objpfx)tst-array4.out): Remove rule.
($(objpfx)tst-array4-cmp.out): New rule.
($(objpfx)tst-array5.out): Remove rule.
($(objpfx)tst-array5-cmp.out): New rule.
($(objpfx)tst-array5-static.out): Remove rule.
($(objpfx)tst-array5-static-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order2-cmp.out.
($(objpfx)order2.out): Remove rule.
($(objpfx)order2-cmp.out): New rule.
($(objpfx)tst-initorder.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder-cmp.out.
($(objpfx)tst-initorder-cmp.out): New rule.
($(objpfx)tst-initorder2.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder2-cmp.out.
($(objpfx)tst-initorder2-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-unused-dep-cmp.out.
($(objpfx)tst-unused-dep-cmp.out): Do not run cmp.
($(objpfx)tst-unused-dep-cmp.out): New rule.
* stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend
on $(objpfx)tst-setvbuf1-cmp.out.
($(objpfx)tst-setvbuf1.out): Do not run cmp.
($(objpfx)tst-setvbuf1-cmp.out): New rule.
* string/Makefile [$(run-built-tests) = yes] (tests): Depend
$(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out.
($(objpfx)tst-svc.out): Remove rule.
($(objpfx)tst-svc-cmp.out): New rule.
nptl:
* Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-cleanup0-cmp.out.
($(objpfx)tst-cleanup0-cmp.out): New rule.
2014-02-14 13:42:44 +00:00
|
|
|
$(objpfx)tst-initorder-cmp.out: tst-initorder.exp $(objpfx)tst-initorder.out
|
2014-02-21 21:48:08 +00:00
|
|
|
cmp $^ > $@; \
|
|
|
|
$(evaluate-test)
|
2011-01-19 20:32:35 +00:00
|
|
|
|
2011-08-22 20:08:16 +00:00
|
|
|
$(objpfx)tst-initorder2: $(objpfx)tst-initorder2a.so $(objpfx)tst-initorder2d.so $(objpfx)tst-initorder2c.so
|
|
|
|
$(objpfx)tst-initorder2a.so: $(objpfx)tst-initorder2b.so
|
|
|
|
$(objpfx)tst-initorder2b.so: $(objpfx)tst-initorder2c.so
|
|
|
|
$(objpfx)tst-initorder2c.so: $(objpfx)tst-initorder2d.so
|
2019-12-03 09:58:52 +00:00
|
|
|
LDFLAGS-tst-initorder2 = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-tst-initorder2a.so = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-tst-initorder2b.so = -Wl,--no-as-needed
|
|
|
|
LDFLAGS-tst-initorder2c.so = -Wl,--no-as-needed
|
2011-08-22 20:08:16 +00:00
|
|
|
define o-iterator-doit
|
|
|
|
$(objpfx)tst-initorder2$o.os: tst-initorder2.c; \
|
|
|
|
$$(compile-command.c) -DNAME=\"$o\"
|
|
|
|
endef
|
|
|
|
object-suffixes-left := a b c d
|
|
|
|
include $(o-iterator)
|
|
|
|
|
Split up rules for tests that compare output with baselines.
This patch splits makefile rules that generate a file then run cmp to
check the contents of that file into separate rules to generate and
compare the file. This simplifies making those tests generate PASS /
FAIL results, by removing the need to insert && between commands in
the test so that a $(evaluate-test) call is reached. It also avoids
the oddity of the .out file being an intermediate file rather than the
final result generated, as noted for some of these tests in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.
In many cases, the rule to run the program was no longer needed
because the default rules for running test programs on the host to
generate a .out file sufficed. (I'm not asserting the commands run
after this patch are *exactly* the same as before, simply that the
rules did nothing special that appeared deliberate or relevant to
anything about what the tests were testing. In cases where the rules
redirected stderr as well as stdout, I left the existing rule's
redirection in place to avoid changing what gets compared with the
expected results.)
It's clear there is a lot in common between the various -cmp.out rules
and it might be possible in future to refactor them into more generic
support for the case of comparing test output against a baseline.
(Some baselines are *.exp, some *.expect, some directly embedded in
the makefiles, and nptl/tst-cleanupx0.expect appears unused.)
Tested x86_64.
* elf/Makefile ($(objpfx)order.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order-cmp.out.
($(objpfx)order-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out,
$(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out,
$(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and
$(objpfx)tst-array5-static-cmp.out.
($(objpfx)tst-array1.out): Remove rule.
($(objpfx)tst-array1-cmp.out): New rule.
($(objpfx)tst-array1-static.out): Remove rule.
($(objpfx)tst-array1-static-cmp.out): New rule.
($(objpfx)tst-array2.out): Remove rule.
($(objpfx)tst-array2-cmp.out): New rule.
($(objpfx)tst-array3.out): Remove rule.
($(objpfx)tst-array3-cmp.out): New rule.
($(objpfx)tst-array4.out): Remove rule.
($(objpfx)tst-array4-cmp.out): New rule.
($(objpfx)tst-array5.out): Remove rule.
($(objpfx)tst-array5-cmp.out): New rule.
($(objpfx)tst-array5-static.out): Remove rule.
($(objpfx)tst-array5-static-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order2-cmp.out.
($(objpfx)order2.out): Remove rule.
($(objpfx)order2-cmp.out): New rule.
($(objpfx)tst-initorder.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder-cmp.out.
($(objpfx)tst-initorder-cmp.out): New rule.
($(objpfx)tst-initorder2.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder2-cmp.out.
($(objpfx)tst-initorder2-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-unused-dep-cmp.out.
($(objpfx)tst-unused-dep-cmp.out): Do not run cmp.
($(objpfx)tst-unused-dep-cmp.out): New rule.
* stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend
on $(objpfx)tst-setvbuf1-cmp.out.
($(objpfx)tst-setvbuf1.out): Do not run cmp.
($(objpfx)tst-setvbuf1-cmp.out): New rule.
* string/Makefile [$(run-built-tests) = yes] (tests): Depend
$(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out.
($(objpfx)tst-svc.out): Remove rule.
($(objpfx)tst-svc-cmp.out): New rule.
nptl:
* Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-cleanup0-cmp.out.
($(objpfx)tst-cleanup0-cmp.out): New rule.
2014-02-14 13:42:44 +00:00
|
|
|
$(objpfx)tst-initorder2-cmp.out: tst-initorder2.exp $(objpfx)tst-initorder2.out
|
2014-02-21 21:48:08 +00:00
|
|
|
cmp $^ > $@; \
|
|
|
|
$(evaluate-test)
|
2011-08-22 20:08:16 +00:00
|
|
|
|
2012-01-27 20:05:19 +00:00
|
|
|
$(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so
|
|
|
|
$(objpfx)tst-relsort1mod2.so: $(libm)
|
|
|
|
$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
|
|
|
|
$(objpfx)tst-relsort1mod2.so
|
2012-02-29 14:28:38 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-unused-dep.out: $(objpfx)testobj1.so
|
2012-10-24 21:59:01 +00:00
|
|
|
$(test-wrapper-env) \
|
2012-02-29 14:28:38 +00:00
|
|
|
LD_TRACE_LOADED_OBJECTS=1 \
|
|
|
|
LD_DEBUG=unused \
|
|
|
|
LD_PRELOAD= \
|
2014-06-18 10:35:29 +00:00
|
|
|
$(rtld-prefix) \
|
2014-02-21 21:48:08 +00:00
|
|
|
$< > $@; \
|
|
|
|
$(evaluate-test)
|
Split up rules for tests that compare output with baselines.
This patch splits makefile rules that generate a file then run cmp to
check the contents of that file into separate rules to generate and
compare the file. This simplifies making those tests generate PASS /
FAIL results, by removing the need to insert && between commands in
the test so that a $(evaluate-test) call is reached. It also avoids
the oddity of the .out file being an intermediate file rather than the
final result generated, as noted for some of these tests in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.
In many cases, the rule to run the program was no longer needed
because the default rules for running test programs on the host to
generate a .out file sufficed. (I'm not asserting the commands run
after this patch are *exactly* the same as before, simply that the
rules did nothing special that appeared deliberate or relevant to
anything about what the tests were testing. In cases where the rules
redirected stderr as well as stdout, I left the existing rule's
redirection in place to avoid changing what gets compared with the
expected results.)
It's clear there is a lot in common between the various -cmp.out rules
and it might be possible in future to refactor them into more generic
support for the case of comparing test output against a baseline.
(Some baselines are *.exp, some *.expect, some directly embedded in
the makefiles, and nptl/tst-cleanupx0.expect appears unused.)
Tested x86_64.
* elf/Makefile ($(objpfx)order.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order-cmp.out.
($(objpfx)order-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out,
$(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out,
$(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and
$(objpfx)tst-array5-static-cmp.out.
($(objpfx)tst-array1.out): Remove rule.
($(objpfx)tst-array1-cmp.out): New rule.
($(objpfx)tst-array1-static.out): Remove rule.
($(objpfx)tst-array1-static-cmp.out): New rule.
($(objpfx)tst-array2.out): Remove rule.
($(objpfx)tst-array2-cmp.out): New rule.
($(objpfx)tst-array3.out): Remove rule.
($(objpfx)tst-array3-cmp.out): New rule.
($(objpfx)tst-array4.out): Remove rule.
($(objpfx)tst-array4-cmp.out): New rule.
($(objpfx)tst-array5.out): Remove rule.
($(objpfx)tst-array5-cmp.out): New rule.
($(objpfx)tst-array5-static.out): Remove rule.
($(objpfx)tst-array5-static-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)order2-cmp.out.
($(objpfx)order2.out): Remove rule.
($(objpfx)order2-cmp.out): New rule.
($(objpfx)tst-initorder.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder-cmp.out.
($(objpfx)tst-initorder-cmp.out): New rule.
($(objpfx)tst-initorder2.out): Remove rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-initorder2-cmp.out.
($(objpfx)tst-initorder2-cmp.out): New rule.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-unused-dep-cmp.out.
($(objpfx)tst-unused-dep-cmp.out): Do not run cmp.
($(objpfx)tst-unused-dep-cmp.out): New rule.
* stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend
on $(objpfx)tst-setvbuf1-cmp.out.
($(objpfx)tst-setvbuf1.out): Do not run cmp.
($(objpfx)tst-setvbuf1-cmp.out): New rule.
* string/Makefile [$(run-built-tests) = yes] (tests): Depend
$(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out.
($(objpfx)tst-svc.out): Remove rule.
($(objpfx)tst-svc-cmp.out): New rule.
nptl:
* Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
[$(run-built-tests) = yes] (tests): Depend on
$(objpfx)tst-cleanup0-cmp.out.
($(objpfx)tst-cleanup0-cmp.out): New rule.
2014-02-14 13:42:44 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-unused-dep-cmp.out: $(objpfx)tst-unused-dep.out
|
2014-02-21 21:48:08 +00:00
|
|
|
cmp $< /dev/null > $@; \
|
|
|
|
$(evaluate-test)
|
2015-11-09 15:52:31 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-audit11.out: $(objpfx)tst-auditmod11.so $(objpfx)tst-audit11mod1.so
|
|
|
|
tst-audit11-ENV = LD_AUDIT=$(objpfx)tst-auditmod11.so
|
|
|
|
$(objpfx)tst-audit11mod1.so: $(objpfx)tst-audit11mod2.so
|
|
|
|
LDFLAGS-tst-audit11mod2.so = -Wl,--version-script=tst-audit11mod2.map,-soname,tst-audit11mod2.so
|
|
|
|
|
|
|
|
$(objpfx)tst-audit12.out: $(objpfx)tst-auditmod12.so $(objpfx)tst-audit12mod1.so $(objpfx)tst-audit12mod3.so
|
|
|
|
tst-audit12-ENV = LD_AUDIT=$(objpfx)tst-auditmod12.so
|
|
|
|
$(objpfx)tst-audit12mod1.so: $(objpfx)tst-audit12mod2.so
|
|
|
|
LDFLAGS-tst-audit12mod2.so = -Wl,--version-script=tst-audit12mod2.map
|
2015-11-14 20:00:16 +00:00
|
|
|
|
2019-02-12 12:51:43 +00:00
|
|
|
$(objpfx)tst-audit13.out: $(objpfx)tst-audit13mod1.so
|
|
|
|
LDFLAGS-tst-audit13mod1.so = -Wl,-z,lazy
|
|
|
|
tst-audit13-ENV = LD_AUDIT=$(objpfx)tst-audit13mod1.so
|
|
|
|
|
2019-11-02 20:55:35 +00:00
|
|
|
$(objpfx)tst-auditmany.out: $(objpfx)tst-auditmanymod1.so \
|
|
|
|
$(objpfx)tst-auditmanymod2.so $(objpfx)tst-auditmanymod3.so \
|
|
|
|
$(objpfx)tst-auditmanymod4.so $(objpfx)tst-auditmanymod5.so \
|
|
|
|
$(objpfx)tst-auditmanymod6.so $(objpfx)tst-auditmanymod7.so \
|
|
|
|
$(objpfx)tst-auditmanymod8.so $(objpfx)tst-auditmanymod9.so
|
|
|
|
tst-auditmany-ENV = \
|
|
|
|
LD_AUDIT=tst-auditmanymod1.so:tst-auditmanymod2.so:tst-auditmanymod3.so:tst-auditmanymod4.so:tst-auditmanymod5.so:tst-auditmanymod6.so:tst-auditmanymod7.so:tst-auditmanymod8.so:tst-auditmanymod9.so
|
|
|
|
|
2021-10-15 17:44:49 +00:00
|
|
|
LDFLAGS-tst-audit14 = -Wl,--audit=tst-auditlogmod-1.so,--disable-new-dtags
|
2020-02-17 15:49:40 +00:00
|
|
|
$(objpfx)tst-auditlogmod-1.so: $(libsupport)
|
|
|
|
$(objpfx)tst-audit14.out: $(objpfx)tst-auditlogmod-1.so
|
2021-10-15 17:44:49 +00:00
|
|
|
LDFLAGS-tst-audit14a = -Wl,--audit=tst-auditlogmod-1.so,--enable-new-dtags
|
|
|
|
$(objpfx)tst-audit14a.out: $(objpfx)tst-auditlogmod-1.so
|
2020-02-17 15:49:40 +00:00
|
|
|
LDFLAGS-tst-audit15 = \
|
|
|
|
-Wl,--audit=tst-auditlogmod-1.so,--depaudit=tst-auditlogmod-2.so
|
|
|
|
$(objpfx)tst-auditlogmod-2.so: $(libsupport)
|
|
|
|
$(objpfx)tst-audit15.out: \
|
|
|
|
$(objpfx)tst-auditlogmod-1.so $(objpfx)tst-auditlogmod-2.so
|
|
|
|
LDFLAGS-tst-audit16 = \
|
|
|
|
-Wl,--audit=tst-auditlogmod-1.so:tst-auditlogmod-2.so \
|
|
|
|
-Wl,--depaudit=tst-auditlogmod-3.so
|
|
|
|
$(objpfx)tst-auditlogmod-3.so: $(libsupport)
|
|
|
|
$(objpfx)tst-audit16.out: \
|
|
|
|
$(objpfx)tst-auditlogmod-1.so $(objpfx)tst-auditlogmod-2.so \
|
|
|
|
$(objpfx)tst-auditlogmod-3.so
|
2021-06-30 03:21:18 +00:00
|
|
|
$(objpfx)tst-audit17.out: $(objpfx)tst-auditmod17.so
|
|
|
|
# The test check if a audit library without libc.so on DT_NEEDED works as
|
|
|
|
# intended, so it uses an explicit link rule.
|
|
|
|
$(objpfx)tst-auditmod17.so: $(objpfx)tst-auditmod17.os
|
|
|
|
$(CC) -nostdlib -nostartfiles -shared -o $@.new \
|
|
|
|
$(filter-out $(map-file),$^)
|
|
|
|
$(call after-link,$@.new)
|
|
|
|
mv -f $@.new $@
|
|
|
|
CFLAGS-.os += $(call elide-stack-protector,.os,tst-auditmod17)
|
|
|
|
tst-audit17-ENV = LD_AUDIT=$(objpfx)tst-auditmod17.so
|
2020-02-17 15:49:40 +00:00
|
|
|
|
2021-10-05 23:30:38 +00:00
|
|
|
$(objpfx)tst-audit14-cmp.out: tst-audit14.exp $(objpfx)tst-audit14.out
|
|
|
|
cmp $^ > $@; \
|
|
|
|
$(evaluate-test)
|
2021-10-15 17:44:49 +00:00
|
|
|
$(objpfx)tst-audit14a-cmp.out: tst-audit14.exp $(objpfx)tst-audit14a.out
|
|
|
|
cmp $^ > $@; \
|
|
|
|
$(evaluate-test)
|
2021-10-05 23:30:38 +00:00
|
|
|
$(objpfx)tst-audit15-cmp.out: tst-audit15.exp $(objpfx)tst-audit15.out
|
|
|
|
cmp $^ > $@; \
|
|
|
|
$(evaluate-test)
|
|
|
|
$(objpfx)tst-audit16-cmp.out: tst-audit16.exp $(objpfx)tst-audit16.out
|
|
|
|
cmp $^ > $@; \
|
|
|
|
$(evaluate-test)
|
|
|
|
|
2021-11-11 12:28:21 +00:00
|
|
|
$(objpfx)tst-audit18.out: $(objpfx)tst-auditmod18.so \
|
|
|
|
$(objpfx)tst-audit18mod.so
|
|
|
|
tst-audit18-ARGS = -- $(host-test-program-cmd)
|
2021-06-30 13:24:09 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-audit19a.out: $(objpfx)tst-auditmod19a.so
|
|
|
|
tst-audit19a-ENV = LD_AUDIT=$(objpfx)tst-auditmod19a.so
|
|
|
|
|
|
|
|
$(objpfx)tst-audit19b.out: $(objpfx)tst-auditmod19b.so
|
|
|
|
$(objpfx)tst-audit19b: $(objpfx)tst-audit19bmod.so
|
|
|
|
tst-audit19b-ARGS = -- $(host-test-program-cmd)
|
2021-07-19 21:42:26 +00:00
|
|
|
|
2021-06-30 20:33:57 +00:00
|
|
|
$(objpfx)tst-audit20.out: $(objpfx)tst-auditmod20.so
|
|
|
|
tst-audit20-ENV = LD_AUDIT=$(objpfx)tst-auditmod20.so
|
|
|
|
|
2022-01-24 13:46:16 +00:00
|
|
|
$(objpfx)tst-audit21: $(shared-thread-library)
|
|
|
|
$(objpfx)tst-audit21.out: $(objpfx)tst-auditmod21a.so
|
|
|
|
$(objpfx)tst-auditmod21a.so: $(objpfx)tst-auditmod21b.so
|
|
|
|
tst-audit21-ENV = LD_AUDIT=$(objpfx)tst-auditmod21a.so
|
|
|
|
|
2021-07-19 21:42:26 +00:00
|
|
|
$(objpfx)tst-audit22.out: $(objpfx)tst-auditmod22.so
|
|
|
|
tst-audit22-ARGS = -- $(host-test-program-cmd)
|
2021-11-11 12:28:21 +00:00
|
|
|
|
2022-01-24 13:46:15 +00:00
|
|
|
$(objpfx)tst-audit23.out: $(objpfx)tst-auditmod23.so \
|
|
|
|
$(objpfx)tst-audit23mod.so
|
|
|
|
tst-audit23-ARGS = -- $(host-test-program-cmd)
|
|
|
|
|
2022-01-24 13:46:17 +00:00
|
|
|
$(objpfx)tst-audit24a.out: $(objpfx)tst-auditmod24a.so
|
|
|
|
$(objpfx)tst-audit24a: $(objpfx)tst-audit24amod1.so \
|
|
|
|
$(objpfx)tst-audit24amod2.so
|
|
|
|
tst-audit24a-ENV = LD_AUDIT=$(objpfx)tst-auditmod24a.so
|
|
|
|
LDFLAGS-tst-audit24a = -Wl,-z,now
|
|
|
|
|
|
|
|
$(objpfx)tst-audit24b.out: $(objpfx)tst-auditmod24b.so
|
|
|
|
$(objpfx)tst-audit24b: $(objpfx)tst-audit24bmod1.so \
|
|
|
|
$(objpfx)tst-audit24bmod2.so
|
|
|
|
$(objpfx)tst-audit24bmod1: $(objpfx)tst-audit24bmod2.so
|
|
|
|
# The test checks if a library without .gnu.version correctly calls the
|
|
|
|
# audit callbacks. So it uses an explicit link rule to avoid linking
|
|
|
|
# against libc.so.
|
|
|
|
$(objpfx)tst-audit24bmod1.so: $(objpfx)tst-audit24bmod1.os
|
|
|
|
$(CC) -nostdlib -nostartfiles -shared -o $@.new $(objpfx)tst-audit24bmod1.os \
|
|
|
|
-Wl,-z,now
|
|
|
|
$(call after-link,$@.new)
|
|
|
|
mv -f $@.new $@
|
|
|
|
CFLAGS-.os += $(call elide-stack-protector,.os,tst-audit24bmod1)
|
|
|
|
$(objpfx)tst-audit24bmod2.so: $(objpfx)tst-audit24bmod2.os
|
|
|
|
$(CC) -nostdlib -nostartfiles -shared -o $@.new $(objpfx)tst-audit24bmod2.os
|
|
|
|
$(call after-link,$@.new)
|
|
|
|
mv -f $@.new $@
|
|
|
|
CFLAGS-.os += $(call elide-stack-protector,.os,tst-audit24bmod2)
|
|
|
|
tst-audit24b-ENV = LD_AUDIT=$(objpfx)tst-auditmod24b.so
|
|
|
|
LDFLAGS-tst-audit24b = -Wl,-z,now
|
|
|
|
|
|
|
|
# Same as tst-audit24a, but tests LD_BIND_NOW
|
|
|
|
$(objpfx)tst-audit24c.out: $(objpfx)tst-auditmod24c.so
|
|
|
|
$(objpfx)tst-audit24c: $(objpfx)tst-audit24amod1.so \
|
|
|
|
$(objpfx)tst-audit24amod2.so
|
|
|
|
tst-audit24c-ENV = LD_BIND_NOW=1 LD_AUDIT=$(objpfx)tst-auditmod24c.so
|
2022-02-04 18:54:59 +00:00
|
|
|
LDFLAGS-tst-audit24c = -Wl,-z,lazy
|
2022-01-24 13:46:17 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-audit24d.out: $(objpfx)tst-auditmod24d.so
|
|
|
|
$(objpfx)tst-audit24d: $(objpfx)tst-audit24dmod1.so \
|
|
|
|
$(objpfx)tst-audit24dmod2.so
|
|
|
|
$(objpfx)tst-audit24dmod1.so: $(objpfx)tst-audit24dmod3.so
|
|
|
|
LDFLAGS-tst-audit24dmod1.so = -Wl,-z,now
|
|
|
|
$(objpfx)tst-audit24dmod2.so: $(objpfx)tst-audit24dmod4.so
|
|
|
|
LDFLAGS-tst-audit24dmod2.so = -Wl,-z,lazy
|
|
|
|
tst-audit24d-ENV = LD_AUDIT=$(objpfx)tst-auditmod24d.so
|
|
|
|
LDFLAGS-tst-audit24d = -Wl,-z,lazy
|
|
|
|
|
|
|
|
$(objpfx)tst-audit25a.out: $(objpfx)tst-auditmod25.so
|
|
|
|
$(objpfx)tst-audit25a: $(objpfx)tst-audit25mod1.so \
|
|
|
|
$(objpfx)tst-audit25mod2.so \
|
|
|
|
$(objpfx)tst-audit25mod3.so \
|
|
|
|
$(objpfx)tst-audit25mod4.so
|
2022-02-02 14:03:58 +00:00
|
|
|
LDFLAGS-tst-audit25a = -Wl,-z,lazy
|
2022-01-24 13:46:17 +00:00
|
|
|
$(objpfx)tst-audit25mod1.so: $(objpfx)tst-audit25mod3.so
|
|
|
|
LDFLAGS-tst-audit25mod1.so = -Wl,-z,now
|
|
|
|
$(objpfx)tst-audit25mod2.so: $(objpfx)tst-audit25mod4.so
|
|
|
|
LDFLAGS-tst-audit25mod2.so = -Wl,-z,lazy
|
|
|
|
tst-audit25a-ARGS = -- $(host-test-program-cmd)
|
|
|
|
|
|
|
|
$(objpfx)tst-audit25b.out: $(objpfx)tst-auditmod25.so
|
|
|
|
$(objpfx)tst-audit25b: $(objpfx)tst-audit25mod1.so \
|
|
|
|
$(objpfx)tst-audit25mod2.so \
|
|
|
|
$(objpfx)tst-audit25mod3.so \
|
|
|
|
$(objpfx)tst-audit25mod4.so
|
|
|
|
LDFLAGS-tst-audit25b = -Wl,-z,now
|
|
|
|
tst-audit25b-ARGS = -- $(host-test-program-cmd)
|
|
|
|
|
2022-07-08 10:08:48 +00:00
|
|
|
$(objpfx)tst-audit28.out: $(objpfx)tst-auditmod28.so
|
|
|
|
$(objpfx)tst-auditmod28.so: $(libsupport)
|
|
|
|
tst-audit28-ENV = LD_AUDIT=$(objpfx)tst-auditmod28.so
|
2022-04-26 12:23:02 +00:00
|
|
|
|
2019-06-28 08:12:50 +00:00
|
|
|
# tst-sonamemove links against an older implementation of the library.
|
|
|
|
LDFLAGS-tst-sonamemove-linkmod1.so = \
|
|
|
|
-Wl,--version-script=tst-sonamemove-linkmod1.map \
|
|
|
|
-Wl,-soname,tst-sonamemove-runmod1.so
|
|
|
|
LDFLAGS-tst-sonamemove-runmod1.so = -Wl,--no-as-needed \
|
|
|
|
-Wl,--version-script=tst-sonamemove-runmod1.map \
|
|
|
|
-Wl,-soname,tst-sonamemove-runmod1.so
|
|
|
|
LDFLAGS-tst-sonamemove-runmod2.so = \
|
|
|
|
-Wl,--version-script=tst-sonamemove-runmod2.map \
|
|
|
|
-Wl,-soname,tst-sonamemove-runmod2.so
|
|
|
|
$(objpfx)tst-sonamemove-runmod1.so: $(objpfx)tst-sonamemove-runmod2.so
|
|
|
|
# Link against the link module, but depend on the run-time modules
|
|
|
|
# for execution.
|
|
|
|
$(objpfx)tst-sonamemove-link: $(objpfx)tst-sonamemove-linkmod1.so
|
|
|
|
$(objpfx)tst-sonamemove-link.out: \
|
|
|
|
$(objpfx)tst-sonamemove-runmod1.so \
|
|
|
|
$(objpfx)tst-sonamemove-runmod2.so
|
|
|
|
$(objpfx)tst-sonamemove-dlopen.out: \
|
|
|
|
$(objpfx)tst-sonamemove-runmod1.so \
|
|
|
|
$(objpfx)tst-sonamemove-runmod2.so
|
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-dlmopen-dlerror-mod.so: $(libsupport)
|
2021-04-21 17:49:51 +00:00
|
|
|
$(objpfx)tst-dlmopen-dlerror.out: $(objpfx)tst-dlmopen-dlerror-mod.so
|
|
|
|
|
2016-11-30 14:59:57 +00:00
|
|
|
# Override -z defs, so that we can reference an undefined symbol.
|
|
|
|
# Force lazy binding for the same reason.
|
|
|
|
LDFLAGS-tst-latepthreadmod.so = \
|
|
|
|
-Wl,-z,lazy -Wl,--unresolved-symbols=ignore-all
|
2016-12-02 08:09:55 +00:00
|
|
|
# Do not optimize sibling calls as the test relies on a JMP_SLOT relocation for
|
|
|
|
# function this_function_is_not_defined.
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-tst-latepthreadmod.c += -fno-optimize-sibling-calls
|
2016-11-30 14:59:57 +00:00
|
|
|
$(objpfx)tst-latepthreadmod.so: $(shared-thread-library)
|
|
|
|
$(objpfx)tst-latepthread.out: $(objpfx)tst-latepthreadmod.so
|
|
|
|
|
2016-12-02 16:09:19 +00:00
|
|
|
# The test modules are parameterized by preprocessor macros.
|
|
|
|
$(patsubst %,$(objpfx)%.os,$(tst-tls-many-dynamic-modules)): \
|
|
|
|
$(objpfx)tst-tls-manydynamic%mod.os : tst-tls-manydynamicmod.c
|
|
|
|
$(compile-command.c) \
|
|
|
|
-DNAME=tls_global_$* -DSETTER=set_value_$* -DGETTER=get_value_$*
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-tls-manydynamic: $(shared-thread-library)
|
2016-12-02 16:09:19 +00:00
|
|
|
$(objpfx)tst-tls-manydynamic.out: \
|
|
|
|
$(patsubst %,$(objpfx)%.so,$(tst-tls-many-dynamic-modules))
|
|
|
|
|
2016-03-07 21:06:18 +00:00
|
|
|
$(objpfx)tst-ldconfig-X.out : tst-ldconfig-X.sh $(objpfx)ldconfig
|
2017-01-03 15:11:17 +00:00
|
|
|
$(SHELL) $< '$(common-objpfx)' '$(test-wrapper-env)' \
|
|
|
|
'$(run-program-env)' > $@; \
|
2016-03-07 21:06:18 +00:00
|
|
|
$(evaluate-test)
|
2016-03-31 09:26:55 +00:00
|
|
|
|
2016-12-02 20:39:09 +00:00
|
|
|
# Test static linking of all the libraries we can possibly link
|
|
|
|
# together. Note that in some configurations this may be less than the
|
|
|
|
# complete list of libraries we build but we try to maxmimize this list.
|
2022-01-04 10:34:29 +00:00
|
|
|
ifeq ($(pthread-in-libc),no)
|
|
|
|
$(objpfx)tst-linkall-static: \
|
|
|
|
$(common-objpfx)resolv/libanl.a
|
|
|
|
endif
|
2016-10-28 12:03:57 +00:00
|
|
|
$(objpfx)tst-linkall-static: \
|
|
|
|
$(common-objpfx)math/libm.a \
|
|
|
|
$(common-objpfx)resolv/libresolv.a \
|
|
|
|
$(common-objpfx)login/libutil.a \
|
|
|
|
$(common-objpfx)rt/librt.a \
|
2016-12-02 20:39:09 +00:00
|
|
|
$(static-thread-library)
|
|
|
|
|
2018-06-29 14:53:47 +00:00
|
|
|
ifeq ($(build-crypt),yes)
|
2016-12-02 20:39:09 +00:00
|
|
|
# If we are using NSS crypto and we have the ability to link statically
|
|
|
|
# then we include libcrypt.a, otherwise we leave out libcrypt.a and
|
|
|
|
# link as much as we can into the tst-linkall-static test. This assumes
|
|
|
|
# that linking with libcrypt.a does everything required to include the
|
|
|
|
# static NSS crypto library.
|
|
|
|
ifeq (yesyes,$(nss-crypt)$(static-nss-crypt))
|
|
|
|
$(objpfx)tst-linkall-static: \
|
|
|
|
$(common-objpfx)crypt/libcrypt.a
|
|
|
|
endif
|
|
|
|
# If we are not using NSS crypto then we always have the ability to link
|
|
|
|
# with libcrypt.a.
|
|
|
|
ifeq (no,$(nss-crypt))
|
|
|
|
$(objpfx)tst-linkall-static: \
|
|
|
|
$(common-objpfx)crypt/libcrypt.a
|
|
|
|
endif
|
2018-06-29 14:53:47 +00:00
|
|
|
endif
|
2016-12-23 18:30:22 +00:00
|
|
|
|
2022-05-27 19:34:49 +00:00
|
|
|
LDFLAGS-nextmod3.so = -Wl,--version-script=nextmod3.map
|
|
|
|
|
2016-12-23 18:30:22 +00:00
|
|
|
# The application depends on the DSO, and the DSO loads the plugin.
|
|
|
|
# The plugin also depends on the DSO. This creates the circular
|
|
|
|
# dependency via dlopen that we're testing to make sure works.
|
|
|
|
$(objpfx)tst-nodelete-dlclose-plugin.so: $(objpfx)tst-nodelete-dlclose-dso.so
|
|
|
|
$(objpfx)tst-nodelete-dlclose: $(objpfx)tst-nodelete-dlclose-dso.so
|
|
|
|
$(objpfx)tst-nodelete-dlclose.out: $(objpfx)tst-nodelete-dlclose-dso.so \
|
|
|
|
$(objpfx)tst-nodelete-dlclose-plugin.so
|
2017-02-02 10:16:01 +00:00
|
|
|
|
2017-03-07 15:22:04 +00:00
|
|
|
tst-env-setuid-ENV = MALLOC_CHECK_=2 MALLOC_MMAP_THRESHOLD_=4096 \
|
2017-05-18 20:12:01 +00:00
|
|
|
LD_HWCAP_MASK=0x1
|
2017-09-26 20:49:48 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-debug1.out: $(objpfx)tst-debug1mod1.so
|
|
|
|
|
|
|
|
$(objpfx)tst-debug1mod1.so: $(objpfx)testobj1.so
|
|
|
|
$(OBJCOPY) --only-keep-debug $< $@
|
2017-10-04 22:40:37 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-main1: $(objpfx)tst-main1mod.so
|
|
|
|
CRT-tst-main1 := $(csu-objpfx)crt1.o
|
2017-12-19 21:53:00 +00:00
|
|
|
tst-main1-no-pie = yes
|
2017-10-04 22:40:37 +00:00
|
|
|
LDLIBS-tst-main1 = $(libsupport)
|
|
|
|
tst-main1mod.so-no-z-defs = yes
|
2018-01-04 17:46:17 +00:00
|
|
|
|
elf: Correct absolute (SHN_ABS) symbol run-time calculation [BZ #19818]
Do not relocate absolute symbols by the base address. Such symbols have
SHN_ABS as the section index and their value is not supposed to be
affected by relocation as per the ELF gABI[1]:
"SHN_ABS
The symbol has an absolute value that will not change because of
relocation."
The reason for our non-conformance here seems to be an old SysV linker
bug causing symbols like _DYNAMIC to be incorrectly emitted as absolute
symbols[2]. However in a previous discussion it was pointed that this
is seriously flawed by preventing the lone purpose of the existence of
absolute symbols from being used[3]:
"On the contrary, the only interpretation that makes sense to me is that
it will not change because of relocation at link time or at load time.
Absolute symbols, from the days of the earliest linking loaders, have
been used to represent addresses that are outside the address space of
the module (e.g., memory-mapped addresses or kernel gateway pages).
They've even been used to represent true symbolic constants (e.g.,
system entry point numbers, sizes, version numbers). There's no other
way to represent a true absolute symbol, while the meaning you seek is
easily represented by giving the symbol a non-negative st_shndx value."
and we ought to stop supporting our current broken interpretation.
Update processing for dladdr(3) and dladdr1(3) so that SHN_ABS symbols
are ignored, because under the corrected interpretation they do not
represent addresses within a mapped file and therefore are not supposed
to be considered.
References:
[1] "System V Application Binary Interface - DRAFT - 19 October 2010",
The SCO Group, Section "Symbol Table",
<http://www.sco.com/developers/gabi/2012-12-31/ch4.symtab.html>
[2] Alan Modra, "Absolute symbols"
<https://sourceware.org/ml/binutils/2012-05/msg00019.html>
[3] Cary Coutant, "Re: Absolute symbols"
<https://sourceware.org/ml/binutils/2012-05/msg00020.html>
[BZ #19818]
* sysdeps/generic/ldsodefs.h (SYMBOL_ADDRESS): Handle SHN_ABS
symbols.
* elf/dl-addr.c (determine_info): Ignore SHN_ABS symbols.
* elf/tst-absolute-sym.c: New file.
* elf/tst-absolute-sym-lib.c: New file.
* elf/tst-absolute-sym-lib.lds: New file.
* elf/Makefile (tests): Add `tst-absolute-sym'.
(modules-names): Add `tst-absolute-sym-lib'.
(LDLIBS-tst-absolute-sym-lib.so): New variable.
($(objpfx)tst-absolute-sym-lib.so): New dependency.
($(objpfx)tst-absolute-sym): New dependency.
2018-04-04 22:09:37 +00:00
|
|
|
LDLIBS-tst-absolute-sym-lib.so = tst-absolute-sym-lib.lds
|
|
|
|
$(objpfx)tst-absolute-sym-lib.so: $(LDLIBS-tst-absolute-sym-lib.so)
|
|
|
|
$(objpfx)tst-absolute-sym: $(objpfx)tst-absolute-sym-lib.so
|
|
|
|
|
2018-06-29 16:10:43 +00:00
|
|
|
LDLIBS-tst-absolute-zero-lib.so = tst-absolute-zero-lib.lds
|
|
|
|
$(objpfx)tst-absolute-zero-lib.so: $(LDLIBS-tst-absolute-zero-lib.so)
|
|
|
|
$(objpfx)tst-absolute-zero: $(objpfx)tst-absolute-zero-lib.so
|
|
|
|
|
2018-05-06 01:08:27 +00:00
|
|
|
$(objpfx)tst-big-note: $(objpfx)tst-big-note-lib.so
|
2019-03-01 17:53:03 +00:00
|
|
|
# Avoid creating an ABI tag note, which may come before the
|
|
|
|
# artificial, large note in tst-big-note-lib.o and invalidate the
|
|
|
|
# test.
|
|
|
|
$(objpfx)tst-big-note-lib.so: $(objpfx)tst-big-note-lib.o
|
2022-05-16 13:17:14 +00:00
|
|
|
$(LINK.o) -shared -o $@ $(LDFLAGS.so) $(dt-relr-ldflag) $<
|
2018-09-24 23:22:22 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-unwind-ctor: $(objpfx)tst-unwind-ctor-lib.so
|
2018-09-25 09:11:27 +00:00
|
|
|
|
2019-01-13 23:48:09 +00:00
|
|
|
CFLAGS-tst-unwind-main.c += -funwind-tables -DUSE_PTHREADS=0
|
2019-11-27 15:20:47 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-initfinilazyfail.out: \
|
|
|
|
$(objpfx)tst-initlazyfailmod.so $(objpfx)tst-finilazyfailmod.so
|
|
|
|
# Override -z defs, so that we can reference an undefined symbol.
|
|
|
|
# Force lazy binding for the same reason.
|
|
|
|
LDFLAGS-tst-initlazyfailmod.so = \
|
|
|
|
-Wl,-z,lazy -Wl,--unresolved-symbols=ignore-all
|
|
|
|
LDFLAGS-tst-finilazyfailmod.so = \
|
|
|
|
-Wl,-z,lazy -Wl,--unresolved-symbols=ignore-all
|
2019-11-13 14:44:56 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-dlopenfail.out: \
|
|
|
|
$(objpfx)tst-dlopenfailmod1.so $(objpfx)tst-dlopenfailmod2.so
|
2019-12-02 13:53:16 +00:00
|
|
|
# Order matters here. tst-dlopenfaillinkmod.so's soname ensures a
|
|
|
|
# run-time loader failure. --as-needed breaks this test because
|
|
|
|
# nothing actually references tst-dlopenfailmod2.so (with its soname
|
|
|
|
# tst-dlopenfail-missingmod.so).
|
|
|
|
LDFLAGS-tst-dlopenfailmod1.so = -Wl,--no-as-needed
|
2019-11-13 14:44:56 +00:00
|
|
|
$(objpfx)tst-dlopenfailmod1.so: \
|
|
|
|
$(shared-thread-library) $(objpfx)tst-dlopenfaillinkmod.so
|
|
|
|
LDFLAGS-tst-dlopenfaillinkmod.so = -Wl,-soname,tst-dlopenfail-missingmod.so
|
2021-05-21 20:35:00 +00:00
|
|
|
$(objpfx)tst-dlopenfailmod2.so: $(objpfx)tst-dlopenfailnodelmod.so
|
2020-12-10 11:24:53 +00:00
|
|
|
$(objpfx)tst-dlopenfail-2.out: \
|
2020-01-16 15:53:58 +00:00
|
|
|
$(objpfx)tst-dlopenfailmod1.so $(objpfx)tst-dlopenfailmod2.so \
|
|
|
|
$(objpfx)tst-dlopenfailmod3.so
|
2021-05-21 20:35:00 +00:00
|
|
|
# tst-dlopenfailnodelmod.so emulates how libpthread was linked.
|
|
|
|
$(objpfx)tst-dlopenfailnodelmod.so: $(libsupport)
|
|
|
|
LDFLAGS-tst-dlopenfailnodelmod.so = \
|
|
|
|
-Wl,--enable-new-dtags,-z,nodelete,-z,initfirst
|
|
|
|
# tst-dlopenfail should export the libsupport symbols, so that
|
|
|
|
# tst-dlopenfailnodelmod.so uses them for error reporting.
|
|
|
|
LDFLAGS-tst-dlopenfail = -Wl,-E
|
2019-12-13 09:18:24 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc.out: \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod1.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod2.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod3.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod4.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod5.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod6.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod7.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod8.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod9.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod10.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod11.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod12.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod13.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod14.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod15.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod16.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod17.so
|
|
|
|
tst-dlopen-nodelete-reloc-mod2.so-no-z-defs = yes
|
|
|
|
LDFLAGS-tst-dlopen-nodelete-reloc-mod2.so = -Wl,-z,nodelete
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod4.so: \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod3.so
|
|
|
|
LDFLAGS-tst-dlopen-nodelete-reloc-mod4.so = -Wl,--no-as-needed
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod5.so: \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod4.so
|
|
|
|
LDFLAGS-tst-dlopen-nodelete-reloc-mod5.so = -Wl,-z,nodelete,--no-as-needed
|
|
|
|
tst-dlopen-nodelete-reloc-mod5.so-no-z-defs = yes
|
|
|
|
tst-dlopen-nodelete-reloc-mod7.so-no-z-defs = yes
|
|
|
|
tst-dlopen-nodelete-reloc-mod11.so-no-z-defs = yes
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod13.so: \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod12.so
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod15.so: \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod14.so
|
|
|
|
tst-dlopen-nodelete-reloc-mod16.so-no-z-defs = yes
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod16.so: \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod15.so
|
|
|
|
LDFLAGS-tst-dlopen-nodelete-reloc-mod16.so = -Wl,--no-as-needed
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod17.so: \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod15.so \
|
|
|
|
$(objpfx)tst-dlopen-nodelete-reloc-mod16.so
|
|
|
|
LDFLAGS-tst-dlopen-nodelete-reloc-mod17.so = -Wl,--no-as-needed
|
2020-01-09 19:44:34 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-ldconfig-ld_so_conf-update.out: $(objpfx)tst-ldconfig-ld-mod.so
|
2020-02-12 17:28:15 +00:00
|
|
|
|
|
|
|
LDFLAGS-tst-filterobj-flt.so = -Wl,--filter=$(objpfx)tst-filterobj-filtee.so
|
|
|
|
$(objpfx)tst-filterobj: $(objpfx)tst-filterobj-flt.so
|
|
|
|
$(objpfx)tst-filterobj.out: $(objpfx)tst-filterobj-filtee.so
|
|
|
|
$(objpfx)tst-filterobj-dlopen.out: $(objpfx)tst-filterobj-filtee.so
|
|
|
|
|
|
|
|
LDFLAGS-tst-filterobj-aux.so = -Wl,--auxiliary=$(objpfx)tst-filterobj-filtee.so
|
|
|
|
$(objpfx)tst-auxobj: $(objpfx)tst-filterobj-aux.so
|
|
|
|
$(objpfx)tst-auxobj.out: $(objpfx)tst-filterobj-filtee.so
|
|
|
|
$(objpfx)tst-auxobj-dlopen.out: $(objpfx)tst-filterobj-filtee.so
|
2020-05-20 13:40:35 +00:00
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-single_threaded: $(objpfx)tst-single_threaded-mod1.so
|
2020-05-20 13:40:35 +00:00
|
|
|
$(objpfx)tst-single_threaded.out: \
|
|
|
|
$(objpfx)tst-single_threaded-mod2.so $(objpfx)tst-single_threaded-mod3.so
|
|
|
|
$(objpfx)tst-single_threaded-static-dlopen: \
|
2021-06-09 11:38:44 +00:00
|
|
|
$(objpfx)tst-single_threaded-mod1.o
|
2020-05-20 13:40:35 +00:00
|
|
|
$(objpfx)tst-single_threaded-static-dlopen.out: \
|
|
|
|
$(objpfx)tst-single_threaded-mod2.so
|
|
|
|
$(objpfx)tst-single_threaded-pthread: \
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-single_threaded-mod1.so $(shared-thread-library)
|
2020-05-20 13:40:35 +00:00
|
|
|
$(objpfx)tst-single_threaded-pthread.out: \
|
|
|
|
$(objpfx)tst-single_threaded-mod2.so $(objpfx)tst-single_threaded-mod3.so \
|
|
|
|
$(objpfx)tst-single_threaded-mod4.so
|
|
|
|
$(objpfx)tst-single_threaded-pthread-static: $(static-thread-library)
|
2020-06-10 12:40:40 +00:00
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-tls-ie: $(shared-thread-library)
|
2020-06-10 12:40:40 +00:00
|
|
|
$(objpfx)tst-tls-ie.out: \
|
|
|
|
$(objpfx)tst-tls-ie-mod0.so \
|
|
|
|
$(objpfx)tst-tls-ie-mod1.so \
|
|
|
|
$(objpfx)tst-tls-ie-mod2.so \
|
|
|
|
$(objpfx)tst-tls-ie-mod3.so \
|
|
|
|
$(objpfx)tst-tls-ie-mod4.so \
|
|
|
|
$(objpfx)tst-tls-ie-mod5.so \
|
|
|
|
$(objpfx)tst-tls-ie-mod6.so
|
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-tls-ie-dlmopen: $(shared-thread-library)
|
2020-06-10 12:40:40 +00:00
|
|
|
$(objpfx)tst-tls-ie-dlmopen.out: \
|
|
|
|
$(objpfx)tst-tls-ie-mod0.so \
|
|
|
|
$(objpfx)tst-tls-ie-mod1.so \
|
|
|
|
$(objpfx)tst-tls-ie-mod2.so \
|
|
|
|
$(objpfx)tst-tls-ie-mod3.so \
|
|
|
|
$(objpfx)tst-tls-ie-mod4.so \
|
|
|
|
$(objpfx)tst-tls-ie-mod5.so \
|
|
|
|
$(objpfx)tst-tls-ie-mod6.so
|
2020-07-20 11:30:45 +00:00
|
|
|
|
2020-09-29 10:34:39 +00:00
|
|
|
$(objpfx)argv0test.out: tst-rtld-argv0.sh $(objpfx)ld.so \
|
|
|
|
$(objpfx)argv0test
|
|
|
|
$(SHELL) $< $(objpfx)ld.so $(objpfx)argv0test \
|
|
|
|
'$(test-wrapper-env)' '$(run_program_env)' \
|
|
|
|
'$(rpath-link)' 'test-argv0' > $@; \
|
|
|
|
$(evaluate-test)
|
2020-12-04 08:13:43 +00:00
|
|
|
|
|
|
|
# A list containing the name of the most likely searched subdirectory
|
|
|
|
# of the glibc-hwcaps directory, for each supported architecture (in
|
|
|
|
# other words, the oldest hardware level recognized by the
|
|
|
|
# glibc-hwcaps mechanism for this architecture). Used to obtain test
|
|
|
|
# coverage for some glibc-hwcaps tests for the widest possible range
|
|
|
|
# of systems.
|
2020-12-10 12:51:18 +00:00
|
|
|
glibc-hwcaps-first-subdirs-for-tests = power9 x86-64-v2 z13
|
2020-12-04 08:13:43 +00:00
|
|
|
|
|
|
|
# The test modules are parameterized by preprocessor macros.
|
|
|
|
LDFLAGS-libmarkermod1-1.so += -Wl,-soname,libmarkermod1.so
|
|
|
|
LDFLAGS-libmarkermod2-1.so += -Wl,-soname,libmarkermod2.so
|
|
|
|
LDFLAGS-libmarkermod3-1.so += -Wl,-soname,libmarkermod3.so
|
|
|
|
LDFLAGS-libmarkermod4-1.so += -Wl,-soname,libmarkermod4.so
|
2022-04-13 12:36:09 +00:00
|
|
|
LDFLAGS-libmarkermod5-1.so += -Wl,-soname,libmarkermod5.so
|
2020-12-04 08:13:43 +00:00
|
|
|
$(objpfx)libmarkermod%.os : markermodMARKER-VALUE.c
|
|
|
|
$(compile-command.c) \
|
|
|
|
-DMARKER=marker$(firstword $(subst -, ,$*)) \
|
|
|
|
-DVALUE=$(lastword $(subst -, ,$*))
|
|
|
|
$(objpfx)libmarkermod1.so: $(objpfx)libmarkermod1-1.so
|
|
|
|
cp $< $@
|
|
|
|
$(objpfx)libmarkermod2.so: $(objpfx)libmarkermod2-1.so
|
|
|
|
cp $< $@
|
|
|
|
$(objpfx)libmarkermod3.so: $(objpfx)libmarkermod3-1.so
|
|
|
|
cp $< $@
|
|
|
|
$(objpfx)libmarkermod4.so: $(objpfx)libmarkermod4-1.so
|
|
|
|
cp $< $@
|
2022-04-13 12:36:09 +00:00
|
|
|
$(objpfx)libmarkermod5.so: $(objpfx)libmarkermod5-1.so
|
|
|
|
cp $< $@
|
2020-12-04 08:13:43 +00:00
|
|
|
|
|
|
|
# tst-glibc-hwcaps-prepend checks that --glibc-hwcaps-prepend is
|
|
|
|
# preferred over auto-detected subdirectories.
|
|
|
|
$(objpfx)tst-glibc-hwcaps-prepend: $(objpfx)libmarkermod1-1.so
|
|
|
|
$(objpfx)glibc-hwcaps/prepend-markermod1/libmarkermod1.so: \
|
|
|
|
$(objpfx)libmarkermod1-2.so
|
|
|
|
$(make-target-directory)
|
|
|
|
cp $< $@
|
|
|
|
$(objpfx)glibc-hwcaps/%/libmarkermod1.so: $(objpfx)libmarkermod1-3.so
|
|
|
|
$(make-target-directory)
|
|
|
|
cp $< $@
|
|
|
|
$(objpfx)tst-glibc-hwcaps-prepend.out: \
|
|
|
|
$(objpfx)tst-glibc-hwcaps-prepend $(objpfx)libmarkermod1.so \
|
|
|
|
$(patsubst %,$(objpfx)glibc-hwcaps/%/libmarkermod1.so,prepend-markermod1 \
|
|
|
|
$(glibc-hwcaps-first-subdirs-for-tests))
|
|
|
|
$(test-wrapper) $(rtld-prefix) \
|
|
|
|
--glibc-hwcaps-prepend prepend-markermod1 \
|
|
|
|
$< > $@; \
|
|
|
|
$(evaluate-test)
|
|
|
|
|
2020-12-04 08:13:43 +00:00
|
|
|
# Like tst-glibc-hwcaps-prepend, but uses a container and loads the
|
|
|
|
# library via ld.so.cache. Test setup is contained in the test
|
|
|
|
# itself.
|
|
|
|
$(objpfx)tst-glibc-hwcaps-prepend-cache.out: \
|
|
|
|
$(objpfx)tst-glibc-hwcaps-prepend-cache $(objpfx)libmarkermod1-1.so \
|
|
|
|
$(objpfx)libmarkermod1-2.so $(objpfx)libmarkermod1-3.so
|
|
|
|
|
2020-12-04 08:13:43 +00:00
|
|
|
# tst-glibc-hwcaps-mask checks that --glibc-hwcaps-mask can be used to
|
|
|
|
# suppress all auto-detected subdirectories.
|
|
|
|
$(objpfx)tst-glibc-hwcaps-mask: $(objpfx)libmarkermod1-1.so
|
|
|
|
$(objpfx)tst-glibc-hwcaps-mask.out: \
|
|
|
|
$(objpfx)tst-glibc-hwcaps-mask $(objpfx)libmarkermod1.so \
|
|
|
|
$(patsubst %,$(objpfx)glibc-hwcaps/%/libmarkermod1.so,\
|
|
|
|
$(glibc-hwcaps-first-subdirs-for-tests))
|
|
|
|
$(test-wrapper) $(rtld-prefix) \
|
|
|
|
--glibc-hwcaps-mask does-not-exist \
|
|
|
|
$< > $@; \
|
|
|
|
$(evaluate-test)
|
2020-12-04 08:13:43 +00:00
|
|
|
|
|
|
|
# Generic dependency for sysdeps implementation of
|
|
|
|
# tst-glibc-hwcaps-cache.
|
|
|
|
$(objpfx)tst-glibc-hwcaps-cache.out: $(objpfx)tst-glibc-hwcaps
|
2020-07-12 13:04:53 +00:00
|
|
|
|
|
|
|
$(objpfx)list-tunables.out: tst-rtld-list-tunables.sh $(objpfx)ld.so
|
|
|
|
$(SHELL) $< $(objpfx)ld.so '$(test-wrapper-env)' \
|
|
|
|
'$(run_program_env)' > $(objpfx)/tst-rtld-list-tunables.out
|
|
|
|
cmp tst-rtld-list-tunables.exp \
|
|
|
|
$(objpfx)/tst-rtld-list-tunables.out > $@; \
|
|
|
|
$(evaluate-test)
|
2021-03-12 15:44:47 +00:00
|
|
|
|
|
|
|
tst-dst-static-ENV = LD_LIBRARY_PATH='$$ORIGIN'
|
2021-03-15 09:33:43 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-rtld-help.out: $(objpfx)ld.so
|
|
|
|
$(test-wrapper) $(rtld-prefix) --help > $@; \
|
|
|
|
status=$$?; \
|
|
|
|
echo "info: ld.so exit status: $$status" >> $@; \
|
|
|
|
if ! grep -q 'Legacy HWCAP subdirectories under library search path directories' $@; then \
|
|
|
|
echo "error: missing subdirectory pattern" >> $@; \
|
|
|
|
if test $$status -eq 0; then \
|
|
|
|
status=1; \
|
|
|
|
fi; \
|
|
|
|
fi; \
|
|
|
|
(exit $$status); \
|
|
|
|
$(evaluate-test)
|
2020-12-31 12:24:38 +00:00
|
|
|
|
|
|
|
# Reuses tst-tls-many-dynamic-modules
|
2021-06-25 13:54:12 +00:00
|
|
|
$(patsubst %,$(objpfx)%.os,$(tst-tls-many-dynamic-modules-dep)): \
|
|
|
|
$(objpfx)tst-tls-manydynamic%mod-dep.os : tst-tls-manydynamicmod.c
|
|
|
|
$(compile-command.c) \
|
|
|
|
-DNAME=tls_global_$* -DSETTER=set_value_$* -DGETTER=get_value_$*
|
|
|
|
$(patsubst %,$(objpfx)%.os,$(tst-tls-many-dynamic-modules-dep-bad)): \
|
|
|
|
$(objpfx)tst-tls-manydynamic%mod-dep-bad.os : tst-tls-manydynamicmod.c
|
|
|
|
$(compile-command.c) \
|
|
|
|
-DNAME=tls_global_$* -DSETTER=set_value_$* -DGETTER=get_value_$*
|
2020-12-31 12:24:38 +00:00
|
|
|
tst-tls20mod-bad.so-no-z-defs = yes
|
2021-06-25 13:54:12 +00:00
|
|
|
# Single dependency.
|
|
|
|
$(objpfx)tst-tls-manydynamic0mod-dep.so: $(objpfx)tst-tls-manydynamic1mod-dep.so
|
|
|
|
# Double dependencies.
|
|
|
|
$(objpfx)tst-tls-manydynamic2mod-dep.so: $(objpfx)tst-tls-manydynamic3mod-dep.so \
|
|
|
|
$(objpfx)tst-tls-manydynamic4mod-dep.so
|
|
|
|
# Double dependencies with each dependency depent of another module.
|
|
|
|
$(objpfx)tst-tls-manydynamic5mod-dep.so: $(objpfx)tst-tls-manydynamic6mod-dep.so \
|
|
|
|
$(objpfx)tst-tls-manydynamic7mod-dep.so
|
|
|
|
$(objpfx)tst-tls-manydynamic6mod-dep.so: $(objpfx)tst-tls-manydynamic8mod-dep.so
|
|
|
|
$(objpfx)tst-tls-manydynamic7mod-dep.so: $(objpfx)tst-tls-manydynamic8mod-dep.so
|
|
|
|
# Long chain with one double dependency in the middle
|
|
|
|
$(objpfx)tst-tls-manydynamic9mod-dep.so: $(objpfx)tst-tls-manydynamic10mod-dep.so \
|
|
|
|
$(objpfx)tst-tls-manydynamic11mod-dep.so
|
|
|
|
$(objpfx)tst-tls-manydynamic10mod-dep.so: $(objpfx)tst-tls-manydynamic12mod-dep.so
|
|
|
|
$(objpfx)tst-tls-manydynamic12mod-dep.so: $(objpfx)tst-tls-manydynamic13mod-dep.so
|
|
|
|
# Long chain with two double depedencies in the middle
|
|
|
|
$(objpfx)tst-tls-manydynamic14mod-dep.so: $(objpfx)tst-tls-manydynamic15mod-dep.so
|
|
|
|
$(objpfx)tst-tls-manydynamic15mod-dep.so: $(objpfx)tst-tls-manydynamic16mod-dep.so \
|
|
|
|
$(objpfx)tst-tls-manydynamic17mod-dep.so
|
|
|
|
$(objpfx)tst-tls-manydynamic16mod-dep.so: $(objpfx)tst-tls-manydynamic18mod-dep.so \
|
|
|
|
$(objpfx)tst-tls-manydynamic19mod-dep.so
|
|
|
|
# Same but with an invalid module.
|
|
|
|
# Single dependency.
|
|
|
|
$(objpfx)tst-tls-manydynamic0mod-dep-bad.so: $(objpfx)tst-tls20mod-bad.so
|
2021-07-15 11:18:21 +00:00
|
|
|
LDFLAGS-tst-tls-manydynamic0mod-dep-bad.so = -Wl,--no-as-needed
|
2021-06-25 13:54:12 +00:00
|
|
|
# Double dependencies.
|
|
|
|
$(objpfx)tst-tls-manydynamic1mod-dep-bad.so: $(objpfx)tst-tls-manydynamic2mod-dep-bad.so \
|
|
|
|
$(objpfx)tst-tls20mod-bad.so
|
2021-07-15 11:18:21 +00:00
|
|
|
LDFLAGS-tst-tls-manydynamic1mod-dep-bad.so = -Wl,--no-as-needed
|
2021-06-25 13:54:12 +00:00
|
|
|
# Double dependencies with each dependency depent of another module.
|
|
|
|
$(objpfx)tst-tls-manydynamic3mod-dep-bad.so: $(objpfx)tst-tls-manydynamic4mod-dep-bad.so \
|
|
|
|
$(objpfx)tst-tls-manydynamic5mod-dep-bad.so
|
2021-07-15 11:18:21 +00:00
|
|
|
LDFLAGS-tst-tls-manydynamic3mod-dep-bad.so = -Wl,--no-as-needed
|
2021-06-25 13:54:12 +00:00
|
|
|
$(objpfx)tst-tls-manydynamic4mod-dep-bad.so: $(objpfx)tst-tls20mod-bad.so
|
2021-07-15 11:18:21 +00:00
|
|
|
LDFLAGS-tst-tls-manydynamic4mod-dep-bad.so = -Wl,--no-as-needed
|
2021-06-25 13:54:12 +00:00
|
|
|
$(objpfx)tst-tls-manydynamic5mod-dep-bad.so: $(objpfx)tst-tls20mod-bad.so
|
2021-07-15 11:18:21 +00:00
|
|
|
LDFLAGS-tst-tls-manydynamic5mod-dep-bad.so = -Wl,--no-as-needed
|
2021-06-25 13:54:12 +00:00
|
|
|
# Long chain with one double dependency in the middle
|
|
|
|
$(objpfx)tst-tls-manydynamic6mod-dep-bad.so: $(objpfx)tst-tls-manydynamic7mod-dep-bad.so \
|
|
|
|
$(objpfx)tst-tls-manydynamic8mod-dep-bad.so
|
2021-07-15 11:18:21 +00:00
|
|
|
LDFLAGS-tst-tls-manydynamic6mod-dep-bad.so = -Wl,--no-as-needed
|
2021-06-25 13:54:12 +00:00
|
|
|
$(objpfx)tst-tls-manydynamic7mod-dep-bad.so: $(objpfx)tst-tls-manydynamic9mod-dep-bad.so
|
2021-07-15 11:18:21 +00:00
|
|
|
LDFLAGS-tst-tls-manydynamic7mod-dep-bad.so = -Wl,--no-as-needed
|
2021-06-25 13:54:12 +00:00
|
|
|
$(objpfx)tst-tls-manydynamic9mod-dep-bad.so: $(objpfx)tst-tls20mod-bad.so
|
2021-07-15 11:18:21 +00:00
|
|
|
LDFLAGS-tst-tls-manydynamic9mod-dep-bad.so = -Wl,--no-as-needed
|
2021-06-25 13:54:12 +00:00
|
|
|
# Long chain with two double depedencies in the middle
|
|
|
|
$(objpfx)tst-tls-manydynamic10mod-dep-bad.so: $(objpfx)tst-tls-manydynamic11mod-dep-bad.so
|
2021-07-15 11:18:21 +00:00
|
|
|
LDFLAGS-tst-tls-manydynamic10mod-dep-bad.so = -Wl,--no-as-needed
|
2021-06-25 13:54:12 +00:00
|
|
|
$(objpfx)tst-tls-manydynamic11mod-dep-bad.so: $(objpfx)tst-tls-manydynamic12mod-dep-bad.so \
|
|
|
|
$(objpfx)tst-tls-manydynamic13mod-dep-bad.so
|
2021-07-15 11:18:21 +00:00
|
|
|
LDFLAGS-tst-tls-manydynamic11mod-dep-bad.so = -Wl,--no-as-needed
|
2021-06-25 13:54:12 +00:00
|
|
|
$(objpfx)tst-tls-manydynamic12mod-dep-bad.so: $(objpfx)tst-tls-manydynamic14mod-dep-bad.so \
|
|
|
|
$(objpfx)tst-tls20mod-bad.so
|
2021-07-15 11:18:21 +00:00
|
|
|
LDFLAGS-tst-tls-manydynamic12mod-dep-bad.so = -Wl,--no-as-needed
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-tls20: $(shared-thread-library)
|
2020-12-31 12:24:38 +00:00
|
|
|
$(objpfx)tst-tls20.out: $(objpfx)tst-tls20mod-bad.so \
|
2021-06-25 13:54:12 +00:00
|
|
|
$(tst-tls-many-dynamic-modules:%=$(objpfx)%.so) \
|
|
|
|
$(tst-tls-many-dynamic-modules-dep:%=$(objpfx)%.so) \
|
|
|
|
$(tst-tls-many-dynamic-modules-dep-bad:%=$(objpfx)%.so) \
|
2016-12-13 12:28:41 +00:00
|
|
|
|
|
|
|
# Reuses tst-tls-many-dynamic-modules
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-tls21: $(shared-thread-library)
|
2016-12-13 12:28:41 +00:00
|
|
|
$(objpfx)tst-tls21.out: $(objpfx)tst-tls21mod.so
|
|
|
|
$(objpfx)tst-tls21mod.so: $(tst-tls-many-dynamic-modules:%=$(objpfx)%.so)
|
2021-05-17 07:59:14 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-getauxval-static.out: $(objpfx)tst-auxvalmod.so
|
|
|
|
tst-getauxval-static-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx)
|
2021-06-17 13:06:43 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-dlmopen-gethostbyname.out: $(objpfx)tst-dlmopen-gethostbyname-mod.so
|
2021-09-16 15:15:29 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-ro-dynamic: $(objpfx)tst-ro-dynamic-mod.so
|
|
|
|
$(objpfx)tst-ro-dynamic-mod.so: $(objpfx)tst-ro-dynamic-mod.os \
|
|
|
|
tst-ro-dynamic-mod.map
|
|
|
|
$(LINK.o) -nostdlib -nostartfiles -shared -o $@ \
|
2022-05-16 13:17:14 +00:00
|
|
|
$(dt-relr-ldflag) \
|
2021-09-16 15:15:29 +00:00
|
|
|
-Wl,--script=tst-ro-dynamic-mod.map \
|
|
|
|
$(objpfx)tst-ro-dynamic-mod.os
|
2021-12-05 10:28:34 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-rtld-run-static.out: $(objpfx)/ldconfig
|
2021-12-28 21:52:56 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-dl_find_object.out: \
|
|
|
|
$(objpfx)tst-dl_find_object-mod1.so $(objpfx)tst-dl_find_object-mod2.so
|
|
|
|
$(objpfx)tst-dl_find_object-static.out: \
|
|
|
|
$(objpfx)tst-dl_find_object-mod1.so $(objpfx)tst-dl_find_object-mod2.so
|
|
|
|
tst-dl_find_object-static-ENV = $(static-dlopen-environment)
|
|
|
|
CFLAGS-tst-dl_find_object.c += -funwind-tables
|
|
|
|
CFLAGS-tst-dl_find_object-static.c += -funwind-tables
|
|
|
|
LDFLAGS-tst-dl_find_object-static += -Wl,--eh-frame-hdr
|
|
|
|
CFLAGS-tst-dl_find_object-mod1.c += -funwind-tables
|
|
|
|
CFLAGS-tst-dl_find_object-mod2.c += -funwind-tables
|
|
|
|
LDFLAGS-tst-dl_find_object-mod2.so += -Wl,--enable-new-dtags,-z,nodelete
|
|
|
|
$(objpfx)tst-dl_find_object-threads: $(shared-thread-library)
|
|
|
|
CFLAGS-tst-dl_find_object-threads.c += -funwind-tables
|
|
|
|
$(objpfx)tst-dl_find_object-threads.out: \
|
|
|
|
$(objpfx)tst-dl_find_object-mod1.so \
|
|
|
|
$(objpfx)tst-dl_find_object-mod2.so \
|
|
|
|
$(objpfx)tst-dl_find_object-mod3.so \
|
|
|
|
$(objpfx)tst-dl_find_object-mod4.so \
|
|
|
|
$(objpfx)tst-dl_find_object-mod5.so \
|
|
|
|
$(objpfx)tst-dl_find_object-mod6.so \
|
|
|
|
$(objpfx)tst-dl_find_object-mod7.so \
|
|
|
|
$(objpfx)tst-dl_find_object-mod8.so \
|
|
|
|
$(objpfx)tst-dl_find_object-mod9.so
|
|
|
|
CFLAGS-tst-dl_find_object-mod3.c += -funwind-tables
|
|
|
|
CFLAGS-tst-dl_find_object-mod4.c += -funwind-tables
|
|
|
|
CFLAGS-tst-dl_find_object-mod5.c += -funwind-tables
|
|
|
|
CFLAGS-tst-dl_find_object-mod6.c += -funwind-tables
|
|
|
|
CFLAGS-tst-dl_find_object-mod7.c += -funwind-tables
|
|
|
|
CFLAGS-tst-dl_find_object-mod8.c += -funwind-tables
|
|
|
|
CFLAGS-tst-dl_find_object-mod9.c += -funwind-tables
|
2021-12-21 02:33:55 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-p_alignmod-base.so: $(libsupport)
|
|
|
|
LDFLAGS-tst-p_alignmod-base.so += -Wl,-z,max-page-size=0x200000
|
|
|
|
|
|
|
|
$(objpfx)tst-p_align1: $(objpfx)tst-p_alignmod1.so
|
|
|
|
|
|
|
|
# Make a copy of tst-p_alignmod-base.so and lower p_align of the first
|
|
|
|
# PT_LOAD segment.
|
2022-01-25 16:33:13 +00:00
|
|
|
$(objpfx)tst-p_alignmod1.so: $(objpfx)tst-p_alignmod-base.so
|
2021-12-21 02:33:55 +00:00
|
|
|
rm -f $@
|
|
|
|
cp $(objpfx)tst-p_alignmod-base.so $@
|
2022-01-25 16:33:13 +00:00
|
|
|
$(PYTHON) $(..)scripts/tst-elf-edit.py -a half $@
|
2021-12-21 20:25:20 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-p_align2: $(objpfx)tst-p_alignmod2.so
|
|
|
|
|
|
|
|
# Make a copy of tst-p_alignmod-base.so and update p_align of the first
|
|
|
|
# PT_LOAD segment.
|
2022-01-25 16:33:13 +00:00
|
|
|
$(objpfx)tst-p_alignmod2.so: $(objpfx)tst-p_alignmod-base.so
|
2021-12-21 20:25:20 +00:00
|
|
|
rm -f $@
|
|
|
|
cp $(objpfx)tst-p_alignmod-base.so $@
|
2022-01-25 16:33:13 +00:00
|
|
|
$(PYTHON) $(..)scripts/tst-elf-edit.py -a 1 $@
|
2021-12-21 21:42:28 +00:00
|
|
|
|
|
|
|
LDFLAGS-tst-p_alignmod3.so += -Wl,-z,max-page-size=0x100,-z,common-page-size=0x100
|
|
|
|
|
|
|
|
$(objpfx)tst-p_align3: $(objpfx)tst-p_alignmod3.so
|
|
|
|
$(objpfx)tst-p_align3.out: tst-p_align3.sh $(objpfx)tst-p_align3
|
|
|
|
$(SHELL) $< $(common-objpfx) '$(test-program-prefix)'; \
|
|
|
|
$(evaluate-test)
|
2021-11-19 14:18:56 +00:00
|
|
|
|
|
|
|
$(objpfx)check-abi-version-libc.out: $(common-objpfx)libc.so
|
|
|
|
LC_ALL=C $(READELF) -V -W $< \
|
|
|
|
| sed -ne '/.gnu.version_d/, /.gnu.version_r/ p' \
|
|
|
|
| grep GLIBC_ABI_DT_RELR > $@; \
|
|
|
|
$(evaluate-test)
|
2022-01-05 02:41:03 +00:00
|
|
|
|
|
|
|
$(objpfx)check-tst-relr-pie.out: $(objpfx)tst-relr-pie
|
|
|
|
LC_ALL=C $(OBJDUMP) -p $< \
|
|
|
|
| sed -ne '/required from libc.so/,$$ p' \
|
|
|
|
| grep GLIBC_ABI_DT_RELR > $@; \
|
|
|
|
$(evaluate-test)
|
2022-04-14 17:46:53 +00:00
|
|
|
|
|
|
|
# The test checks if a DT_RELR shared library without DT_NEEDED works as
|
|
|
|
# intended, so it uses an explicit link rule.
|
|
|
|
$(objpfx)tst-relr2: $(objpfx)tst-relr-mod2.so
|
|
|
|
$(objpfx)tst-relr-mod2.so: $(objpfx)tst-relr-mod2.os
|
|
|
|
$(LINK.o) -nostdlib -nostartfiles -Wl,-z,pack-relative-relocs \
|
|
|
|
$(LDFLAGS-soname-fname) \
|
|
|
|
-shared -o $@.new $(filter-out $(map-file),$^)
|
|
|
|
$(call after-link,$@.new)
|
|
|
|
mv -f $@.new $@
|
|
|
|
|
|
|
|
# The test checks if a DT_RELR shared library without DT_VERNEED works as
|
|
|
|
# intended, so it uses an explicit link rule.
|
|
|
|
$(objpfx)tst-relr3: $(objpfx)tst-relr-mod3a.so
|
|
|
|
$(objpfx)tst-relr-mod3b.so: $(objpfx)tst-relr-mod3b.os
|
|
|
|
$(LINK.o) -nostdlib -nostartfiles -Wl,-z,pack-relative-relocs \
|
|
|
|
$(LDFLAGS-soname-fname) \
|
|
|
|
-shared -o $@.new $(filter-out $(map-file),$^)
|
|
|
|
$(call after-link,$@.new)
|
|
|
|
mv -f $@.new $@
|
|
|
|
|
|
|
|
$(objpfx)tst-relr-mod3a.so: $(objpfx)tst-relr-mod3a.os \
|
|
|
|
$(objpfx)tst-relr-mod3b.so
|
|
|
|
$(LINK.o) -nostdlib -nostartfiles -Wl,-z,pack-relative-relocs \
|
|
|
|
$(LDFLAGS-soname-fname) \
|
|
|
|
-shared -o $@.new $(filter-out $(map-file),$^)
|
|
|
|
$(call after-link,$@.new)
|
|
|
|
mv -f $@.new $@
|
|
|
|
|
|
|
|
# The test checks if a DT_RELR shared library without libc.so on DT_NEEDED
|
|
|
|
# works as intended, so it uses an explicit link rule.
|
|
|
|
$(objpfx)tst-relr4: $(objpfx)tst-relr-mod4a.so
|
|
|
|
$(objpfx)tst-relr-mod4b.so: $(objpfx)tst-relr-mod4b.os
|
|
|
|
$(LINK.o) -nostdlib -nostartfiles -Wl,-z,pack-relative-relocs \
|
|
|
|
$(LDFLAGS-soname-fname) \
|
|
|
|
-Wl,--version-script=tst-relr-mod4b.map \
|
|
|
|
-shared -o $@.new $(filter-out $(map-file),$^)
|
|
|
|
$(call after-link,$@.new)
|
|
|
|
mv -f $@.new $@
|
|
|
|
|
|
|
|
$(objpfx)tst-relr-mod4a.so: $(objpfx)tst-relr-mod4a.os \
|
|
|
|
$(objpfx)tst-relr-mod4b.so
|
|
|
|
$(LINK.o) -nostdlib -nostartfiles -Wl,-z,pack-relative-relocs \
|
|
|
|
$(LDFLAGS-soname-fname) \
|
|
|
|
-shared -o $@.new $(filter-out $(map-file),$^)
|
|
|
|
$(call after-link,$@.new)
|
|
|
|
mv -f $@.new $@
|
2022-02-08 18:22:49 +00:00
|
|
|
|
|
|
|
LDFLAGS-libtracemod1-1.so += -Wl,-soname,libtracemod1.so
|
|
|
|
LDFLAGS-libtracemod2-1.so += -Wl,-soname,libtracemod2.so
|
|
|
|
LDFLAGS-libtracemod3-1.so += -Wl,-soname,libtracemod3.so
|
|
|
|
LDFLAGS-libtracemod4-1.so += -Wl,-soname,libtracemod4.so
|
|
|
|
LDFLAGS-libtracemod5-1.so += -Wl,-soname,libtracemod5.so
|
|
|
|
|
|
|
|
$(objpfx)libtracemod1-1.so: $(objpfx)libtracemod2-1.so \
|
|
|
|
$(objpfx)libtracemod3-1.so
|
|
|
|
$(objpfx)libtracemod2-1.so: $(objpfx)libtracemod4-1.so \
|
|
|
|
$(objpfx)libtracemod5-1.so
|
|
|
|
|
|
|
|
define libtracemod-x
|
|
|
|
$(objpfx)libtracemod$(1)/libtracemod$(1).so: $(objpfx)libtracemod$(1)-1.so
|
|
|
|
$$(make-target-directory)
|
|
|
|
cp $$< $$@
|
|
|
|
endef
|
|
|
|
libtracemod-suffixes = 1 2 3 4 5
|
|
|
|
$(foreach i,$(libtracemod-suffixes), $(eval $(call libtracemod-x,$(i))))
|
|
|
|
|
|
|
|
define tst-trace-skeleton
|
|
|
|
$(objpfx)tst-trace$(1).out: $(objpfx)libtracemod1/libtracemod1.so \
|
|
|
|
$(objpfx)libtracemod2/libtracemod2.so \
|
|
|
|
$(objpfx)libtracemod3/libtracemod3.so \
|
|
|
|
$(objpfx)libtracemod4/libtracemod4.so \
|
|
|
|
$(objpfx)libtracemod5/libtracemod5.so \
|
|
|
|
$(..)scripts/tst-ld-trace.py \
|
|
|
|
tst-trace$(1).exp
|
|
|
|
${ $(PYTHON) $(..)scripts/tst-ld-trace.py \
|
|
|
|
"$(test-wrapper-env) $(elf-objpfx)$(rtld-installed-name) \
|
|
|
|
--library-path $(common-objpfx):$(strip $(2)) \
|
|
|
|
$(objpfx)libtracemod1/libtracemod1.so" tst-trace$(1).exp \
|
|
|
|
} > $$@; $$(evaluate-test)
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call tst-trace-skeleton,1,))
|
|
|
|
$(eval $(call tst-trace-skeleton,2,\
|
|
|
|
$(objpfx)libtracemod2))
|
|
|
|
$(eval $(call tst-trace-skeleton,3,\
|
|
|
|
$(objpfx)libtracemod2:$(objpfx)libtracemod3))
|
|
|
|
$(eval $(call tst-trace-skeleton,4,\
|
|
|
|
$(objpfx)libtracemod2:$(objpfx)libtracemod3:$(objpfx)libtracemod4))
|
|
|
|
$(eval $(call tst-trace-skeleton,5,\
|
|
|
|
$(objpfx)libtracemod2:$(objpfx)libtracemod3:$(objpfx)libtracemod4:$(objpfx)libtracemod5))
|
2022-05-16 16:41:43 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-tls-allocation-failure-static-patched: \
|
|
|
|
$(objpfx)tst-tls-allocation-failure-static $(..)scripts/tst-elf-edit.py
|
|
|
|
cp $< $@
|
|
|
|
$(PYTHON) $(..)scripts/tst-elf-edit.py --maximize-tls-size $@
|
|
|
|
|
|
|
|
$(objpfx)tst-tls-allocation-failure-static-patched.out: \
|
|
|
|
$(objpfx)tst-tls-allocation-failure-static-patched
|
|
|
|
$< > $@ 2>&1; echo "status: $$?" >> $@
|
|
|
|
grep -q '^Fatal glibc error: Cannot allocate TLS block$$' $@ \
|
|
|
|
&& grep -q '^status: 127$$' $@; \
|
|
|
|
$(evaluate-test)
|