1 # Copyright (C) 1995-2024 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, see
16 # <https://www.gnu.org/licenses/>.
18 # Makefile for elf subdirectory of GNU C Library.
27 bits
/link_lavcurrent.h \
52 # The core dynamic linking functions are in libc for the static and
55 dl-call-libc-early-init \
80 dl-thread_gscope_wait \
89 ifeq (yes
,$(use-ldconfig
))
90 dl-routines
+= dl-cache
93 ifeq (yesyes
,$(build-shared
)$(run-built-tests
))
94 tests-special
+= $(objpfx
)list-tunables.out
97 # Make sure that the compiler does not insert any library calls in tunables
99 ifeq (yes
,$(have-loop-to-function
))
100 CFLAGS-dl-tunables.c
+= -fno-tree-loop-distribute-patterns
103 all-dl-routines
= $(dl-routines
) $(sysdep-dl-routines
)
104 # But they are absent from the shared libc, because that code is in ld.so.
105 elide-routines.os
= \
110 dl-reloc-static-pie \
118 # These object files are only included in the dynamically-linked libc.
119 shared-only-routines
= \
122 libc-dl_find_object \
123 # shared-only-routines
125 # ld.so uses those routines, plus some special stuff for being the program
126 # interpreter and operating independent of libc.
133 dl-diagnostics-kernel \
147 all-rtld-routines
= $(rtld-routines
) $(sysdep-rtld-routines
)
149 CFLAGS-dl-runtime.c
+= -fexceptions
-fasynchronous-unwind-tables
150 CFLAGS-dl-lookup.c
+= -fexceptions
-fasynchronous-unwind-tables
151 CFLAGS-dl-iteratephdr.c
+= $(uses-callbacks
)
153 # Called during static library initialization, so turn stack-protection
154 # off for non-shared builds.
155 CFLAGS-dl-minimal-malloc.o
= $(no-stack-protector
)
156 CFLAGS-dl-minimal-malloc.op
= $(no-stack-protector
)
158 # On targets without __builtin_memset, rtld.c uses a hand-coded loop
159 # in _dl_start. Make sure this isn't turned into a call to regular memset.
160 ifeq (yes
,$(have-loop-to-function
))
161 CFLAGS-rtld.c
+= -fno-tree-loop-distribute-patterns
164 # Compile rtld itself without stack protection.
165 # Also compile all routines in the static library that are elided from
166 # the shared libc because they are in libc.a in the same way.
168 CFLAGS-.o
+= $(call elide-stack-protector
,.o
,$(elide-routines.os
))
169 CFLAGS-.op
+= $(call elide-stack-protector
,.op
,$(elide-routines.os
))
170 CFLAGS-.os
+= $(call elide-stack-protector
,.os
,$(all-rtld-routines
))
172 # Add the requested compiler flags to the early startup code.
173 CFLAGS-dl-printf.os
+= $(rtld-early-cflags
)
174 CFLAGS-dl-setup_hash.os
+= $(rtld-early-cflags
)
175 CFLAGS-dl-sysdep.os
+= $(rtld-early-cflags
)
176 CFLAGS-dl-tunables.os
+= $(rtld-early-cflags
)
177 CFLAGS-dl-write.os
+= $(rtld-early-cflags
)
178 CFLAGS-dl-writev.os
+= $(rtld-early-cflags
)
179 CFLAGS-rtld.os
+= $(rtld-early-cflags
)
181 ifeq ($(unwind-find-fde
),yes
)
182 routines
+= unwind-dw2-fde-glibc
183 shared-only-routines
+= unwind-dw2-fde-glibc
186 before-compile
+= $(objpfx
)trusted-dirs.h
187 generated
+= trusted-dirs.h trusted-dirs.st for-renamed
/renamed.so
188 generated-dirs
+= for-renamed
190 ifeq ($(build-shared
),yes
)
191 ld-map
= $(common-objpfx
)ld.map
194 ifeq (yes
,$(build-shared
))
196 $(all-rtld-routines
:%=%.os
) \
205 install-others
= $(inst_rtlddir
)/$(rtld-installed-name
) $(inst_bindir
)/ld.so
206 install-bin-script
= ldd
212 install-rootsbin
= sln
213 sln-modules
:= static-stubs
214 extra-objs
+= $(sln-modules
:=.o
)
216 ifeq (yes
,$(use-ldconfig
))
217 ifeq (yes
,$(build-shared
))
218 others-static
+= ldconfig
220 install-rootsbin
+= ldconfig
222 ldconfig-modules
:= \
231 extra-objs
+= $(ldconfig-modules
:=.o
)
232 others-extras
= $(ldconfig-modules
)
236 # To find xmalloc.c and xstrdup.c
237 vpath
%.c ..
/locale
/programs
239 ifeq ($(build-shared
),yes
)
240 extra-objs
+= sotruss-lib.os sotruss-lib.so
241 install-others
+= $(inst_auditdir
)/sotruss-lib.so
242 install-bin-script
+= sotruss
244 libof-sotruss-lib
= extramodules
245 LDFLAGS-sotruss-lib.so
+= $(z-now-
$(bind-now
))
246 $(objpfx
)sotruss-lib.so
: $(objpfx
)sotruss-lib.os
247 $(build-module-asneeded
)
248 $(objpfx
)sotruss-lib.so
: $(common-objpfx
)libc.so
$(objpfx
)ld.so \
249 $(common-objpfx
)libc_nonshared.a
251 $(objpfx
)sotruss
: sotruss.sh
$(common-objpfx
)config.make
252 sed
-e
's%@VERSION@%$(version)%g' \
253 -e
's%@TEXTDOMAINDIR@%$(localedir)%g' \
254 -e
's%@PREFIX@%$(prefix)%g' \
255 -e
's|@PKGVERSION@|$(PKGVERSION)|g' \
256 -e
's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \
260 $(inst_auditdir
)/sotruss-lib.so
: $(objpfx
)sotruss-lib.so
$(+force)
261 $(do-install-program
)
264 tests-static-normal
:= \
269 tst-env-setuid-static \
270 tst-getauxval-static \
272 tst-single_threaded-pthread-static \
273 tst-single_threaded-static \
274 tst-tls-allocation-failure-static \
275 tst-tlsalign-extern-static \
276 tst-tlsalign-static \
277 # tests-static-normal
279 tests-static-internal
:= \
280 tst-dl-printf-static \
281 tst-dl_find_object-static \
282 tst-env-setuid-tunables \
283 tst-ptrguard1-static \
284 tst-stackguard1-static \
286 tst-tls1-static-non-pie \
288 tst-tunables-enable_secure \
289 # tests-static-internal
291 CRT-tst-tls1-static-non-pie
:= $(csu-objpfx
)crt1.o
292 tst-tls1-static-non-pie-no-pie
= yes
295 tst-ldconfig-bad-aux-cache \
296 tst-ldconfig-ld_so_conf-update \
299 ifeq (no
,$(build-hardcoded-path-in-tests
))
300 # This is an ld.so.cache test, and RPATH/RUNPATH in the executable
301 # interferes with its test objectives.
302 tests-container
+= tst-glibc-hwcaps-prepend-cache
318 tst-tunables-enable_secure-env \
322 $(tests-static-internal
) \
326 tests-static
:= $(tests-static-normal
) $(tests-static-internal
)
328 ifeq (yes
,$(build-shared
))
330 tst-single_threaded-static-dlopen \
334 static-dlopen-environment
= \
335 LD_LIBRARY_PATH
=$(ld-library-path
):$(common-objpfx
)dlfcn
336 tst-tls9-static-ENV
= $(static-dlopen-environment
)
337 tst-single_threaded-static-dlopen-ENV
= $(static-dlopen-environment
)
338 tst-rootdir-ENV
= LD_LIBRARY_PATH
=/
379 tst-audit-tlsdesc-dlopen \
410 tst-dlmopen-dlerror \
411 tst-dlmopen-gethostbyname \
417 tst-dlopen-tlsmodid \
423 tst-filterobj-dlopen \
425 tst-glibc-hwcaps-mask \
426 tst-glibc-hwcaps-prepend \
430 tst-initfinilazyfail \
436 tst-nodelete-dlclose \
437 tst-nodelete-opened \
442 tst-non-directory-path \
449 tst-rtld-run-static \
450 tst-single_threaded \
451 tst-single_threaded-pthread \
452 tst-sonamemove-dlopen \
453 tst-sonamemove-link \
458 tst-tls-manydynamic \
474 tst-tlsalign-extern \
489 tst-dlopen-nodelete-reloc \
495 tests
+= $(if
$(CXX
),$(tests-cxx
))
506 tst-dl-hwcaps_split \
508 tst-dl_find_object-threads \
522 tst-dlopen-self-container \
523 tst-dlopen-tlsmodid-container \
525 tst-preload-pthread-libc \
534 ifeq (yes
,$(have-fpie
))
535 tests-pie
+= tst-align3
537 selinux-enabled
:= $(shell cat
/selinux
/enforce
2> /dev
/null
)
539 ifneq ($(selinux-enabled
),1)
540 tests-execstack-yes
= \
542 tst-execstack-needed \
544 # tests-execstack-yes
546 ifeq ($(have-depaudit
),yes
)
553 ifeq ($(run-built-tests
),yes
)
555 $(objpfx
)tst-audit14-cmp.out \
556 $(objpfx
)tst-audit14a-cmp.out \
557 $(objpfx
)tst-audit15-cmp.out \
558 $(objpfx
)tst-audit16-cmp.out \
562 ifeq ($(have-dt-relr
),yes
)
569 modules-names-dt-relr
= \
575 # modules-names-dt-relr
576 modules-names
+= $(modules-names-dt-relr
)
577 # These shared libraries have special build rules.
578 modules-names-nobuild
+= $(modules-names-dt-relr
)
579 ifeq ($(have-fpie
),yes
)
587 $(objpfx
)check-tst-relr-pie.out \
590 CFLAGS-tst-relr-pie.c
+= $(pie-ccflag
)
591 LDFLAGS-tst-relr
+= -Wl
,-z
,pack-relative-relocs
592 LDFLAGS-tst-relr-pie
+= -Wl
,-z
,pack-relative-relocs
593 CFLAGS-tst-relr-mod2.c
+= $(no-stack-protector
)
594 CFLAGS-tst-relr-mod3a.c
+= $(no-stack-protector
)
595 CFLAGS-tst-relr-mod3b.c
+= $(no-stack-protector
)
596 CFLAGS-tst-relr-mod4a.c
+= $(no-stack-protector
)
597 CFLAGS-tst-relr-mod4b.c
+= $(no-stack-protector
)
601 tests-special
+= $(objpfx
)tst-relro-ldso.out
$(objpfx
)tst-relro-libc.out
602 $(objpfx
)tst-relro-ldso.out
: tst-relro-symbols.py
$(..
)/scripts
/glibcelf.py \
604 $(PYTHON
) tst-relro-symbols.py
$(objpfx
)ld.so \
605 --required
=_rtld_global_ro \
606 > $@
2>&1; $(evaluate-test
)
607 # The optional symbols are present in libc only if the architecture has
608 # the GLIBC_2.0 symbol set in libc.
609 $(objpfx
)tst-relro-libc.out
: tst-relro-symbols.py
$(..
)/scripts
/glibcelf.py \
610 $(common-objpfx
)libc.so
611 $(PYTHON
) tst-relro-symbols.py
$(common-objpfx
)libc.so \
612 --required
=_IO_file_jumps \
613 --required
=_IO_wfile_jumps \
614 --required
=__io_vtables \
615 > $@
2>&1; $(evaluate-test
)
617 ifeq ($(run-built-tests
),yes
)
618 tests-special
+= $(objpfx
)tst-valgrind-smoke.out
620 $(objpfx
)tst-valgrind-smoke.out
: tst-valgrind-smoke.sh
$(objpfx
)ld.so
$(objpfx
)valgrind-test
621 $(SHELL
) $< $(objpfx
)ld.so
$(rtlddir
)/$(rtld-installed-name
) '$(test-wrapper-env)' \
622 '$(run-program-env)' '$(rpath-link)' $(objpfx
)valgrind-test
> $@
; $(evaluate-test
)
624 ifeq ($(run-built-tests
),yes
)
625 tests-special
+= $(objpfx
)tst-rtld-does-not-exist.out
627 $(objpfx
)tst-rtld-does-not-exist.out
: tst-rtld-does-not-exist.sh
$(objpfx
)ld.so
628 $(SHELL
) $< $(objpfx
)ld.so
> $@
; \
631 tests
+= $(tests-execstack-
$(have-z-execstack
))
632 ifeq ($(run-built-tests
),yes
)
634 $(objpfx
)noload-mem.out \
635 $(objpfx
)tst-ldconfig-X.out \
636 $(objpfx
)tst-ldconfig-p.out \
637 $(objpfx
)tst-ldconfig-soname.out \
638 $(objpfx
)tst-leaks1-mem.out \
639 $(objpfx
)tst-rtld-help.out \
642 tlsmod17a-suffixes
= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
643 tlsmod18a-suffixes
= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
644 tlsmod17a-modules
= $(addprefix tst-tlsmod17a
, $(tlsmod17a-suffixes
))
645 tlsmod18a-modules
= $(addprefix tst-tlsmod18a
, $(tlsmod17a-suffixes
))
646 one-hundred
= $(foreach x
,0 1 2 3 4 5 6 7 8 9, \
647 0$x 1$x 2$x 3$x 4$x 5$x 6$x 7$x 8$x 9$x)
648 tst-tls-many-dynamic-modules
:= \
649 $(foreach n
,$(one-hundred
),tst-tls-manydynamic
$(n
)mod
)
650 tst-tls-many-dynamic-modules-dep-suffixes
= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 \
652 tst-tls-many-dynamic-modules-dep
= \
653 $(foreach n
,$(tst-tls-many-dynamic-modules-dep-suffixes
),tst-tls-manydynamic
$(n
)mod-dep
)
654 tst-tls-many-dynamic-modules-dep-bad-suffixes
= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
655 tst-tls-many-dynamic-modules-dep-bad
= \
656 $(foreach n
,$(tst-tls-many-dynamic-modules-dep-bad-suffixes
),tst-tls-manydynamic
$(n
)mod-dep-bad
)
658 $(tlsmod17a-modules
:=.os
) \
659 $(tlsmod18a-modules
:=.os
) \
660 tst-tlsalign-vars.o \
765 tst-absolute-sym-lib \
766 tst-absolute-zero-lib \
772 tst-audit-tlsdesc-mod1 \
773 tst-audit-tlsdesc-mod2 \
807 tst-auditmod-tlsdesc \
832 tst-dl_find_object-mod1 \
833 tst-dl_find_object-mod2 \
834 tst-dl_find_object-mod3 \
835 tst-dl_find_object-mod4 \
836 tst-dl_find_object-mod5 \
837 tst-dl_find_object-mod6 \
838 tst-dl_find_object-mod7 \
839 tst-dl_find_object-mod8 \
840 tst-dl_find_object-mod9 \
841 tst-dlclose-lazy-mod1 \
842 tst-dlclose-lazy-mod2 \
843 tst-dlmopen-dlerror-mod \
844 tst-dlmopen-gethostbyname-mod \
845 tst-dlmopen-twice-mod1 \
846 tst-dlmopen-twice-mod2 \
848 tst-dlopenfaillinkmod \
852 tst-dlopenfailnodelmod \
855 tst-filterobj-filtee \
857 tst-finilazyfailmod \
862 tst-initlazyfailmod \
874 tst-ldconfig-ld-mod \
875 tst-ldconfig-soname-lib-with-soname \
876 tst-ldconfig-soname-lib-without-soname \
878 tst-nodelete-dlclose-dso \
879 tst-nodelete-dlclose-plugin \
880 tst-nodelete-opened-lib \
884 tst-non-directory-mod \
886 tst-p_alignmod-base \
892 tst-single_threaded-mod1 \
893 tst-single_threaded-mod2 \
894 tst-single_threaded-mod3 \
895 tst-single_threaded-mod4 \
896 tst-sonamemove-linkmod1 \
897 tst-sonamemove-runmod1 \
898 tst-sonamemove-runmod2 \
941 tst-unwind-ctor-lib \
967 modules-names-cxx
= \
968 tst-dlopen-nodelete-reloc-mod1 \
969 tst-dlopen-nodelete-reloc-mod2 \
970 tst-dlopen-nodelete-reloc-mod3 \
971 tst-dlopen-nodelete-reloc-mod4 \
972 tst-dlopen-nodelete-reloc-mod5 \
973 tst-dlopen-nodelete-reloc-mod6 \
974 tst-dlopen-nodelete-reloc-mod7 \
975 tst-dlopen-nodelete-reloc-mod8 \
976 tst-dlopen-nodelete-reloc-mod9 \
977 tst-dlopen-nodelete-reloc-mod10 \
978 tst-dlopen-nodelete-reloc-mod11 \
979 tst-dlopen-nodelete-reloc-mod12 \
980 tst-dlopen-nodelete-reloc-mod13 \
981 tst-dlopen-nodelete-reloc-mod14 \
982 tst-dlopen-nodelete-reloc-mod15 \
983 tst-dlopen-nodelete-reloc-mod16 \
984 tst-dlopen-nodelete-reloc-mod17 \
985 tst-nodelete-rtldmod \
986 tst-nodelete-uniquemod \
994 $(if
$(CXX
),$(modules-names-cxx
)) \
995 $(modules-execstack-
$(have-z-execstack
)) \
996 $(tlsmod17a-modules
) \
997 $(tlsmod18a-modules
) \
998 $(tst-tls-many-dynamic-modules
) \
999 $(tst-tls-many-dynamic-modules-dep
) \
1000 $(tst-tls-many-dynamic-modules-dep-bad
) \
1003 # Most modules build with _ISOMAC defined, but those filtered out
1004 # depend on internal headers.
1005 modules-names-tests
= $(filter-out ifuncmod
% tst-tlsmod
%,\
1008 # For +depfiles in Makerules.
1009 extra-test-objs
+= tst-auditmod17.os
1011 ifneq (no
,$(have-mtls-descriptor
))
1012 tests
+= tst-gnu2-tls1
1013 modules-names
+= tst-gnu2-tls1mod
1014 $(objpfx
)tst-gnu2-tls1
: $(objpfx
)tst-gnu2-tls1mod.so
1015 tst-gnu2-tls1mod.so-no-z-defs
= yes
1016 CFLAGS-tst-gnu2-tls1mod.c
+= -mtls-dialect
=$(have-mtls-descriptor
)
1017 endif # $(have-mtls-descriptor)
1019 ifeq (yes
,$(have-protected-data
))
1020 modules-names
+= tst-protected1moda tst-protected1modb
1021 tests
+= tst-protected1a tst-protected1b
1022 $(objpfx
)tst-protected1a
: $(addprefix $(objpfx
),tst-protected1moda.so tst-protected1modb.so
)
1023 $(objpfx
)tst-protected1b
: $(addprefix $(objpfx
),tst-protected1modb.so tst-protected1moda.so
)
1024 tst-protected1modb.so-no-z-defs
= yes
1025 # These tests fail with GCC versions prior to 5.1 and with some versions
1026 # of binutils. See https://sourceware.org/bugzilla/show_bug.cgi?id=17709
1027 # and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 for details.
1028 # Perhaps in future we can make these XFAILs conditional on some detection
1029 # of compiler/linker behavior/version.
1030 test-xfail-tst-protected1a
= yes
1031 test-xfail-tst-protected1b
= yes
1033 ifeq (yesyes
,$(have-fpie
)$(build-shared
))
1034 modules-names
+= tst-piemod1
1035 tests
+= tst-pie1 tst-pie2 tst-dlopen-pie tst-dlopen-tlsmodid-pie \
1037 tests-pie
+= tst-pie1 tst-pie2 tst-dlopen-tlsmodid-pie tst-dlopen-self-pie
1038 ifeq (yes
,$(have-protected-data
))
1040 tests-pie
+= vismain
1041 CFLAGS-vismain.c
+= $(PIE-ccflag
)
1044 modules-execstack-yes
= tst-execstack-mod
1045 extra-test-objs
+= $(addsuffix .os
,$(strip $(modules-names
)))
1047 # filtmod1.so, tst-big-note-lib.so, tst-ro-dynamic-mod.so have special
1049 modules-names-nobuild
+= \
1056 tst-ro-dynamic-mod \
1057 # modules-names-nobuild
1059 tests
+= $(tests-static
)
1061 ifeq (yes
,$(have-ifunc
))
1062 tests-ifuncstatic
:= \
1063 ifuncmain1picstatic \
1065 ifuncmain2picstatic \
1067 ifuncmain4picstatic \
1069 ifuncmain5picstatic \
1071 ifuncmain7picstatic \
1074 ifeq (yes
,$(have-gcc-ifunc
))
1075 tests-ifuncstatic
+= ifuncmain9static ifuncmain9picstatic
1077 tests-static
+= $(tests-ifuncstatic
)
1078 tests-internal
+= $(tests-ifuncstatic
)
1079 ifeq (yes
,$(build-shared
))
1081 tst-ifunc-fault-bindnow \
1082 tst-ifunc-fault-lazy \
1084 # Note: sysdeps/x86_64/ifuncmain8.c uses ifuncmain8.
1087 ifuncmain1staticpic \
1094 ifuncmain5staticpic \
1098 ifeq (no
,$(with-lld
))
1105 ifeq (yes
,$(have-gcc-ifunc
))
1111 ifunc-test-modules
= \
1118 # ifunc-test-modules
1119 extra-test-objs
+= $(ifunc-test-modules
:=.o
)
1120 test-internal-extras
+= $(ifunc-test-modules
)
1121 ifeq (yes
,$(have-fpie
))
1124 ifuncmain1staticpie \
1129 ifeq (yes
,$(have-gcc-ifunc
))
1130 ifunc-pie-tests
+= ifuncmain9pie
1132 ifeq (no
,$(with-lld
))
1133 ifunc-pie-tests
+= ifuncmain5pie
1135 ifeq (yes
,$(have-textrel_ifunc
))
1136 ifunc-pie-tests
+= tst-ifunc-textrel
1138 tests-internal
+= $(ifunc-pie-tests
)
1139 tests-pie
+= $(ifunc-pie-tests
)
1146 ifeq (no
,$(with-lld
))
1147 modules-names
+= ifuncmod5
1152 ifeq (yes
,$(build-shared
))
1153 ifeq ($(run-built-tests
),yes
)
1155 $(objpfx
)argv0test.out \
1156 $(objpfx
)tst-non-directory-path.out \
1157 $(objpfx
)tst-pathopt.out \
1158 $(objpfx
)tst-rtld-help.out \
1159 $(objpfx
)tst-rtld-list-diagnostics.out \
1160 $(objpfx
)tst-rtld-load-self.out \
1161 $(objpfx
)tst-rtld-preload.out \
1162 $(objpfx
)tst-sprof-basic.out \
1166 $(objpfx
)check-execstack.out \
1167 $(objpfx
)check-initfini.out \
1168 $(objpfx
)check-localplt.out \
1169 $(objpfx
)check-textrel.out \
1170 $(objpfx
)check-wx-segment.out \
1174 ifeq ($(run-built-tests
),yes
)
1176 $(objpfx
)order-cmp.out \
1177 $(objpfx
)order2-cmp.out \
1178 $(objpfx
)tst-array1-cmp.out \
1179 $(objpfx
)tst-array1-static-cmp.out \
1180 $(objpfx
)tst-array2-cmp.out \
1181 $(objpfx
)tst-array3-cmp.out \
1182 $(objpfx
)tst-array4-cmp.out \
1183 $(objpfx
)tst-array5-cmp.out \
1184 $(objpfx
)tst-array5-static-cmp.out \
1185 $(objpfx
)tst-initorder-cmp.out \
1186 $(objpfx
)tst-initorder2-cmp.out \
1187 $(objpfx
)tst-trace1.out \
1188 $(objpfx
)tst-trace2.out \
1189 $(objpfx
)tst-trace3.out \
1190 $(objpfx
)tst-trace4.out \
1191 $(objpfx
)tst-trace5.out \
1192 $(objpfx
)tst-tunables-enable_secure-env.out \
1193 $(objpfx
)tst-unused-dep-cmp.out \
1194 $(objpfx
)tst-unused-dep.out \
1198 ifndef avoid-generated
1199 # DSO sorting tests:
1200 # The dso-ordering-test.py script generates testcase source files in $(objpfx),
1201 # creating a $(objpfx)<testcase-name>-dir for each testcase, and creates a
1202 # Makefile fragment to be included.
1203 define include_dsosort_tests
1204 $(objpfx
)$(1).generated-makefile
: $(1)
1205 $(PYTHON
) $(..
)scripts
/dso-ordering-test.py \
1206 --description-file
$$< --objpfx
$(objpfx
) --output-makefile
$$@T
1208 -include $(objpfx
)$(1).generated-makefile
1212 postclean-generated
+= $(objpfx
)/dso-sort-tests-2.generated-makefile \
1213 $(objpfx
)/dso-sort-tests-2.generated-makefile
1215 # Generate from each testcase description file
1216 $(eval
$(call include_dsosort_tests
,dso-sort-tests-1.def
))
1217 $(eval
$(call include_dsosort_tests
,dso-sort-tests-2.def
))
1219 # BZ15311 is intentionally underlinked.
1220 LDFLAGS-tst-bz15311-b.so
+= -Wl
,-z
,lazy
1221 LDFLAGS-tst-bz15311-c.so
+= -Wl
,-z
,lazy
1222 LDFLAGS-tst-bz15311-d.so
+= -Wl
,-z
,lazy
1224 check-abi
: $(objpfx
)check-abi-ld.out \
1225 $(objpfx
)check-abi-version-libc.out
1227 $(objpfx
)check-abi-ld.out \
1228 $(objpfx
)check-abi-version-libc.out \
1230 update-abi
: update-abi-ld
1231 update-all-abi
: update-all-abi-ld
1233 tests-special
+= $(objpfx
)tst-glibcelf.out
1234 $(objpfx
)tst-glibcelf.out
: tst-glibcelf.py elf.h
$(..
)/scripts
/glibcelf.py \
1235 $(..
)/scripts
/glibcextract.py
1236 PYTHONPATH
=$(..
)scripts
$(PYTHON
) tst-glibcelf.py \
1237 --cc="$(CC) $(patsubst -DMODULE_NAME=%,-DMODULE_NAME=testsuite,$(CPPFLAGS))" \
1238 < /dev
/null
> $@
2>&1; $(evaluate-test
)
1240 ifeq ($(run-built-tests
),yes
)
1241 tests-special
+= $(objpfx
)tst-tls-allocation-failure-static-patched.out
1244 # The test requires shared _and_ PIE because the executable
1245 # unit test driver must be able to link with the shared object
1246 # that is going to eventually go into an installed DSO.
1247 ifeq (yesyes
,$(have-fpie
)$(build-shared
))
1248 tests-internal
+= tst-_dl_addr_inside_object
1249 tests-pie
+= tst-_dl_addr_inside_object
1250 $(objpfx
)tst-_dl_addr_inside_object
: $(objpfx
)dl-addr-obj.os
1251 CFLAGS-tst-_dl_addr_inside_object.c
+= $(PIE-ccflag
)
1256 ifeq (yes
,$(build-shared
))
1257 # Make sure these things are built in the `make lib' pass so they can be used
1258 # to run programs during the `make others' pass.
1259 lib-noranlib
: $(objpfx
)$(rtld-installed-name
) \
1260 $(addprefix $(objpfx
),$(extra-objs
))
1263 # Command to link into a larger single relocatable object.
1264 reloc-link
= $(LINK.o
) -nostdlib
-nostartfiles
-r
1266 $(objpfx
)dl-allobjs.os
: $(all-rtld-routines
:%=$(objpfx
)%.os
)
1267 $(reloc-link
) -o
$@
$^
1269 # Link together the dynamic linker into a single relocatable object.
1270 # First we do a link against libc_pic.a just to get a link map,
1271 # and discard the object produced by that link. From the link map
1272 # we can glean all the libc modules that need to go into the dynamic
1273 # linker. Then we do a recursive make that goes into all the subdirs
1274 # those modules come from and builds special rtld-foo.os versions that
1275 # are compiled with special flags, and puts these modules into rtld-libc.a
1276 # for us. Then we do the real link using rtld-libc.a instead of libc_pic.a.
1278 # These symbols need to be stubbed out during symbol discovery because
1279 # their implementation is provided differently in rtld, and the symbol
1280 # discovery mechanism is not compatible with the libc implementation
1281 # when compiled for libc.
1282 rtld-stubbed-symbols
= \
1283 __GI___pthread_disable_asynccancel \
1284 __GI___pthread_enable_asynccancel \
1285 __libc_assert_fail \
1286 __pthread_disable_asynccancel \
1287 __pthread_enable_asynccancel \
1292 # rtld-stubbed-symbols
1294 ifeq ($(have-ssp
),yes
)
1295 # rtld is not built with the stack protector, so these references will
1296 # go away in the rebuilds.
1297 rtld-stubbed-symbols
+= __stack_chk_fail __stack_chk_fail_local
1300 $(objpfx
)librtld.map
: $(objpfx
)dl-allobjs.os
$(common-objpfx
)libc_pic.a
1302 for symbol in
$(rtld-stubbed-symbols
); do \
1303 echo
".globl $$symbol"; \
1305 done |
$(CC
) -o
$@T.o
$(ASFLAGS
) -c
-x assembler
-
1306 $(reloc-link
) -o
$@.o
$@T.o
'-Wl,-(' $^
-lgcc
'-Wl,-)' -Wl
,-Map
,$@T
1310 # For lld, skip preceding addresses and values before matching the archive and the member.
1311 $(objpfx
)librtld.mk
: $(objpfx
)librtld.map Makefile
1313 sed
-n
's@^[0-9a-f ]*$(common-objpfx)\([^(]*\)(\([^)]*\.os\)) *.*$$@\1 \2@p' \
1315 while read lib file
; do \
1318 LC_ALL
=C grep
-F
-l
/$$file \
1319 $(common-objpfx
)stamp.os
$(common-objpfx
)*/stamp.os | \
1321 sed
's@^$(common-objpfx)\([^/]*\)/stamp\.os$$@rtld-\1'" +=$$file@"\
1324 echo rtld-
$${lib
%%/*} += $$file ;; \
1325 *) echo
"Wasn't expecting $$lib($$file)" >&2; exit
1 ;; \
1328 echo rtld-subdirs
= `LC_ALL=C sed 's/^rtld-\([^ ]*\).*$$/\1/' $@T \
1329 | LC_ALL=C sort -u` >> $@T
1332 $(objpfx
)rtld-libc.a
: $(objpfx
)librtld.mk FORCE
1333 $(MAKE
) -f
$< -f rtld-Rules
1335 $(objpfx
)librtld.os
: $(objpfx
)dl-allobjs.os
$(objpfx
)rtld-libc.a
1336 $(LINK.o
) -nostdlib
-nostartfiles
-r
-o
$@
'-Wl,-(' $^
-lgcc
'-Wl,-)' \
1339 generated
+= librtld.map librtld.mk rtld-libc.a librtld.os.map
1341 z-now-yes
= -Wl
,-z
,now
1343 $(objpfx
)ld.so
: $(objpfx
)librtld.os
$(ld-map
)
1344 # Link into a temporary file so that we don't touch $@ at all
1345 # if the sanity check below fails.
1346 $(LINK.o
) -nostdlib
-nostartfiles
-shared
-o
$@.new \
1347 $(LDFLAGS-rtld
) -Wl
,-z
,defs
$(z-now-
$(bind-now
)) \
1349 $(filter-out $(map-file
),$^
) $(load-map-file
) \
1350 -Wl
,-soname
=$(rtld-installed-name
)
1351 $(call after-link
,$@.new
)
1352 $(READELF
) -s
$@.new \
1353 |
$(AWK
) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
1356 ifeq (yes
,$(build-shared
))
1357 # interp.c exists just to get the runtime linker path into libc.so.
1358 $(objpfx
)interp.os
: $(common-objpfx
)runtime-linker.h
1361 ifneq (ld.so
,$(rtld-installed-name
))
1362 # Make sure ld.so.1 exists in the build directory so we can link
1364 $(objpfx
)$(rtld-installed-name
): $(objpfx
)ld.so
1366 generated
+= $(rtld-installed-name
)
1369 # Build a file mentioning all trustworthy directories to look for shared
1370 # libraries when using LD_LIBRARY_PATH in a setuid program. The user can
1371 # add directories to the list by defining $(user-defined-trusted-dirs)
1372 # before starting make.
1373 $(objpfx
)trusted-dirs.h
: $(objpfx
)trusted-dirs.st
; @
:
1374 $(objpfx
)trusted-dirs.st
: Makefile
$(..
)Makeconfig
1375 $(make-target-directory
)
1376 echo
"$(subst :, ,$(default-rpath) $(user-defined-trusted-dirs))" \
1377 |
$(AWK
) -f gen-trusted-dirs.awk
> ${@
:st
=T
};
1378 echo
'#define DL_DST_LIB "$(notdir $(slibdir))"' >> ${@
:st
=T
}
1379 $(move-if-change
) ${@
:st
=T
} ${@
:st
=h
}
1381 CPPFLAGS-dl-load.c
+= -I
$(objpfx
).
-I
$(csu-objpfx
).
1383 ifeq (yes
,$(build-shared
))
1384 $(inst_rtlddir
)/$(rtld-installed-name
): $(objpfx
)ld.so
$(+force)
1385 $(make-target-directory
)
1386 $(do-install-program
)
1388 # Creates the relative /usr/bin/ld.so symbolic link.
1389 $(inst_bindir
)/ld.so
: $(inst_rtlddir
)/$(rtld-installed-name
)
1390 $(make-target-directory
)
1393 # Special target called by parent to install just the dynamic linker.
1394 .PHONY
: ldso_install
1395 ldso_install
: $(inst_rtlddir
)/$(rtld-installed-name
)
1396 endif # $(build-shared)
1399 # Workarounds for ${exec_prefix} expansion in configure variables.
1400 # config.status cannot be used directly for processing ldd.bash.in or
1401 # expanding variables such as sysconfdir because the expansion
1402 # contains the literal string ${exec_prefix}, which is not valid in C
1403 # headers or installed shell scripts.
1405 ldd-rewrite
= -e
's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \
1406 -e
's%@VERSION@%$(version)%g' \
1407 -e
's|@PKGVERSION@|$(PKGVERSION)|g' \
1408 -e
's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \
1409 -e
's%@TEXTDOMAINDIR@%$(localedir)%g'
1411 ifeq ($(ldd-rewrite-script
),no
)
1413 LC_ALL
=C sed
$(ldd-rewrite
) < $< > $@.new
1417 LC_ALL
=C sed
$(ldd-rewrite
) < $< \
1418 | LC_ALL
=C sed
-f
$(patsubst $(..
)/%,/%,$(..
)$(ldd-rewrite-script
)) > $@.new
1422 $(objpfx
)ldd
: ldd.bash.in
$(common-objpfx
)soversions.mk \
1423 $(common-objpfx
)config.make
1428 $(objpfx
)sln
: $(sln-modules
:%=$(objpfx
)%.o
)
1430 $(objpfx
)ldconfig
: $(ldconfig-modules
:%=$(objpfx
)%.o
)
1432 SYSCONF-FLAGS
:= -D
'SYSCONFDIR="$(sysconfdir)"'
1433 CFLAGS-ldconfig.c
+= $(SYSCONF-FLAGS
) -D
'LIBDIR="$(libdir)"' \
1434 -D
'SLIBDIR="$(slibdir)"'
1435 libof-ldconfig
= ldconfig
1436 CFLAGS-dl-cache.c
+= $(SYSCONF-FLAGS
)
1437 CFLAGS-cache.c
+= $(SYSCONF-FLAGS
)
1438 CFLAGS-rtld.c
+= $(SYSCONF-FLAGS
)
1439 CFLAGS-dl-usage.c
+= $(SYSCONF-FLAGS
) \
1440 -D
'RTLD="$(rtlddir)/$(rtld-installed-name)"'
1441 CFLAGS-dl-diagnostics.c
+= $(SYSCONF-FLAGS
) \
1442 -D
'PREFIX="$(prefix)"' \
1443 -D
'RTLD="$(rtlddir)/$(rtld-installed-name)"'
1445 cpp-srcs-left
:= $(all-rtld-routines
:=.os
)
1447 include $(patsubst %,$(..
)libof-iterator.mk
,$(cpp-srcs-left
))
1449 test-modules
= $(addprefix $(objpfx
),$(addsuffix .so
,$(strip $(modules-names
))))
1450 generated
+= $(addsuffix .so
,$(strip $(modules-names
)))
1452 $(objpfx
)testobj1_1.so
: $(objpfx
)testobj1.so
1453 $(objpfx
)testobj2.so
: $(objpfx
)testobj1.so
1454 $(objpfx
)testobj6.so
: $(objpfx
)testobj1.so
$(objpfx
)testobj2.so
1455 $(objpfx
)failobj.so
: $(objpfx
)testobj6.so
1456 $(objpfx
)dep1.so
: $(objpfx
)dep2.so
$(objpfx
)dep4.so
1457 $(objpfx
)dep2.so
: $(objpfx
)dep3.so
$(objpfx
)dep4.so
1458 $(objpfx
)dep4.so
: $(objpfx
)dep3.so
1459 $(objpfx
)nodelmod3.so
: $(objpfx
)nodelmod4.so
1460 $(objpfx
)neededobj2.so
: $(objpfx
)neededobj1.so
1461 $(objpfx
)neededobj3.so
: $(objpfx
)neededobj1.so
$(objpfx
)neededobj2.so
1462 $(objpfx
)neededobj4.so
: $(objpfx
)neededobj1.so
$(objpfx
)neededobj2.so \
1463 $(objpfx
)neededobj3.so
1464 $(objpfx
)neededobj6.so
: $(objpfx
)neededobj5.so
1465 $(objpfx
)unload2mod.so
: $(objpfx
)unload2dep.so
1466 $(objpfx
)firstobj.so
: $(shared-thread-library
)
1467 $(objpfx
)reldep4mod1.so
: $(objpfx
)reldep4mod3.so
1468 $(objpfx
)reldep4mod2.so
: $(objpfx
)reldep4mod4.so
1469 $(objpfx
)dblloadmod1.so
: $(objpfx
)dblloadmod3.so
1470 $(objpfx
)dblloadmod2.so
: $(objpfx
)dblloadmod3.so
1471 $(objpfx
)reldepmod5.so
: $(objpfx
)reldepmod2.so
1472 $(objpfx
)reldepmod6.so
: $(objpfx
)reldepmod2.so
1473 $(objpfx
)reldep6mod1.so
: $(objpfx
)reldep6mod0.so
1474 $(objpfx
)reldep6mod2.so
: $(objpfx
)reldep6mod1.so
1475 $(objpfx
)reldep6mod3.so
: $(objpfx
)reldep6mod2.so
1476 $(objpfx
)reldep6mod4.so
: $(objpfx
)reldep6mod1.so
1477 $(objpfx
)tst-tlsmod3.so
: $(objpfx
)tst-tlsmod2.so
1478 $(objpfx
)tst-tlsmod8.so
: $(objpfx
)tst-tlsmod7.so
1479 $(objpfx
)tst-tlsmod10.so
: $(objpfx
)tst-tlsmod9.so
1480 $(objpfx
)tst-tlsmod12.so
: $(objpfx
)tst-tlsmod11.so
1481 $(objpfx
)tst-tlsmod13a.so
: $(objpfx
)tst-tlsmod13.so
1482 # For tst-tls9-static, make sure the modules it dlopens have libc.so in DT_NEEDED
1483 $(objpfx
)tst-tlsmod5.so
: $(common-objpfx
)libc.so
1484 $(objpfx
)tst-tlsmod6.so
: $(common-objpfx
)libc.so
1485 $(objpfx
)tst-tls19mod1.so
: $(objpfx
)tst-tls19mod2.so
$(objpfx
)tst-tls19mod3.so
1486 $(objpfx
)tst-tls19mod3.so
: $(objpfx
)ld.so
1487 $(objpfx
)reldep8mod3.so
: $(objpfx
)reldep8mod1.so
$(objpfx
)reldep8mod2.so
1488 $(objpfx
)nodel2mod3.so
: $(objpfx
)nodel2mod1.so
$(objpfx
)nodel2mod2.so
1489 $(objpfx
)reldep9mod2.so
: $(objpfx
)reldep9mod1.so
1490 $(objpfx
)reldep9mod3.so
: $(objpfx
)reldep9mod1.so
$(objpfx
)reldep9mod2.so
1491 $(objpfx
)unload3mod1.so
: $(objpfx
)unload3mod3.so
1492 $(objpfx
)unload3mod2.so
: $(objpfx
)unload3mod3.so
1493 $(objpfx
)unload3mod3.so
: $(objpfx
)unload3mod4.so
1494 $(objpfx
)unload4mod1.so
: $(objpfx
)unload4mod2.so
$(objpfx
)unload4mod3.so
1495 $(objpfx
)unload4mod2.so
: $(objpfx
)unload4mod4.so
$(objpfx
)unload4mod3.so
1496 $(objpfx
)unload7mod2.so
: $(objpfx
)unload7mod1.so
1497 $(objpfx
)unload8mod1.so
: $(objpfx
)unload8mod2.so
1498 $(objpfx
)unload8mod2.so
: $(objpfx
)unload8mod3.so
1499 $(objpfx
)tst-initordera2.so
: $(objpfx
)tst-initordera1.so
1500 $(objpfx
)tst-initorderb2.so
: $(objpfx
)tst-initorderb1.so
$(objpfx
)tst-initordera2.so
1501 $(objpfx
)tst-initordera3.so
: $(objpfx
)tst-initorderb2.so
$(objpfx
)tst-initorderb1.so
1502 $(objpfx
)tst-initordera4.so
: $(objpfx
)tst-initordera3.so
1503 $(objpfx
)tst-initorder
: $(objpfx
)tst-initordera4.so
$(objpfx
)tst-initordera1.so
$(objpfx
)tst-initorderb2.so
1504 $(objpfx
)tst-null-argv
: $(objpfx
)tst-null-argv-lib.so
1505 $(objpfx
)tst-tlsalign
: $(objpfx
)tst-tlsalign-lib.so
1506 $(objpfx
)tst-nodelete-opened.out
: $(objpfx
)tst-nodelete-opened-lib.so
1508 $(objpfx
)tst-tlsalign-extern
: $(objpfx
)tst-tlsalign-vars.o
1509 $(objpfx
)tst-tlsalign-extern-static
: $(objpfx
)tst-tlsalign-vars.o
1511 tst-null-argv-ENV
= LD_DEBUG
=all LD_DEBUG_OUTPUT
=$(objpfx
)tst-null-argv.debug.out
1512 LDFLAGS-nodel2mod3.so
= -Wl
,--no-as-needed
1513 LDFLAGS-reldepmod5.so
= -Wl
,--no-as-needed
1514 LDFLAGS-reldep6mod1.so
= -Wl
,--no-as-needed
1515 LDFLAGS-reldep6mod4.so
= -Wl
,--no-as-needed
1516 LDFLAGS-reldep8mod3.so
= -Wl
,--no-as-needed
1517 LDFLAGS-unload4mod1.so
= -Wl
,--no-as-needed
1518 LDFLAGS-unload4mod2.so
= -Wl
,--no-as-needed
1519 LDFLAGS-tst-initorder
= -Wl
,--no-as-needed
1520 LDFLAGS-tst-initordera2.so
= -Wl
,--no-as-needed
1521 LDFLAGS-tst-initordera3.so
= -Wl
,--no-as-needed
1522 LDFLAGS-tst-initordera4.so
= -Wl
,--no-as-needed
1523 LDFLAGS-tst-initorderb2.so
= -Wl
,--no-as-needed
1524 LDFLAGS-tst-tlsmod5.so
= -nostdlib
-Wl
,--no-as-needed
1525 LDFLAGS-tst-tlsmod6.so
= -nostdlib
-Wl
,--no-as-needed
1527 # The following tests are underlinked, and rely on late loading. On toolchains
1528 # that set -z now by default, this leads to failures to load or fix up the
1529 # executables being tested.
1530 LDFLAGS-circlemod2.so
= -Wl
,-z
,lazy
1531 LDFLAGS-tst-tls20mod-bad.so
= -Wl
,-z
,lazy
1532 LDFLAGS-reldep6mod1.so
+= -Wl
,-z
,lazy
1533 LDFLAGS-constload2.so
= -Wl
,-z
,lazy
1534 LDFLAGS-constload3.so
= -Wl
,-z
,lazy
1535 LDFLAGS-dblloadmod3.so
= -Wl
,-z
,lazy
1536 LDFLAGS-ifuncmod6.so
= -Wl
,-z
,lazy
1537 LDFLAGS-ltglobmod2.so
= -Wl
,-z
,lazy
1538 LDFLAGS-testobj1.so
= -Wl
,-z
,lazy
1539 LDFLAGS-testobj6.so
= -Wl
,-z
,lazy
1541 testobj1.so-no-z-defs
= yes
1542 testobj3.so-no-z-defs
= yes
1543 testobj4.so-no-z-defs
= yes
1544 testobj5.so-no-z-defs
= yes
1545 testobj6.so-no-z-defs
= yes
1546 failobj.so-no-z-defs
= yes
1547 constload2.so-no-z-defs
= yes
1548 constload3.so-no-z-defs
= yes
1549 nodelmod1.so-no-z-defs
= yes
1550 nodelmod2.so-no-z-defs
= yes
1551 nodelmod4.so-no-z-defs
= yes
1552 nodel2mod2.so-no-z-defs
= yes
1553 reldepmod2.so-no-z-defs
= yes
1554 reldepmod3.so-no-z-defs
= yes
1555 reldepmod4.so-no-z-defs
= yes
1556 reldep4mod4.so-no-z-defs
= yes
1557 reldep4mod2.so-no-z-defs
= yes
1558 ltglobmod2.so-no-z-defs
= yes
1559 dblloadmod3.so-no-z-defs
= yes
1560 tst-tlsmod1.so-no-z-defs
= yes
1561 tst-tlsmod2.so-no-z-defs
= yes
1562 tst-tlsmod3.so-no-z-defs
= yes
1563 tst-tlsmod4.so-no-z-defs
= yes
1564 tst-tlsmod7.so-no-z-defs
= yes
1565 tst-tlsmod8.so-no-z-defs
= yes
1566 tst-tlsmod9.so-no-z-defs
= yes
1567 tst-tlsmod10.so-no-z-defs
= yes
1568 tst-tlsmod12.so-no-z-defs
= yes
1569 tst-tlsmod14a.so-no-z-defs
= yes
1570 tst-tlsmod14b.so-no-z-defs
= yes
1571 tst-tlsmod15a.so-no-z-defs
= yes
1572 tst-tlsmod16b.so-no-z-defs
= yes
1573 circlemod2.so-no-z-defs
= yes
1574 circlemod3.so-no-z-defs
= yes
1575 circlemod3a.so-no-z-defs
= yes
1576 reldep8mod2.so-no-z-defs
= yes
1577 reldep9mod1.so-no-z-defs
= yes
1578 unload3mod4.so-no-z-defs
= yes
1579 unload4mod1.so-no-z-defs
= yes
1580 ifuncmod1.so-no-z-defs
= yes
1581 ifuncmod5.so-no-z-defs
= yes
1582 ifuncmod6.so-no-z-defs
= yes
1583 tst-auditmod9a.so-no-z-defs
= yes
1584 tst-auditmod9b.so-no-z-defs
= yes
1585 tst-nodelete-uniquemod.so-no-z-defs
= yes
1586 tst-nodelete-rtldmod.so-no-z-defs
= yes
1587 tst-nodelete-zmod.so-no-z-defs
= yes
1588 tst-nodelete2mod.so-no-z-defs
= yes
1590 ifeq ($(build-shared
),yes
)
1591 # Build all the modules even when not actually running test programs.
1592 tests
: $(test-modules
)
1595 LDFLAGS-loadtest
= -rdynamic
1597 $(objpfx
)loadtest.out
: $(test-modules
)
1599 $(objpfx
)neededtest.out
: $(objpfx
)neededobj1.so
$(objpfx
)neededobj2.so \
1600 $(objpfx
)neededobj3.so
1602 $(objpfx
)neededtest2.out
: $(objpfx
)neededobj1.so
$(objpfx
)neededobj2.so \
1603 $(objpfx
)neededobj3.so
1605 $(objpfx
)neededtest3.out
: $(objpfx
)neededobj1.so
$(objpfx
)neededobj2.so \
1606 $(objpfx
)neededobj3.so
$(objpfx
)neededobj4.so
1608 $(objpfx
)neededtest4
: $(objpfx
)neededobj1.so
1609 $(objpfx
)neededtest4.out
: $(objpfx
)neededobj5.so
$(objpfx
)neededobj6.so
1611 $(objpfx
)restest1
: $(objpfx
)testobj1.so
$(objpfx
)testobj1_1.so
1612 LDFLAGS-restest1
= -rdynamic
1614 LDFLAGS-restest2
= -rdynamic
1616 $(objpfx
)restest1.out
: $(test-modules
)
1618 preloadtest-preloads
= testobj1 testobj2 testobj3 testobj4 testobj5
1619 $(objpfx
)preloadtest
: $(objpfx
)testobj6.so
1620 LDFLAGS-preloadtest
= -rdynamic
1621 $(objpfx
)preloadtest.out
: $(preloadtest-preloads
:%=$(objpfx
)%.so
)
1623 LD_PRELOAD
=$(subst $(empty
) ,:,$(strip $(preloadtest-preloads
:=.so
)))
1625 LDFLAGS-loadfail
= -rdynamic
1627 $(objpfx
)loadfail.out
: $(objpfx
)failobj.so
$(objpfx
)testobj1.so \
1628 $(objpfx
)testobj2.so
$(objpfx
)testobj3.so \
1629 $(objpfx
)testobj4.so
$(objpfx
)testobj5.so
1631 LDFLAGS-multiload
= -rdynamic
1632 CFLAGS-multiload.c
+= -DOBJDIR
=\"$(elf-objpfx
)\"
1634 $(objpfx
)multiload.out
: $(objpfx
)testobj1.so
1636 LDFLAGS-origtest
= -rdynamic
1637 $(objpfx
)origtest.out
: $(objpfx
)testobj1.so
1639 $(objpfx
)resolvfail.out
: $(objpfx
)testobj1.so
1640 ifeq ($(have-thread-library
),yes
)
1641 $(objpfx
)resolvfail
: $(shared-thread-library
)
1644 $(objpfx
)constload1.out
: $(objpfx
)constload2.so
$(objpfx
)constload3.so
1646 $(objpfx
)circleload1.out
: $(objpfx
)circlemod1.so \
1647 $(objpfx
)circlemod1a.so
1649 $(objpfx
)circlemod1.so
: $(objpfx
)circlemod2.so
1650 $(objpfx
)circlemod2.so
: $(objpfx
)circlemod3.so
1651 $(objpfx
)circlemod1a.so
: $(objpfx
)circlemod2a.so
1652 $(objpfx
)circlemod2a.so
: $(objpfx
)circlemod3a.so
1654 $(objpfx
)order
: $(addprefix $(objpfx
),dep4.so dep3.so dep2.so dep1.so
)
1656 $(objpfx
)order-cmp.out
: $(objpfx
)order.out
1657 (echo
"0123456789" | cmp
$< -) > $@
; \
1660 $(objpfx
)vismain
: $(addprefix $(objpfx
),vismod1.so vismod2.so
)
1661 $(objpfx
)vismain.out
: $(addprefix $(objpfx
),vismod3.so
)
1662 vismain-ENV
= LD_PRELOAD
=$(addprefix $(objpfx
),vismod3.so
)
1664 $(objpfx
)noload
: $(objpfx
)testobj1.so
1665 LDFLAGS-noload
= -rdynamic
-Wl
,--no-as-needed
1666 $(objpfx
)noload.out
: $(objpfx
)testobj5.so
1668 $(objpfx
)noload-mem.out
: $(objpfx
)noload.out
1669 $(common-objpfx
)malloc
/mtrace
$(objpfx
)noload.mtrace
> $@
; \
1671 noload-ENV
= MALLOC_TRACE
=$(objpfx
)noload.mtrace \
1672 LD_PRELOAD
=$(common-objpfx
)/malloc
/libc_malloc_debug.so
1674 LDFLAGS-nodelete
= -rdynamic
1675 LDFLAGS-nodelmod1.so
= -Wl
,--enable-new-dtags
,-z
,nodelete
1676 LDFLAGS-nodelmod4.so
= -Wl
,--enable-new-dtags
,-z
,nodelete
1677 $(objpfx
)nodelete.out
: $(objpfx
)nodelmod1.so
$(objpfx
)nodelmod2.so \
1678 $(objpfx
)nodelmod3.so
1680 LDFLAGS-nodlopenmod.so
= -Wl
,--enable-new-dtags
,-z
,nodlopen
1681 $(objpfx
)nodlopen.out
: $(objpfx
)nodlopenmod.so
1683 $(objpfx
)nodlopenmod2.so
: $(objpfx
)nodlopenmod.so
1684 $(objpfx
)nodlopen2.out
: $(objpfx
)nodlopenmod2.so
1686 $(objpfx
)filtmod1.so
: $(objpfx
)filtmod1.os
$(objpfx
)filtmod2.so
1687 $(LINK.o
) -shared
-o
$@
-B
$(csu-objpfx
) $(LDFLAGS.so
) \
1689 -L
$(subst :, -L
,$(rpath-link
)) \
1690 -Wl
,-rpath-link
=$(rpath-link
) \
1691 $< -Wl
,-F
,$(objpfx
)filtmod2.so
1692 $(objpfx
)filter: $(objpfx
)filtmod1.so
1694 # This does not link against libc.
1695 CFLAGS-filtmod1.c
+= $(no-stack-protector
)
1697 $(objpfx
)unload.out
: $(objpfx
)unloadmod.so
1699 $(objpfx
)reldep.out
: $(objpfx
)reldepmod1.so
$(objpfx
)reldepmod2.so
1701 $(objpfx
)reldep2.out
: $(objpfx
)reldepmod1.so
$(objpfx
)reldepmod3.so
1703 $(objpfx
)reldep3.out
: $(objpfx
)reldepmod1.so
$(objpfx
)reldepmod4.so
1705 $(objpfx
)reldep4.out
: $(objpfx
)reldep4mod1.so
$(objpfx
)reldep4mod2.so
1707 $(objpfx
)next
: $(objpfx
)nextmod1.so
$(objpfx
)nextmod2.so
1708 LDFLAGS-next
= -Wl
,--no-as-needed
1710 $(objpfx
)tst-next-ver
: $(objpfx
)nextmod3.so
1711 LDFLAGS-tst-next-ver
= -Wl
,--no-as-needed
1713 $(objpfx
)unload2.out
: $(objpfx
)unload2mod.so
$(objpfx
)unload2dep.so
1715 $(objpfx
)lateglobal.out
: $(objpfx
)ltglobmod1.so
$(objpfx
)ltglobmod2.so
1717 $(objpfx
)tst-pathopt.out
: tst-pathopt.sh
$(objpfx
)tst-pathopt \
1718 $(objpfx
)pathoptobj.so
1719 $(SHELL
) $< $(common-objpfx
) '$(test-wrapper-env)' \
1720 '$(run-program-env)'; \
1723 $(objpfx
)tst-rtld-load-self.out
: tst-rtld-load-self.sh
$(objpfx
)ld.so
1724 $(SHELL
) $^
'$(test-wrapper)' '$(test-wrapper-env)' > $@
; \
1727 tst-rtld-preload-OBJS
= $(subst $(empty
) ,:,$(strip $(preloadtest-preloads
:=.so
)))
1728 $(objpfx
)tst-rtld-preload.out
: tst-rtld-preload.sh
$(objpfx
)ld.so \
1729 $(objpfx
)preloadtest \
1730 $(preloadtest-preloads
:%=$(objpfx
)%.so
)
1731 $(SHELL
) $< $(objpfx
)ld.so
$(objpfx
)preloadtest \
1732 '$(test-wrapper-env)' '$(run_program_env)' \
1733 '$(rpath-link)' '$(tst-rtld-preload-OBJS)' > $@
; \
1736 $(objpfx
)initfirst.out
: $(objpfx
)firstobj.so
1738 $(objpfx
)global
: $(objpfx
)globalmod1.so
1739 $(objpfx
)global.out
: $(objpfx
)reldepmod1.so
$(objpfx
)reldepmod4.so
1741 $(objpfx
)dblload.out
: $(objpfx
)dblloadmod1.so
$(objpfx
)dblloadmod2.so
1743 $(objpfx
)dblunload.out
: $(objpfx
)dblloadmod1.so
$(objpfx
)dblloadmod2.so
1745 $(objpfx
)reldep5.out
: $(objpfx
)reldepmod5.so
$(objpfx
)reldepmod6.so
1747 $(objpfx
)reldep6.out
: $(objpfx
)reldep6mod3.so
$(objpfx
)reldep6mod4.so
1749 $(objpfx
)reldep7.out
: $(objpfx
)reldep7mod1.so
$(objpfx
)reldep7mod2.so
1751 $(objpfx
)reldep8.out
: $(objpfx
)reldep8mod3.so
1753 LDFLAGS-nodel2mod2.so
= -Wl
,--enable-new-dtags
,-z
,nodelete
1754 $(objpfx
)nodelete2.out
: $(objpfx
)nodel2mod3.so
1756 $(objpfx
)reldep9.out
: $(objpfx
)reldep9mod3.so
1758 $(objpfx
)tst-tls3
: $(objpfx
)tst-tlsmod1.so
1760 $(objpfx
)tst-tls4.out
: $(objpfx
)tst-tlsmod2.so
1762 $(objpfx
)tst-tls5.out
: $(objpfx
)tst-tlsmod2.so
1764 $(objpfx
)tst-tls6.out
: $(objpfx
)tst-tlsmod2.so
1766 $(objpfx
)tst-tls7.out
: $(objpfx
)tst-tlsmod3.so
1768 $(objpfx
)tst-tls8.out
: $(objpfx
)tst-tlsmod3.so
$(objpfx
)tst-tlsmod4.so
1770 $(objpfx
)tst-tls9.out
: $(objpfx
)tst-tlsmod5.so
$(objpfx
)tst-tlsmod6.so
1772 $(objpfx
)tst-tls10
: $(objpfx
)tst-tlsmod8.so
$(objpfx
)tst-tlsmod7.so
1774 $(objpfx
)tst-tls11
: $(objpfx
)tst-tlsmod10.so
$(objpfx
)tst-tlsmod9.so
1776 $(objpfx
)tst-tls12
: $(objpfx
)tst-tlsmod12.so
$(objpfx
)tst-tlsmod11.so
1778 $(objpfx
)tst-tls13.out
: $(objpfx
)tst-tlsmod13a.so
1780 $(objpfx
)tst-tls14
: $(objpfx
)tst-tlsmod14a.so
1781 $(objpfx
)tst-tls14.out
: $(objpfx
)tst-tlsmod14b.so
1783 $(objpfx
)tst-tls15.out
: $(objpfx
)tst-tlsmod15a.so
$(objpfx
)tst-tlsmod15b.so
1785 $(objpfx
)tst-tls-dlinfo.out
: $(objpfx
)tst-tlsmod2.so
1789 $(objpfx
)tst-tls16.out
: $(objpfx
)tst-tlsmod16a.so
$(objpfx
)tst-tlsmod16b.so
1791 $(objpfx
)tst-tls17.out
: $(objpfx
)tst-tlsmod17b.so
1792 $(patsubst %,$(objpfx
)%.os
,$(tlsmod17a-modules
)): $(objpfx
)tst-tlsmod17a
%.os
: tst-tlsmod17a.c
1793 $(compile-command.c
) -DN
=$*
1794 $(patsubst %,$(objpfx
)%.so
,$(tlsmod17a-modules
)): $(objpfx
)tst-tlsmod17a
%.so
: $(objpfx
)ld.so
1795 $(objpfx
)tst-tlsmod17b.so
: $(patsubst %,$(objpfx
)%.so
,$(tlsmod17a-modules
))
1797 $(objpfx
)tst-tls18.out
: $(patsubst %,$(objpfx
)%.so
,$(tlsmod18a-modules
))
1798 $(patsubst %,$(objpfx
)%.os
,$(tlsmod18a-modules
)): $(objpfx
)tst-tlsmod18a
%.os
: tst-tlsmod18a.c
1799 $(compile-command.c
) -DN
=$*
1800 $(patsubst %,$(objpfx
)%.so
,$(tlsmod18a-modules
)): $(objpfx
)tst-tlsmod18a
%.so
: $(objpfx
)ld.so
1802 $(objpfx
)tst-tls19.out
: $(objpfx
)tst-tls19mod1.so
1804 CFLAGS-tst-align.c
+= $(stack-align-test-flags
)
1805 CFLAGS-tst-align2.c
+= $(stack-align-test-flags
)
1806 CFLAGS-tst-alignmod.c
+= $(stack-align-test-flags
)
1807 CFLAGS-tst-alignmod2.c
+= $(stack-align-test-flags
)
1808 $(objpfx
)tst-align.out
: $(objpfx
)tst-alignmod.so
1809 $(objpfx
)tst-align2
: $(objpfx
)tst-alignmod2.so
1810 $(objpfx
)tst-align3
: $(objpfx
)tst-alignmod3.so
1811 ifeq (yes
,$(have-fpie
))
1812 CFLAGS-tst-align3.c
+= $(PIE-ccflag
)
1814 LDFLAGS-tst-align3
+= -Wl
,-z
,max-page-size
=0x200000
1815 LDFLAGS-tst-alignmod3.so
+= -Wl
,-z
,max-page-size
=0x200000
1816 $(objpfx
)tst-alignmod3.so
: $(libsupport
)
1818 $(objpfx
)unload3.out
: $(objpfx
)unload3mod1.so
$(objpfx
)unload3mod2.so \
1819 $(objpfx
)unload3mod3.so
$(objpfx
)unload3mod4.so
1821 $(objpfx
)unload4.out
: $(objpfx
)unload4mod1.so
$(objpfx
)unload4mod3.so
1823 $(objpfx
)unload5.out
: $(objpfx
)unload3mod1.so
$(objpfx
)unload3mod2.so \
1824 $(objpfx
)unload3mod3.so
$(objpfx
)unload3mod4.so
1826 $(objpfx
)unload6.out
: $(objpfx
)unload6mod1.so
$(objpfx
)unload6mod2.so \
1827 $(objpfx
)unload6mod3.so
1829 $(objpfx
)unload7.out
: $(objpfx
)unload7mod1.so
$(objpfx
)unload7mod2.so
1830 unload7-ENV
= MALLOC_PERTURB_
=85
1832 $(objpfx
)unload8.out
: $(objpfx
)unload8mod1.so
$(objpfx
)unload8mod1x.so
1834 $(objpfx
)tst-tls9-static.out
: $(objpfx
)tst-tlsmod5.so
$(objpfx
)tst-tlsmod6.so
1836 ifeq ($(have-z-execstack
),yes
)
1837 $(objpfx
)tst-execstack.out
: $(objpfx
)tst-execstack-mod.so
1838 CPPFLAGS-tst-execstack.c
+= -DUSE_PTHREADS
=0
1839 LDFLAGS-tst-execstack
= -Wl
,-z
,noexecstack
1840 LDFLAGS-tst-execstack-mod.so
= -Wl
,-z
,execstack
1842 $(objpfx
)tst-execstack-needed
: $(objpfx
)tst-execstack-mod.so
1843 LDFLAGS-tst-execstack-needed
= -Wl
,-z
,noexecstack
1845 LDFLAGS-tst-execstack-prog
= -Wl
,-z
,execstack
1846 CFLAGS-tst-execstack-prog.c
+= -Wno-trampolines
1847 CFLAGS-tst-execstack-mod.c
+= -Wno-trampolines
1850 LDFLAGS-tst-array2
= -Wl
,--no-as-needed
1851 LDFLAGS-tst-array5
= -Wl
,--no-as-needed
1853 $(objpfx
)tst-array1-cmp.out
: tst-array1.exp
$(objpfx
)tst-array1.out
1857 $(objpfx
)tst-array1-static-cmp.out
: tst-array1.exp \
1858 $(objpfx
)tst-array1-static.out
1862 $(objpfx
)tst-array2
: $(objpfx
)tst-array2dep.so
1863 $(objpfx
)tst-array2-cmp.out
: tst-array2.exp
$(objpfx
)tst-array2.out
1867 $(objpfx
)tst-array3-cmp.out
: tst-array1.exp
$(objpfx
)tst-array3.out
1871 $(objpfx
)tst-array4.out
: $(objpfx
)tst-array2dep.so
1872 $(objpfx
)tst-array4-cmp.out
: tst-array4.exp
$(objpfx
)tst-array4.out
1876 $(objpfx
)tst-array5
: $(objpfx
)tst-array5dep.so
1877 $(objpfx
)tst-array5-cmp.out
: tst-array5.exp
$(objpfx
)tst-array5.out
1881 $(objpfx
)tst-array5-static-cmp.out
: tst-array5-static.exp \
1882 $(objpfx
)tst-array5-static.out
1886 CFLAGS-tst-pie1.c
+= $(pie-ccflag
)
1887 CFLAGS-tst-pie2.c
+= $(pie-ccflag
)
1889 $(objpfx
)tst-piemod1.so
: $(libsupport
)
1890 $(objpfx
)tst-pie1
: $(objpfx
)tst-piemod1.so
1891 $(objpfx
)tst-dlopen-pie.out
: $(objpfx
)tst-pie1
1893 ifeq (yes
,$(build-shared
))
1894 # NB: Please keep cet-built-dso in sysdeps/x86/Makefile in sync with
1895 # all-built-dso here.
1896 all-built-dso
:= $(common-objpfx
)elf
/ld.so
$(common-objpfx
)libc.so \
1897 $(filter-out $(common-objpfx
)linkobj
/libc.so
, \
1898 $(sort $(wildcard $(addprefix $(common-objpfx
), \
1902 $(all-built-dso
:=.dyn
): %.dyn
: %
1904 LC_ALL
=C
$(READELF
) -W
-d
$< > $@T
1907 common-generated
+= $(all-built-dso
:$(common-objpfx
)%=%.dyn
)
1909 $(objpfx
)check-textrel.out
: $(..
)scripts
/check-textrel.awk \
1910 $(all-built-dso
:=.dyn
)
1911 LC_ALL
=C
$(AWK
) -f
$^
> $@
; \
1913 generated
+= check-textrel.out
1915 $(objpfx
)execstack-default
: $(first-word
$(wildcard $(sysdirs
:%=%/stackinfo.h
)))
1916 $(make-target-directory
)
1917 { echo
'#include <elf.h>'; \
1918 echo
'#include <stackinfo.h>'; \
1919 echo
'#if (DEFAULT_STACK_PERMS & PF_X) == 0'; \
1920 echo
'@@@execstack-no@@@'; \
1922 echo
'@@@execstack-yes@@@'; \
1923 echo
'#endif'; } | \
1924 $(CC
) $(CFLAGS
) $(CPPFLAGS
) -E
-x c-header
- | \
1925 sed
-n
-e
's/^@@@\(.*\)@@@/\1/p' > $@T
1927 generated
+= execstack-default
1929 $(all-built-dso
:=.phdr
): %.phdr
: %
1931 LC_ALL
=C
$(READELF
) -W
-l
$< > $@T
1934 common-generated
+= $(all-built-dso
:$(common-objpfx
)%=%.phdr
)
1936 $(objpfx
)check-execstack.out
: $(..
)scripts
/check-execstack.awk \
1937 $(objpfx
)execstack-default \
1938 $(all-built-dso
:=.phdr
)
1939 LC_ALL
=C
$(AWK
) -v
"xfail=$(check-execstack-xfail)" -f
$^
> $@
; \
1941 generated
+= check-execstack.out
1943 $(objpfx
)check-wx-segment.out
: $(..
)scripts
/check-wx-segment.py \
1944 $(all-built-dso
:=.phdr
)
1945 $(PYTHON
) $^
--xfail
="$(check-wx-segment-xfail)" > $@
; \
1947 generated
+= check-wx-segment.out
1949 $(objpfx
)tst-dlmodcount.out
: $(test-modules
)
1951 $(all-built-dso
:=.jmprel
): %.jmprel
: % Makefile
1953 LC_ALL
=C
$(READELF
) -W
-S
-d
-r
$< > $@T
1956 common-generated
+= $(all-built-dso
:$(common-objpfx
)%=%.jmprel
)
1958 localplt-built-dso
:= $(addprefix $(common-objpfx
),\
1963 resolv
/libresolv.so \
1965 ifeq ($(build-mathvec
),yes
)
1966 localplt-built-dso
+= $(addprefix $(common-objpfx
), mathvec
/libmvec.so
)
1968 ifeq ($(have-thread-library
),yes
)
1969 localplt-built-dso
+= $(filter-out %_nonshared.a
, $(shared-thread-library
))
1971 ifneq ($(pthread-in-libc
),yes
)
1972 localplt-built-dso
+= $(addprefix $(common-objpfx
), rt
/librt.so
)
1975 vpath localplt.data
$(+sysdep_dirs
)
1977 $(objpfx
)check-localplt.out
: $(..
)scripts
/check-localplt.awk \
1978 $(..
)scripts
/localplt.awk \
1979 $(localplt-built-dso
:=.jmprel
) \
1981 LC_ALL
=C
$(AWK
) -f
$(filter-out $< %localplt.data
,$^
) | \
1982 LC_ALL
=C
$(AWK
) -f
$< $(filter %localplt.data
,$^
) - \
1987 $(all-built-dso
:=.dynsym
): %.dynsym
: %
1989 LC_ALL
=C
$(READELF
) -W
--dyn-syms
$< > $@T
1992 common-generated
+= $(all-built-dso
:$(common-objpfx
)%=%.dynsym
)
1994 $(objpfx
)check-initfini.out
: $(..
)scripts
/check-initfini.awk \
1995 $(all-built-dso
:=.dynsym
)
1996 LC_ALL
=C
$(AWK
) -f
$^
> $@
; \
1998 generated
+= check-initfini.out
2000 $(objpfx
)tst-dlopenrpath
: $(objpfx
)tst-dlopenrpathmod.so
2001 CFLAGS-tst-dlopenrpath.c
+= -DPFX
=\"$(objpfx
)\"
2002 LDFLAGS-tst-dlopenrpathmod.so
+= -Wl
,-rpath
,\
$$ORIGIN/test-subdir
2003 $(objpfx
)tst-dlopenrpath.out
: $(objpfx
)firstobj.so
2005 $(objpfx
)tst-deep1mod2.so
: $(objpfx
)tst-deep1mod3.so
2006 $(objpfx
)tst-deep1
: $(objpfx
)tst-deep1mod1.so
2007 $(objpfx
)tst-deep1.out
: $(objpfx
)tst-deep1mod2.so
2008 LDFLAGS-tst-deep1
+= -rdynamic
2009 tst-deep1mod3.so-no-z-defs
= yes
2011 $(objpfx
)tst-dlmopen1.out
: $(objpfx
)tst-dlmopen1mod.so
2013 $(objpfx
)tst-dlmopen2.out
: $(objpfx
)tst-dlmopen1mod.so
2015 $(objpfx
)tst-dlmopen3.out
: $(objpfx
)tst-dlmopen1mod.so
2017 $(objpfx
)tst-dlmopen4.out
: $(objpfx
)tst-dlmopen1mod.so
2019 $(objpfx
)tst-audit1.out
: $(objpfx
)tst-auditmod1.so
2020 tst-audit1-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod1.so
2022 $(objpfx
)tst-audit2.out
: $(objpfx
)tst-auditmod1.so
$(objpfx
)tst-auditmod9b.so
2023 # Prevent GCC-5 from translating a malloc/memset pair into calloc
2024 CFLAGS-tst-audit2.c
+= -fno-builtin
2025 tst-audit2-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod1.so
2027 $(objpfx
)tst-audit9.out
: $(objpfx
)tst-auditmod9a.so
$(objpfx
)tst-auditmod9b.so
2028 tst-audit9-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod9a.so
2030 $(objpfx
)tst-audit8
: $(libm
)
2031 $(objpfx
)tst-audit8.out
: $(objpfx
)tst-auditmod1.so
2032 tst-audit8-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod1.so
2034 $(objpfx
)tst-global1.out
: $(objpfx
)testobj6.so
$(objpfx
)testobj2.so
2036 $(objpfx
)tst-global2
: $(objpfx
)tst-globalmod2.so
2037 $(objpfx
)tst-global2.out
: $(objpfx
)reldepmod1.so
$(objpfx
)reldepmod4.so
2038 LDFLAGS-tst-global2
= -Wl
,--enable-new-dtags
2039 LDFLAGS-tst-globalmod2.so
= -Wl
,--enable-new-dtags
2041 $(objpfx
)order2.out
: $(objpfx
)order2mod1.so
$(objpfx
)order2mod2.so
2042 $(objpfx
)order2-cmp.out
: $(objpfx
)order2.out
2043 (echo
"12345" | cmp
$< -) > $@
; \
2045 $(objpfx
)order2mod1.so
: $(objpfx
)order2mod4.so
2046 $(objpfx
)order2mod4.so
: $(objpfx
)order2mod3.so
2047 $(objpfx
)order2mod2.so
: $(objpfx
)order2mod3.so
2048 order2mod2.so-no-z-defs
= yes
2049 LDFLAGS-order2mod1.so
= -Wl
,--no-as-needed
2050 LDFLAGS-order2mod2.so
= -Wl
,--no-as-needed
2052 tst-stackguard1-ARGS
= --command
"$(host-test-program-cmd) --child"
2053 tst-stackguard1-static-ARGS
= --command
"$(objpfx)tst-stackguard1-static --child"
2055 tst-ptrguard1-ARGS
= --command
"$(host-test-program-cmd) --child"
2056 # When built statically, the pointer guard interface uses
2057 # __pointer_chk_guard_local.
2058 CFLAGS-tst-ptrguard1-static.c
+= -DPTRGUARD_LOCAL
2059 tst-ptrguard1-static-ARGS
= --command
"$(objpfx)tst-ptrguard1-static --child"
2061 $(objpfx
)tst-leaks1-mem.out
: $(objpfx
)tst-leaks1.out
2062 $(common-objpfx
)malloc
/mtrace
$(objpfx
)tst-leaks1.mtrace
> $@
; \
2065 tst-leaks1-ENV
= MALLOC_TRACE
=$(objpfx
)tst-leaks1.mtrace \
2066 LD_PRELOAD
=$(common-objpfx
)/malloc
/libc_malloc_debug.so
2068 $(objpfx
)tst-thrlock
: $(shared-thread-library
)
2069 $(objpfx
)tst-thrlock.out
: $(libm
)
2070 $(objpfx
)tst-noload.out
: $(libm
)
2072 tst-tst-dlopen-tlsmodid-no-pie
= yes
2073 $(objpfx
)tst-dlopen-tlsmodid
: $(shared-thread-library
)
2074 $(objpfx
)tst-dlopen-tlsmodid.out
: $(objpfx
)tst-dlopen-self
2075 CFLAGS-tst-dlopen-tlsmodid-pie.c
+= $(pie-ccflag
)
2076 $(objpfx
)tst-dlopen-tlsmodid-pie
: $(shared-thread-library
)
2077 $(objpfx
)tst-dlopen-tlsmodid-pie.out
: $(objpfx
)tst-dlopen-self-pie
2078 $(objpfx
)tst-dlopen-tlsmodid-container
: $(shared-thread-library
)
2079 LDFLAGS-tst-dlopen-tlsmodid-container
+= -Wl
,-rpath
,\
$$ORIGIN
2081 tst-tst-dlopen-self-no-pie
= yes
2082 CFLAGS-tst-dlopen-self-pie.c
+= $(pie-ccflag
)
2083 LDFLAGS-tst-dlopen-self-container
+= -Wl
,-rpath
,\
$$ORIGIN
2085 CFLAGS-ifuncmain1pic.c
+= $(pic-ccflag
)
2086 CFLAGS-ifuncmain1picstatic.c
+= $(pic-ccflag
)
2087 CFLAGS-ifuncmain1staticpic.c
+= $(pic-ccflag
)
2088 CFLAGS-ifuncdep1pic.c
+= $(pic-ccflag
)
2089 CFLAGS-ifuncmain1vispic.c
+= $(pic-ccflag
)
2090 CFLAGS-ifuncmain2pic.c
+= $(pic-ccflag
)
2091 CFLAGS-ifuncmain2picstatic.c
+= $(pic-ccflag
)
2092 CFLAGS-ifuncdep2pic.c
+= $(pic-ccflag
)
2093 CFLAGS-ifuncmain4picstatic.c
+= $(pic-ccflag
)
2094 CFLAGS-ifuncmain5pic.c
+= $(pic-ccflag
)
2095 CFLAGS-ifuncmain5picstatic.c
+= $(pic-ccflag
)
2096 CFLAGS-ifuncmain5staticpic.c
+= $(pic-ccflag
)
2097 CFLAGS-ifuncdep5pic.c
+= $(pic-ccflag
)
2098 CFLAGS-ifuncmain7pic.c
+= $(pic-ccflag
)
2099 CFLAGS-ifuncmain7picstatic.c
+= $(pic-ccflag
)
2100 CFLAGS-ifuncmain9pic.c
+= $(pic-ccflag
)
2101 CFLAGS-ifuncmain9picstatic.c
+= $(pic-ccflag
)
2103 LDFLAGS-ifuncmain3
= -Wl
,-export-dynamic
2105 CFLAGS-ifuncmain1pie.c
+= $(pie-ccflag
)
2106 CFLAGS-ifuncmain1vispie.c
+= $(pie-ccflag
)
2107 CFLAGS-ifuncmain1staticpie.c
+= $(pie-ccflag
)
2108 CFLAGS-ifuncmain5pie.c
+= $(pie-ccflag
)
2109 CFLAGS-ifuncmain6pie.c
+= $(pie-ccflag
)
2110 CFLAGS-ifuncmain7pie.c
+= $(pie-ccflag
)
2111 CFLAGS-ifuncmain9pie.c
+= $(pie-ccflag
)
2112 CFLAGS-tst-ifunc-textrel.c
+= $(pic-ccflag
)
2114 LDFLAGS-ifuncmain6pie
= -Wl
,-z
,lazy
2116 $(objpfx
)ifuncmain1pie
: $(objpfx
)ifuncmod1.so
2117 $(objpfx
)ifuncmain1staticpie
: $(objpfx
)ifuncdep1pic.o
2118 $(objpfx
)ifuncmain1vispie
: $(objpfx
)ifuncmod1.so
2119 $(objpfx
)ifuncmain5pie
: $(objpfx
)ifuncmod5.so
2120 $(objpfx
)ifuncmain6pie
: $(objpfx
)ifuncmod6.so
2122 $(objpfx
)ifuncmain1
: $(addprefix $(objpfx
),ifuncmod1.so
)
2123 $(objpfx
)ifuncmain1pic
: $(addprefix $(objpfx
),ifuncmod1.so
)
2124 $(objpfx
)ifuncmain1staticpic
: $(addprefix $(objpfx
),ifuncdep1pic.o
)
2125 $(objpfx
)ifuncmain1static
: $(addprefix $(objpfx
),ifuncdep1.o
)
2126 $(objpfx
)ifuncmain1picstatic
: $(addprefix $(objpfx
),ifuncdep1pic.o
)
2127 $(objpfx
)ifuncmain1vis
: $(addprefix $(objpfx
),ifuncmod1.so
)
2128 $(objpfx
)ifuncmain1vispic
: $(addprefix $(objpfx
),ifuncmod1.so
)
2129 $(objpfx
)ifuncmain2
: $(addprefix $(objpfx
),ifuncdep2.o
)
2130 $(objpfx
)ifuncmain2pic
: $(addprefix $(objpfx
),ifuncdep2pic.o
)
2131 $(objpfx
)ifuncmain2static
: $(addprefix $(objpfx
),ifuncdep2.o
)
2132 $(objpfx
)ifuncmain2picstatic
: $(addprefix $(objpfx
),ifuncdep2pic.o
)
2134 $(objpfx
)ifuncmain3.out
: $(objpfx
)ifuncmod3.so
2136 $(objpfx
)ifuncmain5
: $(addprefix $(objpfx
),ifuncmod5.so
)
2137 $(objpfx
)ifuncmain5pic
: $(addprefix $(objpfx
),ifuncmod5.so
)
2138 $(objpfx
)ifuncmain5static
: $(addprefix $(objpfx
),ifuncdep5.o
)
2139 $(objpfx
)ifuncmain5staticpic
: $(addprefix $(objpfx
),ifuncdep5pic.o
)
2140 $(objpfx
)ifuncmain5picstatic
: $(addprefix $(objpfx
),ifuncdep5pic.o
)
2142 LDFLAGS-tst-ifunc-fault-lazy
= -Wl
,-z
,lazy
2143 LDFLAGS-tst-ifunc-fault-bindnow
= -Wl
,-z
,now
2144 define tst-ifunc-fault-script
2145 ( $(test-wrapper
) $(rtld-prefix
) --verify
$^ \
2146 && $(test-wrapper-env
) LD_TRACE_LOADED_OBJECTS
=1 $(rtld-prefix
) $^ \
2147 && $(test-wrapper-env
) LD_TRACE_LOADED_OBJECTS
=1 LD_DEBUG
=unused \
2149 ) > $@
; $(evaluate-test
)
2151 $(objpfx
)tst-ifunc-fault-lazy.out
: $(objpfx
)tst-ifunc-fault-lazy
$(objpfx
)ld.so
2152 $(tst-ifunc-fault-script
)
2153 $(objpfx
)tst-ifunc-fault-bindnow.out
: $(objpfx
)tst-ifunc-fault-bindnow \
2155 $(tst-ifunc-fault-script
)
2157 $(objpfx
)tst-unique1.out
: $(objpfx
)tst-unique1mod1.so \
2158 $(objpfx
)tst-unique1mod2.so
2160 $(objpfx
)tst-unique2
: $(objpfx
)tst-unique2mod1.so
2161 $(objpfx
)tst-unique2.out
: $(objpfx
)tst-unique2mod2.so
2163 $(objpfx
)tst-unique3
: $(objpfx
)tst-unique3lib.so
2164 $(objpfx
)tst-unique3.out
: $(objpfx
)tst-unique3lib2.so
2166 $(objpfx
)tst-unique4
: $(objpfx
)tst-unique4lib.so
2168 $(objpfx
)tst-nodelete.out
: $(objpfx
)tst-nodelete-uniquemod.so \
2169 $(objpfx
)tst-nodelete-rtldmod.so \
2170 $(objpfx
)tst-nodelete-zmod.so
2172 LDFLAGS-tst-nodelete
= -rdynamic
2173 LDFLAGS-tst-nodelete-zmod.so
= -Wl
,--enable-new-dtags
,-z
,nodelete
2175 $(objpfx
)tst-nodelete2.out
: $(objpfx
)tst-nodelete2mod.so
2177 LDFLAGS-tst-nodelete2
= -rdynamic
2179 $(objpfx
)tst-initorder-cmp.out
: tst-initorder.exp
$(objpfx
)tst-initorder.out
2183 $(objpfx
)tst-initorder2
: $(objpfx
)tst-initorder2a.so
$(objpfx
)tst-initorder2d.so
$(objpfx
)tst-initorder2c.so
2184 $(objpfx
)tst-initorder2a.so
: $(objpfx
)tst-initorder2b.so
2185 $(objpfx
)tst-initorder2b.so
: $(objpfx
)tst-initorder2c.so
2186 $(objpfx
)tst-initorder2c.so
: $(objpfx
)tst-initorder2d.so
2187 LDFLAGS-tst-initorder2
= -Wl
,--no-as-needed
2188 LDFLAGS-tst-initorder2a.so
= -Wl
,--no-as-needed
2189 LDFLAGS-tst-initorder2b.so
= -Wl
,--no-as-needed
2190 LDFLAGS-tst-initorder2c.so
= -Wl
,--no-as-needed
2191 define o-iterator-doit
2192 $(objpfx
)tst-initorder2
$o.os
: tst-initorder2.c
; \
2193 $$(compile-command.c
) -DNAME
=\"$o\"
2195 object-suffixes-left
:= a b c d
2196 include $(o-iterator
)
2198 $(objpfx
)tst-initorder2-cmp.out
: tst-initorder2.exp
$(objpfx
)tst-initorder2.out
2202 $(objpfx
)tst-relsort1mod1.so
: $(libm
) $(objpfx
)tst-relsort1mod2.so
2203 $(objpfx
)tst-relsort1mod2.so
: $(libm
)
2204 $(objpfx
)tst-relsort1.out
: $(objpfx
)tst-relsort1mod1.so \
2205 $(objpfx
)tst-relsort1mod2.so
2207 $(objpfx
)tst-unused-dep.out
: $(objpfx
)testobj1.so
2208 $(test-wrapper-env
) \
2209 LD_TRACE_LOADED_OBJECTS
=1 \
2216 $(objpfx
)tst-unused-dep-cmp.out
: $(objpfx
)tst-unused-dep.out
2217 cmp
$< /dev
/null
> $@
; \
2220 $(objpfx
)tst-tunables-enable_secure-env.out
: $(objpfx
)tst-tunables-enable_secure-env
2221 $(test-wrapper-env
) \
2222 GLIBC_TUNABLES
=glibc.rtld.enable_secure
=1 \
2228 $(objpfx
)tst-audit11.out
: $(objpfx
)tst-auditmod11.so
$(objpfx
)tst-audit11mod1.so
2229 tst-audit11-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod11.so
2230 $(objpfx
)tst-audit11mod1.so
: $(objpfx
)tst-audit11mod2.so
2231 LDFLAGS-tst-audit11mod2.so
= -Wl
,--version-script
=tst-audit11mod2.map
,-soname
,tst-audit11mod2.so
2233 $(objpfx
)tst-audit12.out
: $(objpfx
)tst-auditmod12.so
$(objpfx
)tst-audit12mod1.so
$(objpfx
)tst-audit12mod3.so
2234 tst-audit12-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod12.so
2235 $(objpfx
)tst-audit12mod1.so
: $(objpfx
)tst-audit12mod2.so
2236 LDFLAGS-tst-audit12mod2.so
= -Wl
,--version-script
=tst-audit12mod2.map
2238 $(objpfx
)tst-audit13.out
: $(objpfx
)tst-audit13mod1.so
2239 LDFLAGS-tst-audit13mod1.so
= -Wl
,-z
,lazy
2240 tst-audit13-ENV
= LD_AUDIT
=$(objpfx
)tst-audit13mod1.so
2242 $(objpfx
)tst-auditmany.out
: $(objpfx
)tst-auditmanymod1.so \
2243 $(objpfx
)tst-auditmanymod2.so
$(objpfx
)tst-auditmanymod3.so \
2244 $(objpfx
)tst-auditmanymod4.so
$(objpfx
)tst-auditmanymod5.so \
2245 $(objpfx
)tst-auditmanymod6.so
$(objpfx
)tst-auditmanymod7.so \
2246 $(objpfx
)tst-auditmanymod8.so
$(objpfx
)tst-auditmanymod9.so
2247 tst-auditmany-ENV
= \
2248 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
2250 LDFLAGS-tst-audit14
= -Wl
,--audit
=tst-auditlogmod-1.so
,--disable-new-dtags
2251 $(objpfx
)tst-auditlogmod-1.so
: $(libsupport
)
2252 $(objpfx
)tst-audit14.out
: $(objpfx
)tst-auditlogmod-1.so
2253 LDFLAGS-tst-audit14a
= -Wl
,--audit
=tst-auditlogmod-1.so
,--enable-new-dtags
2254 $(objpfx
)tst-audit14a.out
: $(objpfx
)tst-auditlogmod-1.so
2255 LDFLAGS-tst-audit15
= \
2256 -Wl
,--audit
=tst-auditlogmod-1.so
,--depaudit
=tst-auditlogmod-2.so
2257 $(objpfx
)tst-auditlogmod-2.so
: $(libsupport
)
2258 $(objpfx
)tst-audit15.out
: \
2259 $(objpfx
)tst-auditlogmod-1.so
$(objpfx
)tst-auditlogmod-2.so
2260 LDFLAGS-tst-audit16
= \
2261 -Wl
,--audit
=tst-auditlogmod-1.so
:tst-auditlogmod-2.so \
2262 -Wl
,--depaudit
=tst-auditlogmod-3.so
2263 $(objpfx
)tst-auditlogmod-3.so
: $(libsupport
)
2264 $(objpfx
)tst-audit16.out
: \
2265 $(objpfx
)tst-auditlogmod-1.so
$(objpfx
)tst-auditlogmod-2.so \
2266 $(objpfx
)tst-auditlogmod-3.so
2267 $(objpfx
)tst-audit17.out
: $(objpfx
)tst-auditmod17.so
2268 # The test check if a audit library without libc.so on DT_NEEDED works as
2269 # intended, so it uses an explicit link rule.
2270 $(objpfx
)tst-auditmod17.so
: $(objpfx
)tst-auditmod17.os
2271 $(CC
) -nostdlib
-nostartfiles
-shared
-o
$@.new \
2272 $(filter-out $(map-file
),$^
)
2273 $(call after-link
,$@.new
)
2275 CFLAGS-.os
+= $(call elide-stack-protector
,.os
,tst-auditmod17
)
2276 tst-audit17-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod17.so
2278 $(objpfx
)tst-audit14-cmp.out
: tst-audit14.exp
$(objpfx
)tst-audit14.out
2281 $(objpfx
)tst-audit14a-cmp.out
: tst-audit14.exp
$(objpfx
)tst-audit14a.out
2284 $(objpfx
)tst-audit15-cmp.out
: tst-audit15.exp
$(objpfx
)tst-audit15.out
2287 $(objpfx
)tst-audit16-cmp.out
: tst-audit16.exp
$(objpfx
)tst-audit16.out
2291 $(objpfx
)tst-audit18.out
: $(objpfx
)tst-auditmod18.so \
2292 $(objpfx
)tst-audit18mod.so
2293 tst-audit18-ARGS
= -- $(host-test-program-cmd
)
2295 $(objpfx
)tst-audit19a.out
: $(objpfx
)tst-auditmod19a.so
2296 tst-audit19a-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod19a.so
2298 $(objpfx
)tst-audit19b.out
: $(objpfx
)tst-auditmod19b.so
2299 $(objpfx
)tst-audit19b
: $(objpfx
)tst-audit19bmod.so
2300 tst-audit19b-ARGS
= -- $(host-test-program-cmd
)
2302 $(objpfx
)tst-audit20.out
: $(objpfx
)tst-auditmod20.so
2303 tst-audit20-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod20.so
2305 $(objpfx
)tst-audit21
: $(shared-thread-library
)
2306 $(objpfx
)tst-audit21.out
: $(objpfx
)tst-auditmod21a.so
2307 $(objpfx
)tst-auditmod21a.so
: $(objpfx
)tst-auditmod21b.so
2308 tst-audit21-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod21a.so
2310 $(objpfx
)tst-audit22.out
: $(objpfx
)tst-auditmod22.so
2311 tst-audit22-ARGS
= -- $(host-test-program-cmd
)
2313 $(objpfx
)tst-audit23.out
: $(objpfx
)tst-auditmod23.so \
2314 $(objpfx
)tst-audit23mod.so
2315 tst-audit23-ARGS
= -- $(host-test-program-cmd
)
2317 $(objpfx
)tst-audit24a.out
: $(objpfx
)tst-auditmod24a.so
2318 $(objpfx
)tst-audit24a
: $(objpfx
)tst-audit24amod1.so \
2319 $(objpfx
)tst-audit24amod2.so
2320 tst-audit24a-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod24a.so
2321 LDFLAGS-tst-audit24a
= -Wl
,-z
,now
2323 $(objpfx
)tst-audit24b.out
: $(objpfx
)tst-auditmod24b.so
2324 $(objpfx
)tst-audit24b
: $(objpfx
)tst-audit24bmod1.so \
2325 $(objpfx
)tst-audit24bmod2.so
2326 $(objpfx
)tst-audit24bmod1
: $(objpfx
)tst-audit24bmod2.so
2327 # The test checks if a library without .gnu.version correctly calls the
2328 # audit callbacks. So it uses an explicit link rule to avoid linking
2330 $(objpfx
)tst-audit24bmod1.so
: $(objpfx
)tst-audit24bmod1.os
2331 $(CC
) -nostdlib
-nostartfiles
-shared
-o
$@.new
$(objpfx
)tst-audit24bmod1.os \
2333 $(call after-link
,$@.new
)
2335 CFLAGS-.os
+= $(call elide-stack-protector
,.os
,tst-audit24bmod1
)
2336 $(objpfx
)tst-audit24bmod2.so
: $(objpfx
)tst-audit24bmod2.os
2337 $(CC
) -nostdlib
-nostartfiles
-shared
-o
$@.new
$(objpfx
)tst-audit24bmod2.os
2338 $(call after-link
,$@.new
)
2340 CFLAGS-.os
+= $(call elide-stack-protector
,.os
,tst-audit24bmod2
)
2341 tst-audit24b-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod24b.so
2342 LDFLAGS-tst-audit24b
= -Wl
,-z
,now
2344 # Same as tst-audit24a, but tests LD_BIND_NOW
2345 $(objpfx
)tst-audit24c.out
: $(objpfx
)tst-auditmod24c.so
2346 $(objpfx
)tst-audit24c
: $(objpfx
)tst-audit24amod1.so \
2347 $(objpfx
)tst-audit24amod2.so
2348 tst-audit24c-ENV
= LD_BIND_NOW
=1 LD_AUDIT
=$(objpfx
)tst-auditmod24c.so
2349 LDFLAGS-tst-audit24c
= -Wl
,-z
,lazy
2351 $(objpfx
)tst-audit24d.out
: $(objpfx
)tst-auditmod24d.so
2352 $(objpfx
)tst-audit24d
: $(objpfx
)tst-audit24dmod1.so \
2353 $(objpfx
)tst-audit24dmod2.so
2354 $(objpfx
)tst-audit24dmod1.so
: $(objpfx
)tst-audit24dmod3.so
2355 LDFLAGS-tst-audit24dmod1.so
= -Wl
,-z
,now
2356 $(objpfx
)tst-audit24dmod2.so
: $(objpfx
)tst-audit24dmod4.so
2357 LDFLAGS-tst-audit24dmod2.so
= -Wl
,-z
,lazy
2358 tst-audit24d-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod24d.so
2359 LDFLAGS-tst-audit24d
= -Wl
,-z
,lazy
2361 $(objpfx
)tst-audit25a.out
: $(objpfx
)tst-auditmod25.so
2362 $(objpfx
)tst-audit25a
: $(objpfx
)tst-audit25mod1.so \
2363 $(objpfx
)tst-audit25mod2.so \
2364 $(objpfx
)tst-audit25mod3.so \
2365 $(objpfx
)tst-audit25mod4.so
2366 LDFLAGS-tst-audit25a
= -Wl
,-z
,lazy
2367 $(objpfx
)tst-audit25mod1.so
: $(objpfx
)tst-audit25mod3.so
2368 LDFLAGS-tst-audit25mod1.so
= -Wl
,-z
,now
2369 $(objpfx
)tst-audit25mod2.so
: $(objpfx
)tst-audit25mod4.so
2370 LDFLAGS-tst-audit25mod2.so
= -Wl
,-z
,lazy
2371 tst-audit25a-ARGS
= -- $(host-test-program-cmd
)
2373 $(objpfx
)tst-audit25b.out
: $(objpfx
)tst-auditmod25.so
2374 $(objpfx
)tst-audit25b
: $(objpfx
)tst-audit25mod1.so \
2375 $(objpfx
)tst-audit25mod2.so \
2376 $(objpfx
)tst-audit25mod3.so \
2377 $(objpfx
)tst-audit25mod4.so
2378 LDFLAGS-tst-audit25b
= -Wl
,-z
,now
2379 tst-audit25b-ARGS
= -- $(host-test-program-cmd
)
2381 $(objpfx
)tst-audit28.out
: $(objpfx
)tst-auditmod28.so
2382 $(objpfx
)tst-auditmod28.so
: $(libsupport
)
2383 tst-audit28-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod28.so
2385 # tst-sonamemove links against an older implementation of the library.
2386 LDFLAGS-tst-sonamemove-linkmod1.so
= \
2387 -Wl
,--version-script
=tst-sonamemove-linkmod1.map \
2388 -Wl
,-soname
,tst-sonamemove-runmod1.so
2389 LDFLAGS-tst-sonamemove-runmod1.so
= -Wl
,--no-as-needed \
2390 -Wl
,--version-script
=tst-sonamemove-runmod1.map \
2391 -Wl
,-soname
,tst-sonamemove-runmod1.so
2392 LDFLAGS-tst-sonamemove-runmod2.so
= \
2393 -Wl
,--version-script
=tst-sonamemove-runmod2.map \
2394 -Wl
,-soname
,tst-sonamemove-runmod2.so
2395 $(objpfx
)tst-sonamemove-runmod1.so
: $(objpfx
)tst-sonamemove-runmod2.so
2396 # Link against the link module, but depend on the run-time modules
2398 $(objpfx
)tst-sonamemove-link
: $(objpfx
)tst-sonamemove-linkmod1.so
2399 $(objpfx
)tst-sonamemove-link.out
: \
2400 $(objpfx
)tst-sonamemove-runmod1.so \
2401 $(objpfx
)tst-sonamemove-runmod2.so
2402 $(objpfx
)tst-sonamemove-dlopen.out
: \
2403 $(objpfx
)tst-sonamemove-runmod1.so \
2404 $(objpfx
)tst-sonamemove-runmod2.so
2406 $(objpfx
)tst-dlmopen-dlerror-mod.so
: $(libsupport
)
2407 $(objpfx
)tst-dlmopen-dlerror.out
: $(objpfx
)tst-dlmopen-dlerror-mod.so
2409 # Override -z defs, so that we can reference an undefined symbol.
2410 # Force lazy binding for the same reason.
2411 LDFLAGS-tst-latepthreadmod.so
= \
2412 -Wl
,-z
,lazy
-Wl
,--unresolved-symbols
=ignore-all
2413 # Do not optimize sibling calls as the test relies on a JMP_SLOT relocation for
2414 # function this_function_is_not_defined.
2415 CFLAGS-tst-latepthreadmod.c
+= -fno-optimize-sibling-calls
2416 $(objpfx
)tst-latepthreadmod.so
: $(shared-thread-library
)
2417 $(objpfx
)tst-latepthread.out
: $(objpfx
)tst-latepthreadmod.so
2419 # The test modules are parameterized by preprocessor macros.
2420 $(patsubst %,$(objpfx
)%.os
,$(tst-tls-many-dynamic-modules
)): \
2421 $(objpfx
)tst-tls-manydynamic
%mod.os
: tst-tls-manydynamicmod.c
2422 $(compile-command.c
) \
2423 -DNAME
=tls_global_
$* -DSETTER
=set_value_
$* -DGETTER
=get_value_
$*
2424 $(objpfx
)tst-tls-manydynamic
: $(shared-thread-library
)
2425 $(objpfx
)tst-tls-manydynamic.out
: \
2426 $(patsubst %,$(objpfx
)%.so
,$(tst-tls-many-dynamic-modules
))
2428 $(objpfx
)tst-ldconfig-X.out
: tst-ldconfig-X.sh
$(objpfx
)ldconfig
2429 $(SHELL
) $< '$(common-objpfx)' '$(test-wrapper-env)' \
2430 '$(run-program-env)' > $@
; \
2433 $(objpfx
)tst-ldconfig-p.out
: tst-ldconfig-p.sh
$(objpfx
)ldconfig
2434 $(SHELL
) $< '$(common-objpfx)' '$(sysconfdir)' '$(test-wrapper-env)' \
2435 '$(run-program-env)' > $@
; \
2438 LDFLAGS-tst-ldconfig-soname-lib-with-soname.so
= \
2439 -Wl
,-soname
,libtst-ldconfig-soname-lib-with-soname.so
.1
2441 $(objpfx
)tst-ldconfig-soname.out
: tst-ldconfig-soname.sh \
2443 $(objpfx
)tst-ldconfig-soname-lib-with-soname.so \
2444 $(objpfx
)tst-ldconfig-soname-lib-without-soname.so
2445 $(SHELL
) $< '$(common-objpfx)' '$(test-wrapper-env)' \
2446 '$(run-program-env)' > $@
; \
2449 # Test static linking of all the libraries we can possibly link
2450 # together. Note that in some configurations this may be less than the
2451 # complete list of libraries we build but we try to maxmimize this list.
2452 ifeq ($(pthread-in-libc
),no
)
2453 $(objpfx
)tst-linkall-static
: \
2454 $(common-objpfx
)resolv
/libanl.a
2456 $(objpfx
)tst-linkall-static
: \
2457 $(common-objpfx
)math
/libm.a \
2458 $(common-objpfx
)resolv
/libresolv.a \
2459 $(common-objpfx
)login
/libutil.a \
2460 $(common-objpfx
)rt
/librt.a \
2461 $(static-thread-library
)
2463 LDFLAGS-nextmod3.so
= -Wl
,--version-script
=nextmod3.map
2465 # The application depends on the DSO, and the DSO loads the plugin.
2466 # The plugin also depends on the DSO. This creates the circular
2467 # dependency via dlopen that we're testing to make sure works.
2468 $(objpfx
)tst-nodelete-dlclose-plugin.so
: $(objpfx
)tst-nodelete-dlclose-dso.so
2469 $(objpfx
)tst-nodelete-dlclose
: $(objpfx
)tst-nodelete-dlclose-dso.so
2470 $(objpfx
)tst-nodelete-dlclose.out
: $(objpfx
)tst-nodelete-dlclose-dso.so \
2471 $(objpfx
)tst-nodelete-dlclose-plugin.so
2473 $(objpfx
)tst-debug1.out
: $(objpfx
)tst-debug1mod1.so
2475 $(objpfx
)tst-debug1mod1.so
: $(objpfx
)testobj1.so
2476 $(OBJCOPY
) --only-keep-debug
$< $@
2478 $(objpfx
)tst-main1
: $(objpfx
)tst-main1mod.so
2479 CRT-tst-main1
:= $(csu-objpfx
)crt1.o
2480 tst-main1-no-pie
= yes
2481 LDLIBS-tst-main1
= $(libsupport
)
2482 tst-main1mod.so-no-z-defs
= yes
2484 LDLIBS-tst-absolute-sym-lib.so
= tst-absolute-sym-lib.lds
2485 $(objpfx
)tst-absolute-sym-lib.so
: $(LDLIBS-tst-absolute-sym-lib.so
)
2486 $(objpfx
)tst-absolute-sym
: $(objpfx
)tst-absolute-sym-lib.so
2488 LDLIBS-tst-absolute-zero-lib.so
= tst-absolute-zero-lib.lds
2489 $(objpfx
)tst-absolute-zero-lib.so
: $(LDLIBS-tst-absolute-zero-lib.so
)
2490 $(objpfx
)tst-absolute-zero
: $(objpfx
)tst-absolute-zero-lib.so
2492 $(objpfx
)tst-big-note
: $(objpfx
)tst-big-note-lib.so
2493 # Avoid creating an ABI tag note, which may come before the
2494 # artificial, large note in tst-big-note-lib.o and invalidate the
2496 $(objpfx
)tst-big-note-lib.so
: $(objpfx
)tst-big-note-lib.o
2497 $(LINK.o
) -shared
-o
$@
$(LDFLAGS.so
) $(dt-relr-ldflag
) $<
2499 $(objpfx
)tst-unwind-ctor
: $(objpfx
)tst-unwind-ctor-lib.so
2501 CFLAGS-tst-unwind-main.c
+= -funwind-tables
-DUSE_PTHREADS
=0
2503 $(objpfx
)tst-initfinilazyfail.out
: \
2504 $(objpfx
)tst-initlazyfailmod.so
$(objpfx
)tst-finilazyfailmod.so
2505 # Override -z defs, so that we can reference an undefined symbol.
2506 # Force lazy binding for the same reason.
2507 LDFLAGS-tst-initlazyfailmod.so
= \
2508 -Wl
,-z
,lazy
-Wl
,--unresolved-symbols
=ignore-all
2509 LDFLAGS-tst-finilazyfailmod.so
= \
2510 -Wl
,-z
,lazy
-Wl
,--unresolved-symbols
=ignore-all
2512 $(objpfx
)tst-dlopenfail.out
: \
2513 $(objpfx
)tst-dlopenfailmod1.so
$(objpfx
)tst-dlopenfailmod2.so
2514 # Order matters here. tst-dlopenfaillinkmod.so's soname ensures a
2515 # run-time loader failure. --as-needed breaks this test because
2516 # nothing actually references tst-dlopenfailmod2.so (with its soname
2517 # tst-dlopenfail-missingmod.so).
2518 LDFLAGS-tst-dlopenfailmod1.so
= -Wl
,--no-as-needed
2519 $(objpfx
)tst-dlopenfailmod1.so
: \
2520 $(shared-thread-library
) $(objpfx
)tst-dlopenfaillinkmod.so
2521 LDFLAGS-tst-dlopenfaillinkmod.so
= -Wl
,-soname
,tst-dlopenfail-missingmod.so
2522 $(objpfx
)tst-dlopenfailmod2.so
: $(objpfx
)tst-dlopenfailnodelmod.so
2523 $(objpfx
)tst-dlopenfail-2.out
: \
2524 $(objpfx
)tst-dlopenfailmod1.so
$(objpfx
)tst-dlopenfailmod2.so \
2525 $(objpfx
)tst-dlopenfailmod3.so
2526 # tst-dlopenfailnodelmod.so emulates how libpthread was linked.
2527 $(objpfx
)tst-dlopenfailnodelmod.so
: $(libsupport
)
2528 LDFLAGS-tst-dlopenfailnodelmod.so
= \
2529 -Wl
,--enable-new-dtags
,-z
,nodelete
,-z
,initfirst
2530 # tst-dlopenfail should export the libsupport symbols, so that
2531 # tst-dlopenfailnodelmod.so uses them for error reporting.
2532 LDFLAGS-tst-dlopenfail
= -Wl
,-E
2534 $(objpfx
)tst-dlopen-nodelete-reloc.out
: \
2535 $(objpfx
)tst-dlopen-nodelete-reloc-mod1.so \
2536 $(objpfx
)tst-dlopen-nodelete-reloc-mod2.so \
2537 $(objpfx
)tst-dlopen-nodelete-reloc-mod3.so \
2538 $(objpfx
)tst-dlopen-nodelete-reloc-mod4.so \
2539 $(objpfx
)tst-dlopen-nodelete-reloc-mod5.so \
2540 $(objpfx
)tst-dlopen-nodelete-reloc-mod6.so \
2541 $(objpfx
)tst-dlopen-nodelete-reloc-mod7.so \
2542 $(objpfx
)tst-dlopen-nodelete-reloc-mod8.so \
2543 $(objpfx
)tst-dlopen-nodelete-reloc-mod9.so \
2544 $(objpfx
)tst-dlopen-nodelete-reloc-mod10.so \
2545 $(objpfx
)tst-dlopen-nodelete-reloc-mod11.so \
2546 $(objpfx
)tst-dlopen-nodelete-reloc-mod12.so \
2547 $(objpfx
)tst-dlopen-nodelete-reloc-mod13.so \
2548 $(objpfx
)tst-dlopen-nodelete-reloc-mod14.so \
2549 $(objpfx
)tst-dlopen-nodelete-reloc-mod15.so \
2550 $(objpfx
)tst-dlopen-nodelete-reloc-mod16.so \
2551 $(objpfx
)tst-dlopen-nodelete-reloc-mod17.so
2552 tst-dlopen-nodelete-reloc-mod2.so-no-z-defs
= yes
2553 LDFLAGS-tst-dlopen-nodelete-reloc-mod2.so
= -Wl
,-z
,nodelete
2554 $(objpfx
)tst-dlopen-nodelete-reloc-mod4.so
: \
2555 $(objpfx
)tst-dlopen-nodelete-reloc-mod3.so
2556 LDFLAGS-tst-dlopen-nodelete-reloc-mod4.so
= -Wl
,--no-as-needed
2557 $(objpfx
)tst-dlopen-nodelete-reloc-mod5.so
: \
2558 $(objpfx
)tst-dlopen-nodelete-reloc-mod4.so
2559 LDFLAGS-tst-dlopen-nodelete-reloc-mod5.so
= -Wl
,-z
,nodelete
,--no-as-needed
2560 tst-dlopen-nodelete-reloc-mod5.so-no-z-defs
= yes
2561 tst-dlopen-nodelete-reloc-mod7.so-no-z-defs
= yes
2562 tst-dlopen-nodelete-reloc-mod11.so-no-z-defs
= yes
2563 $(objpfx
)tst-dlopen-nodelete-reloc-mod13.so
: \
2564 $(objpfx
)tst-dlopen-nodelete-reloc-mod12.so
2565 $(objpfx
)tst-dlopen-nodelete-reloc-mod15.so
: \
2566 $(objpfx
)tst-dlopen-nodelete-reloc-mod14.so
2567 tst-dlopen-nodelete-reloc-mod16.so-no-z-defs
= yes
2568 $(objpfx
)tst-dlopen-nodelete-reloc-mod16.so
: \
2569 $(objpfx
)tst-dlopen-nodelete-reloc-mod15.so
2570 LDFLAGS-tst-dlopen-nodelete-reloc-mod16.so
= -Wl
,--no-as-needed
2571 $(objpfx
)tst-dlopen-nodelete-reloc-mod17.so
: \
2572 $(objpfx
)tst-dlopen-nodelete-reloc-mod15.so \
2573 $(objpfx
)tst-dlopen-nodelete-reloc-mod16.so
2574 LDFLAGS-tst-dlopen-nodelete-reloc-mod17.so
= -Wl
,--no-as-needed
2576 $(objpfx
)tst-ldconfig-ld_so_conf-update.out
: $(objpfx
)tst-ldconfig-ld-mod.so
2578 LDFLAGS-tst-filterobj-flt.so
= -Wl
,--filter=$(objpfx
)tst-filterobj-filtee.so
2579 $(objpfx
)tst-filterobj
: $(objpfx
)tst-filterobj-flt.so
2580 $(objpfx
)tst-filterobj.out
: $(objpfx
)tst-filterobj-filtee.so
2581 $(objpfx
)tst-filterobj-dlopen.out
: $(objpfx
)tst-filterobj-filtee.so
2583 LDFLAGS-tst-filterobj-aux.so
= -Wl
,--auxiliary
=$(objpfx
)tst-filterobj-filtee.so
2584 $(objpfx
)tst-auxobj
: $(objpfx
)tst-filterobj-aux.so
2585 $(objpfx
)tst-auxobj.out
: $(objpfx
)tst-filterobj-filtee.so
2586 $(objpfx
)tst-auxobj-dlopen.out
: $(objpfx
)tst-filterobj-filtee.so
2588 $(objpfx
)tst-single_threaded
: $(objpfx
)tst-single_threaded-mod1.so
2589 $(objpfx
)tst-single_threaded.out
: \
2590 $(objpfx
)tst-single_threaded-mod2.so
$(objpfx
)tst-single_threaded-mod3.so
2591 $(objpfx
)tst-single_threaded-static-dlopen
: \
2592 $(objpfx
)tst-single_threaded-mod1.o
2593 $(objpfx
)tst-single_threaded-static-dlopen.out
: \
2594 $(objpfx
)tst-single_threaded-mod2.so
2595 $(objpfx
)tst-single_threaded-pthread
: \
2596 $(objpfx
)tst-single_threaded-mod1.so
$(shared-thread-library
)
2597 $(objpfx
)tst-single_threaded-pthread.out
: \
2598 $(objpfx
)tst-single_threaded-mod2.so
$(objpfx
)tst-single_threaded-mod3.so \
2599 $(objpfx
)tst-single_threaded-mod4.so
2600 $(objpfx
)tst-single_threaded-pthread-static
: $(static-thread-library
)
2602 $(objpfx
)tst-tls-ie
: $(shared-thread-library
)
2603 $(objpfx
)tst-tls-ie.out
: \
2604 $(objpfx
)tst-tls-ie-mod0.so \
2605 $(objpfx
)tst-tls-ie-mod1.so \
2606 $(objpfx
)tst-tls-ie-mod2.so \
2607 $(objpfx
)tst-tls-ie-mod3.so \
2608 $(objpfx
)tst-tls-ie-mod4.so \
2609 $(objpfx
)tst-tls-ie-mod5.so \
2610 $(objpfx
)tst-tls-ie-mod6.so
2612 $(objpfx
)tst-tls-ie-dlmopen
: $(shared-thread-library
)
2613 $(objpfx
)tst-tls-ie-dlmopen.out
: \
2614 $(objpfx
)tst-tls-ie-mod0.so \
2615 $(objpfx
)tst-tls-ie-mod1.so \
2616 $(objpfx
)tst-tls-ie-mod2.so \
2617 $(objpfx
)tst-tls-ie-mod3.so \
2618 $(objpfx
)tst-tls-ie-mod4.so \
2619 $(objpfx
)tst-tls-ie-mod5.so \
2620 $(objpfx
)tst-tls-ie-mod6.so
2622 $(objpfx
)argv0test.out
: tst-rtld-argv0.sh
$(objpfx
)ld.so \
2624 $(SHELL
) $< $(objpfx
)ld.so
$(objpfx
)argv0test \
2625 '$(test-wrapper-env)' '$(run_program_env)' \
2626 '$(rpath-link)' 'test-argv0' > $@
; \
2629 # A list containing the name of the most likely searched subdirectory
2630 # of the glibc-hwcaps directory, for each supported architecture (in
2631 # other words, the oldest hardware level recognized by the
2632 # glibc-hwcaps mechanism for this architecture). Used to obtain test
2633 # coverage for some glibc-hwcaps tests for the widest possible range
2635 glibc-hwcaps-first-subdirs-for-tests
= power9 x86-64-v2 z13
2637 # The test modules are parameterized by preprocessor macros.
2638 LDFLAGS-libmarkermod1-1.so
+= -Wl
,-soname
,libmarkermod1.so
2639 LDFLAGS-libmarkermod2-1.so
+= -Wl
,-soname
,libmarkermod2.so
2640 LDFLAGS-libmarkermod3-1.so
+= -Wl
,-soname
,libmarkermod3.so
2641 LDFLAGS-libmarkermod4-1.so
+= -Wl
,-soname
,libmarkermod4.so
2642 LDFLAGS-libmarkermod5-1.so
+= -Wl
,-soname
,libmarkermod5.so
2643 $(objpfx
)libmarkermod
%.os
: markermodMARKER-VALUE.c
2644 $(compile-command.c
) \
2645 -DMARKER
=marker
$(firstword $(subst -, ,$*)) \
2646 -DVALUE
=$(lastword
$(subst -, ,$*))
2647 $(objpfx
)libmarkermod1.so
: $(objpfx
)libmarkermod1-1.so
2649 $(objpfx
)libmarkermod2.so
: $(objpfx
)libmarkermod2-1.so
2651 $(objpfx
)libmarkermod3.so
: $(objpfx
)libmarkermod3-1.so
2653 $(objpfx
)libmarkermod4.so
: $(objpfx
)libmarkermod4-1.so
2655 $(objpfx
)libmarkermod5.so
: $(objpfx
)libmarkermod5-1.so
2658 # tst-glibc-hwcaps-prepend checks that --glibc-hwcaps-prepend is
2659 # preferred over auto-detected subdirectories.
2660 $(objpfx
)tst-glibc-hwcaps-prepend
: $(objpfx
)libmarkermod1-1.so
2661 $(objpfx
)glibc-hwcaps
/prepend-markermod1
/libmarkermod1.so
: \
2662 $(objpfx
)libmarkermod1-2.so
2663 $(make-target-directory
)
2665 $(objpfx
)glibc-hwcaps
/%/libmarkermod1.so
: $(objpfx
)libmarkermod1-3.so
2666 $(make-target-directory
)
2668 $(objpfx
)tst-glibc-hwcaps-prepend.out
: \
2669 $(objpfx
)tst-glibc-hwcaps-prepend
$(objpfx
)libmarkermod1.so \
2670 $(patsubst %,$(objpfx
)glibc-hwcaps
/%/libmarkermod1.so
,prepend-markermod1 \
2671 $(glibc-hwcaps-first-subdirs-for-tests
))
2672 $(test-wrapper
) $(rtld-prefix
) \
2673 --glibc-hwcaps-prepend prepend-markermod1 \
2677 # Like tst-glibc-hwcaps-prepend, but uses a container and loads the
2678 # library via ld.so.cache. Test setup is contained in the test
2680 $(objpfx
)tst-glibc-hwcaps-prepend-cache.out
: \
2681 $(objpfx
)tst-glibc-hwcaps-prepend-cache
$(objpfx
)libmarkermod1-1.so \
2682 $(objpfx
)libmarkermod1-2.so
$(objpfx
)libmarkermod1-3.so
2684 # tst-glibc-hwcaps-mask checks that --glibc-hwcaps-mask can be used to
2685 # suppress all auto-detected subdirectories.
2686 $(objpfx
)tst-glibc-hwcaps-mask
: $(objpfx
)libmarkermod1-1.so
2687 $(objpfx
)tst-glibc-hwcaps-mask.out
: \
2688 $(objpfx
)tst-glibc-hwcaps-mask
$(objpfx
)libmarkermod1.so \
2689 $(patsubst %,$(objpfx
)glibc-hwcaps
/%/libmarkermod1.so
,\
2690 $(glibc-hwcaps-first-subdirs-for-tests
))
2691 $(test-wrapper
) $(rtld-prefix
) \
2692 --glibc-hwcaps-mask does-not-exist \
2696 # Generic dependency for sysdeps implementation of
2697 # tst-glibc-hwcaps-cache.
2698 $(objpfx
)tst-glibc-hwcaps-cache.out
: $(objpfx
)tst-glibc-hwcaps
2700 tst-tunables-ARGS
= -- $(host-test-program-cmd
)
2701 tst-tunables-enable_secure-ARGS
= -- $(host-test-program-cmd
)
2703 $(objpfx
)list-tunables.out
: tst-rtld-list-tunables.sh
$(objpfx
)ld.so
2704 $(SHELL
) $< $(objpfx
)ld.so
'$(test-wrapper-env)' \
2705 '$(run_program_env)' > $(objpfx
)/tst-rtld-list-tunables.out
2706 cmp tst-rtld-list-tunables.exp \
2707 $(objpfx
)/tst-rtld-list-tunables.out
> $@
; \
2710 tst-dst-static-ENV
= LD_LIBRARY_PATH
='$$ORIGIN'
2712 $(objpfx
)tst-rtld-help.out
: $(objpfx
)ld.so
2713 $(test-wrapper
) $(rtld-prefix
) --help
> $@
; \
2715 echo
"info: ld.so exit status: $$status" >> $@
; \
2719 # Reuses tst-tls-many-dynamic-modules
2720 $(patsubst %,$(objpfx
)%.os
,$(tst-tls-many-dynamic-modules-dep
)): \
2721 $(objpfx
)tst-tls-manydynamic
%mod-dep.os
: tst-tls-manydynamicmod.c
2722 $(compile-command.c
) \
2723 -DNAME
=tls_global_
$* -DSETTER
=set_value_
$* -DGETTER
=get_value_
$*
2724 $(patsubst %,$(objpfx
)%.os
,$(tst-tls-many-dynamic-modules-dep-bad
)): \
2725 $(objpfx
)tst-tls-manydynamic
%mod-dep-bad.os
: tst-tls-manydynamicmod.c
2726 $(compile-command.c
) \
2727 -DNAME
=tls_global_
$* -DSETTER
=set_value_
$* -DGETTER
=get_value_
$*
2728 tst-tls20mod-bad.so-no-z-defs
= yes
2729 # Single dependency.
2730 $(objpfx
)tst-tls-manydynamic0mod-dep.so
: $(objpfx
)tst-tls-manydynamic1mod-dep.so
2731 # Double dependencies.
2732 $(objpfx
)tst-tls-manydynamic2mod-dep.so
: $(objpfx
)tst-tls-manydynamic3mod-dep.so \
2733 $(objpfx
)tst-tls-manydynamic4mod-dep.so
2734 # Double dependencies with each dependency dependent of another module.
2735 $(objpfx
)tst-tls-manydynamic5mod-dep.so
: $(objpfx
)tst-tls-manydynamic6mod-dep.so \
2736 $(objpfx
)tst-tls-manydynamic7mod-dep.so
2737 $(objpfx
)tst-tls-manydynamic6mod-dep.so
: $(objpfx
)tst-tls-manydynamic8mod-dep.so
2738 $(objpfx
)tst-tls-manydynamic7mod-dep.so
: $(objpfx
)tst-tls-manydynamic8mod-dep.so
2739 # Long chain with one double dependency in the middle
2740 $(objpfx
)tst-tls-manydynamic9mod-dep.so
: $(objpfx
)tst-tls-manydynamic10mod-dep.so \
2741 $(objpfx
)tst-tls-manydynamic11mod-dep.so
2742 $(objpfx
)tst-tls-manydynamic10mod-dep.so
: $(objpfx
)tst-tls-manydynamic12mod-dep.so
2743 $(objpfx
)tst-tls-manydynamic12mod-dep.so
: $(objpfx
)tst-tls-manydynamic13mod-dep.so
2744 # Long chain with two double dependencies in the middle
2745 $(objpfx
)tst-tls-manydynamic14mod-dep.so
: $(objpfx
)tst-tls-manydynamic15mod-dep.so
2746 $(objpfx
)tst-tls-manydynamic15mod-dep.so
: $(objpfx
)tst-tls-manydynamic16mod-dep.so \
2747 $(objpfx
)tst-tls-manydynamic17mod-dep.so
2748 $(objpfx
)tst-tls-manydynamic16mod-dep.so
: $(objpfx
)tst-tls-manydynamic18mod-dep.so \
2749 $(objpfx
)tst-tls-manydynamic19mod-dep.so
2750 # Same but with an invalid module.
2751 # Single dependency.
2752 $(objpfx
)tst-tls-manydynamic0mod-dep-bad.so
: $(objpfx
)tst-tls20mod-bad.so
2753 LDFLAGS-tst-tls-manydynamic0mod-dep-bad.so
= -Wl
,--no-as-needed
2754 # Double dependencies.
2755 $(objpfx
)tst-tls-manydynamic1mod-dep-bad.so
: $(objpfx
)tst-tls-manydynamic2mod-dep-bad.so \
2756 $(objpfx
)tst-tls20mod-bad.so
2757 LDFLAGS-tst-tls-manydynamic1mod-dep-bad.so
= -Wl
,--no-as-needed
2758 # Double dependencies with each dependency dependent of another module.
2759 $(objpfx
)tst-tls-manydynamic3mod-dep-bad.so
: $(objpfx
)tst-tls-manydynamic4mod-dep-bad.so \
2760 $(objpfx
)tst-tls-manydynamic5mod-dep-bad.so
2761 LDFLAGS-tst-tls-manydynamic3mod-dep-bad.so
= -Wl
,--no-as-needed
2762 $(objpfx
)tst-tls-manydynamic4mod-dep-bad.so
: $(objpfx
)tst-tls20mod-bad.so
2763 LDFLAGS-tst-tls-manydynamic4mod-dep-bad.so
= -Wl
,--no-as-needed
2764 $(objpfx
)tst-tls-manydynamic5mod-dep-bad.so
: $(objpfx
)tst-tls20mod-bad.so
2765 LDFLAGS-tst-tls-manydynamic5mod-dep-bad.so
= -Wl
,--no-as-needed
2766 # Long chain with one double dependency in the middle
2767 $(objpfx
)tst-tls-manydynamic6mod-dep-bad.so
: $(objpfx
)tst-tls-manydynamic7mod-dep-bad.so \
2768 $(objpfx
)tst-tls-manydynamic8mod-dep-bad.so
2769 LDFLAGS-tst-tls-manydynamic6mod-dep-bad.so
= -Wl
,--no-as-needed
2770 $(objpfx
)tst-tls-manydynamic7mod-dep-bad.so
: $(objpfx
)tst-tls-manydynamic9mod-dep-bad.so
2771 LDFLAGS-tst-tls-manydynamic7mod-dep-bad.so
= -Wl
,--no-as-needed
2772 $(objpfx
)tst-tls-manydynamic9mod-dep-bad.so
: $(objpfx
)tst-tls20mod-bad.so
2773 LDFLAGS-tst-tls-manydynamic9mod-dep-bad.so
= -Wl
,--no-as-needed
2774 # Long chain with two double dependencies in the middle
2775 $(objpfx
)tst-tls-manydynamic10mod-dep-bad.so
: $(objpfx
)tst-tls-manydynamic11mod-dep-bad.so
2776 LDFLAGS-tst-tls-manydynamic10mod-dep-bad.so
= -Wl
,--no-as-needed
2777 $(objpfx
)tst-tls-manydynamic11mod-dep-bad.so
: $(objpfx
)tst-tls-manydynamic12mod-dep-bad.so \
2778 $(objpfx
)tst-tls-manydynamic13mod-dep-bad.so
2779 LDFLAGS-tst-tls-manydynamic11mod-dep-bad.so
= -Wl
,--no-as-needed
2780 $(objpfx
)tst-tls-manydynamic12mod-dep-bad.so
: $(objpfx
)tst-tls-manydynamic14mod-dep-bad.so \
2781 $(objpfx
)tst-tls20mod-bad.so
2782 LDFLAGS-tst-tls-manydynamic12mod-dep-bad.so
= -Wl
,--no-as-needed
2783 $(objpfx
)tst-tls20
: $(shared-thread-library
)
2784 $(objpfx
)tst-tls20.out
: $(objpfx
)tst-tls20mod-bad.so \
2785 $(tst-tls-many-dynamic-modules
:%=$(objpfx
)%.so
) \
2786 $(tst-tls-many-dynamic-modules-dep
:%=$(objpfx
)%.so
) \
2787 $(tst-tls-many-dynamic-modules-dep-bad
:%=$(objpfx
)%.so
) \
2789 # Reuses tst-tls-many-dynamic-modules
2790 $(objpfx
)tst-tls21
: $(shared-thread-library
)
2791 $(objpfx
)tst-tls21.out
: $(objpfx
)tst-tls21mod.so
2792 $(objpfx
)tst-tls21mod.so
: $(tst-tls-many-dynamic-modules
:%=$(objpfx
)%.so
)
2794 $(objpfx
)tst-getauxval-static.out
: $(objpfx
)tst-auxvalmod.so
2795 tst-getauxval-static-ENV
= LD_LIBRARY_PATH
=$(objpfx
):$(common-objpfx
)
2797 $(objpfx
)tst-dlmopen-gethostbyname.out
: $(objpfx
)tst-dlmopen-gethostbyname-mod.so
2799 $(objpfx
)tst-ro-dynamic
: $(objpfx
)tst-ro-dynamic-mod.so
2800 $(objpfx
)tst-ro-dynamic-mod.so
: $(objpfx
)tst-ro-dynamic-mod.os \
2801 tst-ro-dynamic-mod.map
2802 $(LINK.o
) -nostdlib
-nostartfiles
-shared
-o
$@ \
2804 -Wl
,--script
=tst-ro-dynamic-mod.map \
2805 $(objpfx
)tst-ro-dynamic-mod.os
2807 $(objpfx
)tst-rtld-list-diagnostics.out
: tst-rtld-list-diagnostics.py \
2808 $(..
)manual
/dynlink.texi
$(objpfx
)$(rtld-installed-name
)
2809 $(PYTHON
) tst-rtld-list-diagnostics.py \
2810 --manual
=$(..
)manual
/dynlink.texi \
2811 "$(test-wrapper-env) $(objpfx)$(rtld-installed-name) --list-diagnostics" \
2815 $(objpfx
)tst-rtld-run-static.out
: $(objpfx
)/ldconfig
2817 $(objpfx
)tst-dl_find_object.out
: \
2818 $(objpfx
)tst-dl_find_object-mod1.so
$(objpfx
)tst-dl_find_object-mod2.so
2819 $(objpfx
)tst-dl_find_object-static.out
: \
2820 $(objpfx
)tst-dl_find_object-mod1.so
$(objpfx
)tst-dl_find_object-mod2.so
2821 tst-dl_find_object-static-ENV
= $(static-dlopen-environment
)
2822 CFLAGS-tst-dl_find_object.c
+= -funwind-tables
2823 CFLAGS-tst-dl_find_object-static.c
+= -funwind-tables
2824 LDFLAGS-tst-dl_find_object-static
+= -Wl
,--eh-frame-hdr
2825 CFLAGS-tst-dl_find_object-mod1.c
+= -funwind-tables
2826 CFLAGS-tst-dl_find_object-mod2.c
+= -funwind-tables
2827 LDFLAGS-tst-dl_find_object-mod2.so
+= -Wl
,--enable-new-dtags
,-z
,nodelete
2828 $(objpfx
)tst-dl_find_object-threads
: $(shared-thread-library
)
2829 CFLAGS-tst-dl_find_object-threads.c
+= -funwind-tables
2830 $(objpfx
)tst-dl_find_object-threads.out
: \
2831 $(objpfx
)tst-dl_find_object-mod1.so \
2832 $(objpfx
)tst-dl_find_object-mod2.so \
2833 $(objpfx
)tst-dl_find_object-mod3.so \
2834 $(objpfx
)tst-dl_find_object-mod4.so \
2835 $(objpfx
)tst-dl_find_object-mod5.so \
2836 $(objpfx
)tst-dl_find_object-mod6.so \
2837 $(objpfx
)tst-dl_find_object-mod7.so \
2838 $(objpfx
)tst-dl_find_object-mod8.so \
2839 $(objpfx
)tst-dl_find_object-mod9.so
2840 CFLAGS-tst-dl_find_object-mod3.c
+= -funwind-tables
2841 CFLAGS-tst-dl_find_object-mod4.c
+= -funwind-tables
2842 CFLAGS-tst-dl_find_object-mod5.c
+= -funwind-tables
2843 CFLAGS-tst-dl_find_object-mod6.c
+= -funwind-tables
2844 CFLAGS-tst-dl_find_object-mod7.c
+= -funwind-tables
2845 CFLAGS-tst-dl_find_object-mod8.c
+= -funwind-tables
2846 CFLAGS-tst-dl_find_object-mod9.c
+= -funwind-tables
2848 $(objpfx
)tst-p_alignmod-base.so
: $(libsupport
)
2849 LDFLAGS-tst-p_alignmod-base.so
+= -Wl
,-z
,max-page-size
=0x200000
2851 $(objpfx
)tst-p_align1
: $(objpfx
)tst-p_alignmod1.so
2853 # Make a copy of tst-p_alignmod-base.so and lower p_align of the first
2855 $(objpfx
)tst-p_alignmod1.so
: $(objpfx
)tst-p_alignmod-base.so
2857 cp
$(objpfx
)tst-p_alignmod-base.so
$@
2858 $(PYTHON
) $(..
)scripts
/tst-elf-edit.py
-a half
$@
2860 $(objpfx
)tst-p_align2
: $(objpfx
)tst-p_alignmod2.so
2862 # Make a copy of tst-p_alignmod-base.so and update p_align of the first
2864 $(objpfx
)tst-p_alignmod2.so
: $(objpfx
)tst-p_alignmod-base.so
2866 cp
$(objpfx
)tst-p_alignmod-base.so
$@
2867 $(PYTHON
) $(..
)scripts
/tst-elf-edit.py
-a
1 $@
2869 LDFLAGS-tst-p_alignmod3.so
+= -Wl
,-z
,max-page-size
=0x100,-z
,common-page-size
=0x100
2871 $(objpfx
)tst-p_align3
: $(objpfx
)tst-p_alignmod3.so
2872 $(objpfx
)tst-p_align3.out
: tst-p_align3.sh
$(objpfx
)tst-p_align3
2873 $(SHELL
) $< $(common-objpfx
) '$(test-program-prefix)'; \
2876 $(objpfx
)check-abi-version-libc.out
: $(common-objpfx
)libc.so
2877 LC_ALL
=C
$(READELF
) -V
-W
$< \
2878 | sed
-ne
'/.gnu.version_d/, /.gnu.version_r/ p' \
2879 | grep GLIBC_ABI_DT_RELR
> $@
; \
2882 $(objpfx
)check-tst-relr-pie.out
: $(objpfx
)tst-relr-pie
2883 LC_ALL
=C
$(OBJDUMP
) -p
$< \
2884 | sed
-ne
'/required from libc.so/,$$ p' \
2885 | grep GLIBC_ABI_DT_RELR
> $@
; \
2888 # The test checks if a DT_RELR shared library without DT_NEEDED works as
2889 # intended, so it uses an explicit link rule.
2890 $(objpfx
)tst-relr2
: $(objpfx
)tst-relr-mod2.so
2891 $(objpfx
)tst-relr-mod2.so
: $(objpfx
)tst-relr-mod2.os
2892 $(LINK.o
) -nostdlib
-nostartfiles
-Wl
,-z
,pack-relative-relocs \
2893 $(LDFLAGS-soname-fname
) \
2894 -shared
-o
$@.new
$(filter-out $(map-file
),$^
)
2895 $(call after-link
,$@.new
)
2898 # The test checks if a DT_RELR shared library without DT_VERNEED works as
2899 # intended, so it uses an explicit link rule.
2900 $(objpfx
)tst-relr3
: $(objpfx
)tst-relr-mod3a.so
2901 $(objpfx
)tst-relr-mod3b.so
: $(objpfx
)tst-relr-mod3b.os
2902 $(LINK.o
) -nostdlib
-nostartfiles
-Wl
,-z
,pack-relative-relocs \
2903 $(LDFLAGS-soname-fname
) \
2904 -shared
-o
$@.new
$(filter-out $(map-file
),$^
)
2905 $(call after-link
,$@.new
)
2908 $(objpfx
)tst-relr-mod3a.so
: $(objpfx
)tst-relr-mod3a.os \
2909 $(objpfx
)tst-relr-mod3b.so
2910 $(LINK.o
) -nostdlib
-nostartfiles
-Wl
,-z
,pack-relative-relocs \
2911 $(LDFLAGS-soname-fname
) $(LDFLAGS-rpath-ORIGIN
) \
2912 -shared
-o
$@.new
$(filter-out $(map-file
),$^
)
2913 $(call after-link
,$@.new
)
2916 # The test checks if a DT_RELR shared library without libc.so on DT_NEEDED
2917 # works as intended, so it uses an explicit link rule.
2918 $(objpfx
)tst-relr4
: $(objpfx
)tst-relr-mod4a.so
2919 $(objpfx
)tst-relr-mod4b.so
: $(objpfx
)tst-relr-mod4b.os
2920 $(LINK.o
) -nostdlib
-nostartfiles
-Wl
,-z
,pack-relative-relocs \
2921 $(LDFLAGS-soname-fname
) \
2922 -Wl
,--version-script
=tst-relr-mod4b.map \
2923 -shared
-o
$@.new
$(filter-out $(map-file
),$^
)
2924 $(call after-link
,$@.new
)
2927 $(objpfx
)tst-relr-mod4a.so
: $(objpfx
)tst-relr-mod4a.os \
2928 $(objpfx
)tst-relr-mod4b.so
2929 $(LINK.o
) -nostdlib
-nostartfiles
-Wl
,-z
,pack-relative-relocs \
2930 $(LDFLAGS-soname-fname
) $(LDFLAGS-rpath-ORIGIN
) \
2931 -shared
-o
$@.new
$(filter-out $(map-file
),$^
)
2932 $(call after-link
,$@.new
)
2935 LDFLAGS-libtracemod1-1.so
+= -Wl
,-soname
,libtracemod1.so
2936 LDFLAGS-libtracemod2-1.so
+= -Wl
,-soname
,libtracemod2.so
2937 LDFLAGS-libtracemod3-1.so
+= -Wl
,-soname
,libtracemod3.so
2938 LDFLAGS-libtracemod4-1.so
+= -Wl
,-soname
,libtracemod4.so
2939 LDFLAGS-libtracemod5-1.so
+= -Wl
,-soname
,libtracemod5.so
2941 $(objpfx
)libtracemod1-1.so
: $(objpfx
)libtracemod2-1.so \
2942 $(objpfx
)libtracemod3-1.so
2943 $(objpfx
)libtracemod2-1.so
: $(objpfx
)libtracemod4-1.so \
2944 $(objpfx
)libtracemod5-1.so
2946 define libtracemod-x
2947 $(objpfx
)libtracemod
$(1)/libtracemod
$(1).so
: $(objpfx
)libtracemod
$(1)-1.so
2948 $$(make-target-directory
)
2951 libtracemod-suffixes
= 1 2 3 4 5
2952 $(foreach i
,$(libtracemod-suffixes
), $(eval
$(call libtracemod-x
,$(i
))))
2954 define tst-trace-skeleton
2955 $(objpfx
)tst-trace
$(1).out
: $(objpfx
)libtracemod1
/libtracemod1.so \
2956 $(objpfx
)libtracemod2
/libtracemod2.so \
2957 $(objpfx
)libtracemod3
/libtracemod3.so \
2958 $(objpfx
)libtracemod4
/libtracemod4.so \
2959 $(objpfx
)libtracemod5
/libtracemod5.so \
2960 $(..
)scripts
/tst-ld-trace.py \
2962 ${ $(PYTHON
) $(..
)scripts
/tst-ld-trace.py \
2963 "$(test-wrapper-env) $(elf-objpfx)$(rtld-installed-name) \
2964 --library-path $(common-objpfx):$(strip $(2)) \
2965 $(objpfx)libtracemod1/libtracemod1.so" tst-trace
$(1).exp \
2966 } > $$@
; $$(evaluate-test
)
2969 $(eval
$(call tst-trace-skeleton
,1,))
2970 $(eval
$(call tst-trace-skeleton
,2,\
2971 $(objpfx
)libtracemod2
))
2972 $(eval
$(call tst-trace-skeleton
,3,\
2973 $(objpfx
)libtracemod2
:$(objpfx
)libtracemod3
))
2974 $(eval
$(call tst-trace-skeleton
,4,\
2975 $(objpfx
)libtracemod2
:$(objpfx
)libtracemod3
:$(objpfx
)libtracemod4
))
2976 $(eval
$(call tst-trace-skeleton
,5,\
2977 $(objpfx
)libtracemod2
:$(objpfx
)libtracemod3
:$(objpfx
)libtracemod4
:$(objpfx
)libtracemod5
))
2979 $(objpfx
)tst-tls-allocation-failure-static-patched
: \
2980 $(objpfx
)tst-tls-allocation-failure-static
$(..
)scripts
/tst-elf-edit.py
2982 $(PYTHON
) $(..
)scripts
/tst-elf-edit.py
--maximize-tls-size
$@
2984 $(objpfx
)tst-tls-allocation-failure-static-patched.out
: \
2985 $(objpfx
)tst-tls-allocation-failure-static-patched
2986 $(test-wrapper
) $< > $@
2>&1; echo
"status: $$?" >> $@
2987 grep
-q
'^Fatal glibc error: Cannot allocate TLS block$$' $@ \
2988 && grep
-q
'^status: 127$$' $@
; \
2991 $(objpfx
)tst-audit-tlsdesc
: $(objpfx
)tst-audit-tlsdesc-mod1.so \
2992 $(objpfx
)tst-audit-tlsdesc-mod2.so \
2993 $(shared-thread-library
)
2994 ifneq (no
,$(have-mtls-descriptor
))
2995 # The test is valid for all TLS types, but we want to exercise GNU2
2997 CFLAGS-tst-audit-tlsdesc-mod1.c
+= -mtls-dialect
=$(have-mtls-descriptor
)
2998 CFLAGS-tst-audit-tlsdesc-mod2.c
+= -mtls-dialect
=$(have-mtls-descriptor
)
3000 $(objpfx
)tst-audit-tlsdesc-dlopen
: $(shared-thread-library
)
3001 $(objpfx
)tst-audit-tlsdesc-dlopen.out
: $(objpfx
)tst-audit-tlsdesc-mod1.so \
3002 $(objpfx
)tst-audit-tlsdesc-mod2.so
3003 $(objpfx
)tst-audit-tlsdesc-mod1.so
: $(objpfx
)tst-audit-tlsdesc-mod2.so
3004 $(objpfx
)tst-audit-tlsdesc.out
: $(objpfx
)tst-auditmod-tlsdesc.so
3005 tst-audit-tlsdesc-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod-tlsdesc.so
3006 $(objpfx
)tst-audit-tlsdesc-dlopen.out
: $(objpfx
)tst-auditmod-tlsdesc.so
3007 tst-audit-tlsdesc-dlopen-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod-tlsdesc.so
3009 $(objpfx
)tst-dlmopen-twice.out
: \
3010 $(objpfx
)tst-dlmopen-twice-mod1.so \
3011 $(objpfx
)tst-dlmopen-twice-mod2.so
3013 LDFLAGS-tst-sprof-mod.so
= -Wl
,-soname
,tst-sprof-mod.so
3014 $(objpfx
)tst-sprof-basic
: $(objpfx
)tst-sprof-mod.so
3015 $(objpfx
)tst-sprof-basic.out
: tst-sprof-basic.sh
$(objpfx
)tst-sprof-basic
3016 $(SHELL
) $< $(common-objpfx
) '$(test-wrapper-env)' \
3017 '$(run-program-env)' > $@
; \
3019 generated
+= tst-sprof-mod.so.profile
3021 LDFLAGS-tst-dlclose-lazy-mod1.so
= -Wl
,-z
,lazy
,--no-as-needed
3022 $(objpfx
)tst-dlclose-lazy-mod1.so
: $(objpfx
)tst-dlclose-lazy-mod2.so
3023 $(objpfx
)tst-dlclose-lazy.out
: \
3024 $(objpfx
)tst-dlclose-lazy-mod1.so
$(objpfx
)tst-dlclose-lazy-mod2.so
3026 $(objpfx
)tst-decorate-maps
: $(shared-thread-library
)
3028 tst-decorate-maps-ENV
= \
3029 GLIBC_TUNABLES
=glibc.malloc.arena_max
=8:glibc.malloc.mmap_threshold
=1024:glibc.mem.decorate_maps
=1
3030 tst-decorate-maps-ARGS
= 8
3032 LDFLAGS-tst-non-directory-mod.so
= -Wl
,-soname
,tst-non-directory-mod.so
3033 $(objpfx
)tst-non-directory-path
: $(objpfx
)tst-non-directory-mod.so
3034 $(objpfx
)tst-non-directory-path.out
: tst-non-directory-path.sh \
3035 $(objpfx
)tst-non-directory-path
3036 $(SHELL
) tst-non-directory-path.sh
$(objpfx
)ld.so
$(objpfx
)tst-non-directory-path \
3037 '$(test-wrapper-env)' '$(run_program_env)' \
3038 '$(rpath-link)' $(objpfx
) > $@
; \
3041 tst-env-setuid-ARGS
= -- $(host-test-program-cmd
)
3043 # Reuse a module with a SONAME, to specific as the LD_PROFILE.
3044 $(objpfx
)tst-env-setuid
: $(objpfx
)tst-sonamemove-runmod2.so
3045 $(objpfx
)tst-env-setuid-static.out
: $(objpfx
)tst-sonamemove-runmod1.so
3047 # The object tst-nodeps1-mod.so has no explicit dependencies on libc.so.
3048 # We do not use $(link-test-modules-rpath-link) since the object has no
3050 $(objpfx
)tst-nodeps1-mod.so
: $(objpfx
)tst-nodeps1-mod.os
3051 $(LINK.o
) -nostartfiles
-nostdlib
-shared
-o
$@
$^
3052 tst-nodeps1.so-no-z-defs
= yes
3053 # Link libc.so before the test module with the IFUNC resolver reference.
3054 LDFLAGS-tst-nodeps1
= $(common-objpfx
)libc.so
$(objpfx
)tst-nodeps1-mod.so
3055 $(objpfx
)tst-nodeps1
: $(objpfx
)tst-nodeps1-mod.so
3056 # Reuse the tst-nodeps1 module. Link libc.so before the test module
3057 # with the IFUNC resolver reference.
3058 $(objpfx
)tst-nodeps2-mod.so
: $(common-objpfx
)libc.so \
3059 $(objpfx
)tst-nodeps1-mod.so
$(objpfx
)tst-nodeps2-mod.os
3060 $(LINK.o
) -Wl
,--no-as-needed
-nostartfiles
-nostdlib
-shared
-o
$@
$^ \
3061 $(link-test-modules-rpath-link
)
3062 $(objpfx
)tst-nodeps2.out
: \
3063 $(objpfx
)tst-nodeps1-mod.so
$(objpfx
)tst-nodeps2-mod.so
3065 $(objpfx
)tst-tlsgap
: $(shared-thread-library
)
3066 $(objpfx
)tst-tlsgap.out
: \
3067 $(objpfx
)tst-tlsgap-mod0.so \
3068 $(objpfx
)tst-tlsgap-mod1.so \
3069 $(objpfx
)tst-tlsgap-mod2.so
3071 $(objpfx
)tst-gnu2-tls2
: $(shared-thread-library
)
3072 $(objpfx
)tst-gnu2-tls2.out
: \
3073 $(objpfx
)tst-gnu2-tls2mod0.so \
3074 $(objpfx
)tst-gnu2-tls2mod1.so \
3075 $(objpfx
)tst-gnu2-tls2mod2.so
3077 ifneq (no
,$(have-mtls-descriptor
))
3078 CFLAGS-tst-tlsgap-mod0.c
+= -mtls-dialect
=$(have-mtls-descriptor
)
3079 CFLAGS-tst-tlsgap-mod1.c
+= -mtls-dialect
=$(have-mtls-descriptor
)
3080 CFLAGS-tst-tlsgap-mod2.c
+= -mtls-dialect
=$(have-mtls-descriptor
)
3081 CFLAGS-tst-gnu2-tls2mod0.c
+= -mtls-dialect
=$(have-mtls-descriptor
)
3082 CFLAGS-tst-gnu2-tls2mod1.c
+= -mtls-dialect
=$(have-mtls-descriptor
)
3083 CFLAGS-tst-gnu2-tls2mod2.c
+= -mtls-dialect
=$(have-mtls-descriptor
)