1 # Copyright (C) 1995-2020 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.
24 headers
= elf.h bits
/elfclass.h link.h bits
/link.h
25 routines
= $(all-dl-routines
) dl-support dl-iteratephdr \
26 dl-addr dl-addr-obj enbl-secure dl-profstub \
27 dl-origin dl-libc dl-sym dl-sysdep dl-error \
30 # The core dynamic linking functions are in libc for the static and
32 dl-routines
= $(addprefix dl-
,load lookup object reloc deps hwcaps \
33 runtime init fini debug misc \
34 version profile tls
origin scope \
35 execstack open close trampoline \
37 ifeq (yes
,$(use-ldconfig
))
38 dl-routines
+= dl-cache
41 ifneq (no
,$(have-tunables
))
42 dl-routines
+= dl-tunables
43 tunables-type
= $(addprefix TUNABLES_FRONTEND_
,$(have-tunables
))
44 CPPFLAGS-dl-tunables.c
+= -DTUNABLES_FRONTEND
=$(tunables-type
)
46 # Make sure that the compiler does not insert any library calls in tunables
48 ifeq (yes
,$(have-loop-to-function
))
49 CFLAGS-dl-tunables.c
+= -fno-tree-loop-distribute-patterns
53 all-dl-routines
= $(dl-routines
) $(sysdep-dl-routines
)
54 # But they are absent from the shared libc, because that code is in ld.so.
55 elide-routines.os
= $(all-dl-routines
) dl-support enbl-secure dl-origin \
56 dl-sysdep dl-exception dl-reloc-static-pie
58 # ld.so uses those routines, plus some special stuff for being the program
59 # interpreter and operating independent of libc.
60 rtld-routines
= rtld
$(all-dl-routines
) dl-sysdep dl-environ dl-minimal \
61 dl-error-minimal dl-conflict
62 all-rtld-routines
= $(rtld-routines
) $(sysdep-rtld-routines
)
64 CFLAGS-dl-runtime.c
+= -fexceptions
-fasynchronous-unwind-tables
65 CFLAGS-dl-lookup.c
+= -fexceptions
-fasynchronous-unwind-tables
66 CFLAGS-dl-iterate-phdr.c
+= $(uses-callbacks
)
68 # On targets without __builtin_memset, rtld.c uses a hand-coded loop
69 # in _dl_start. Make sure this isn't turned into a call to regular memset.
70 ifeq (yes
,$(have-loop-to-function
))
71 CFLAGS-rtld.c
+= -fno-tree-loop-distribute-patterns
74 # Compile rtld itself without stack protection.
75 # Also compile all routines in the static library that are elided from
76 # the shared libc because they are in libc.a in the same way.
78 define elide-stack-protector
79 $(if
$(filter $(@F
),$(patsubst %,%$(1),$(2))), $(no-stack-protector
))
82 CFLAGS-.o
+= $(call elide-stack-protector
,.o
,$(elide-routines.os
))
83 CFLAGS-.op
+= $(call elide-stack-protector
,.op
,$(elide-routines.os
))
84 CFLAGS-.os
+= $(call elide-stack-protector
,.os
,$(all-rtld-routines
))
86 ifeq ($(unwind-find-fde
),yes
)
87 routines
+= unwind-dw2-fde-glibc
88 shared-only-routines
+= unwind-dw2-fde-glibc
91 before-compile
+= $(objpfx
)trusted-dirs.h
92 generated
+= trusted-dirs.h trusted-dirs.st for-renamed
/renamed.so
93 generated-dirs
+= for-renamed
95 ifeq ($(build-shared
),yes
)
96 ld-map
= $(common-objpfx
)ld.map
99 ifeq (yes
,$(build-shared
))
100 extra-objs
= $(all-rtld-routines
:%=%.os
) soinit.os sofini.os interp.os
101 generated
+= librtld.os dl-allobjs.os
ld.so ldd
102 install-others
= $(inst_rtlddir
)/$(rtld-installed-name
)
103 install-bin-script
= ldd
109 install-rootsbin
= sln
110 sln-modules
:= static-stubs
111 extra-objs
+= $(sln-modules
:=.o
)
113 ifeq (yes
,$(use-ldconfig
))
114 ifeq (yes
,$(build-shared
))
115 others-static
+= ldconfig
117 install-rootsbin
+= ldconfig
119 ldconfig-modules
:= cache readlib xmalloc xstrdup chroot_canon static-stubs
120 extra-objs
+= $(ldconfig-modules
:=.o
)
121 others-extras
= $(ldconfig-modules
)
125 # To find xmalloc.c and xstrdup.c
126 vpath
%.c ..
/locale
/programs
128 ifeq ($(build-shared
),yes
)
129 extra-objs
+= sotruss-lib.os sotruss-lib.so
130 install-others
+= $(inst_auditdir
)/sotruss-lib.so
131 install-bin-script
+= sotruss
133 libof-sotruss-lib
= extramodules
134 LDFLAGS-sotruss-lib.so
+= $(z-now-
$(bind-now
))
135 $(objpfx
)sotruss-lib.so
: $(objpfx
)sotruss-lib.os
136 $(build-module-asneeded
)
137 $(objpfx
)sotruss-lib.so
: $(common-objpfx
)libc.so
$(objpfx
)ld.so \
138 $(common-objpfx
)libc_nonshared.a
140 $(objpfx
)sotruss
: sotruss.sh
$(common-objpfx
)config.make
141 sed
-e
's%@BASH@%$(BASH)%g' \
142 -e
's%@VERSION@%$(version)%g' \
143 -e
's%@TEXTDOMAINDIR@%$(localedir)%g' \
144 -e
's%@PREFIX@%$(prefix)%g' \
145 -e
's|@PKGVERSION@|$(PKGVERSION)|g' \
146 -e
's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \
150 $(inst_auditdir
)/sotruss-lib.so
: $(objpfx
)sotruss-lib.so
$(+force)
151 $(do-install-program
)
154 tests-static-normal
:= tst-leaks1-static tst-array1-static tst-array5-static \
156 tst-tlsalign-static tst-tlsalign-extern-static \
157 tst-linkall-static tst-env-setuid tst-env-setuid-tunables
158 tests-static-internal
:= tst-tls1-static tst-tls2-static \
159 tst-ptrguard1-static tst-stackguard1-static \
160 tst-tls1-static-non-pie tst-libc_dlvsym-static
162 CRT-tst-tls1-static-non-pie
:= $(csu-objpfx
)crt1.o
163 tst-tls1-static-non-pie-no-pie
= yes
166 tst-ldconfig-bad-aux-cache \
167 tst-ldconfig-ld_so_conf-update
169 tests
:= tst-tls9 tst-leaks1 \
170 tst-array1 tst-array2 tst-array3 tst-array4 tst-array5 \
172 tests-internal
:= tst-tls1 tst-tls2
$(tests-static-internal
)
173 tests-static
:= $(tests-static-normal
) $(tests-static-internal
)
175 ifeq (yes
,$(build-shared
))
176 tests-static
+= tst-tls9-static
177 tst-tls9-static-ENV
= \
178 LD_LIBRARY_PATH
=$(objpfx
):$(common-objpfx
):$(common-objpfx
)dlfcn
180 tests
+= restest1 preloadtest loadfail multiload origtest resolvfail \
181 constload1 order noload
filter \
182 reldep reldep2 reldep3 reldep4 nodelete nodelete2 \
183 nodlopen nodlopen2 lateglobal initfirst global \
184 restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \
186 tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-tls15 \
187 tst-tls16 tst-tls17 tst-tls18 tst-tls19 tst-tls-dlinfo \
188 tst-align tst-align2 \
189 tst-dlmodcount tst-dlopenrpath tst-deep1 \
190 tst-dlmopen1 tst-dlmopen3 \
191 unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \
192 tst-audit1 tst-audit2 tst-audit8 tst-audit9 \
193 tst-addr1 tst-thrlock \
194 tst-unique1 tst-unique2
$(if
$(CXX
),tst-unique3 tst-unique4 \
195 tst-nodelete tst-dlopen-nodelete-reloc
) \
196 tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \
197 tst-tlsalign tst-tlsalign-extern tst-nodelete-opened \
198 tst-nodelete2 tst-audit11 tst-audit12 tst-dlsym-error tst-noload \
199 tst-latepthread tst-tls-manydynamic tst-nodelete-dlclose \
200 tst-debug1 tst-main1 tst-absolute-sym tst-absolute-zero tst-big-note \
201 tst-unwind-ctor tst-unwind-main tst-audit13 \
202 tst-sonamemove-link tst-sonamemove-dlopen tst-dlopen-tlsmodid \
203 tst-dlopen-self tst-auditmany tst-initfinilazyfail tst-dlopenfail \
205 tst-filterobj tst-filterobj-dlopen tst-auxobj tst-auxobj-dlopen
207 tests-internal
+= loadtest unload unload2 circleload1 \
208 neededtest neededtest2 neededtest3 neededtest4 \
209 tst-tls3 tst-tls6 tst-tls7 tst-tls8 tst-dlmopen2 \
210 tst-ptrguard1 tst-stackguard1 tst-libc_dlvsym \
212 tests-container
+= tst-pldd tst-dlopen-tlsmodid-container \
213 tst-dlopen-self-container
214 test-srcs
= tst-pathopt
215 selinux-enabled
:= $(shell cat
/selinux
/enforce
2> /dev
/null
)
216 ifneq ($(selinux-enabled
),1)
217 tests-execstack-yes
= tst-execstack tst-execstack-needed tst-execstack-prog
220 tests
+= $(tests-execstack-
$(have-z-execstack
))
221 ifeq ($(run-built-tests
),yes
)
222 tests-special
+= $(objpfx
)tst-leaks1-mem.out \
223 $(objpfx
)tst-leaks1-static-mem.out
$(objpfx
)noload-mem.out \
224 $(objpfx
)tst-ldconfig-X.out
226 tlsmod17a-suffixes
= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
227 tlsmod18a-suffixes
= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
228 tlsmod17a-modules
= $(addprefix tst-tlsmod17a
, $(tlsmod17a-suffixes
))
229 tlsmod18a-modules
= $(addprefix tst-tlsmod18a
, $(tlsmod17a-suffixes
))
230 one-hundred
= $(foreach x
,0 1 2 3 4 5 6 7 8 9, \
231 0$x 1$x 2$x 3$x 4$x 5$x 6$x 7$x 8$x 9$x)
232 tst-tls-many-dynamic-modules
:= \
233 $(foreach n
,$(one-hundred
),tst-tls-manydynamic
$(n
)mod
)
234 extra-test-objs
+= $(tlsmod17a-modules
:=.os
) $(tlsmod18a-modules
:=.os
) \
236 test-extras
+= tst-tlsmod17a tst-tlsmod18a tst-tlsalign-vars
237 modules-names
= testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
238 testobj1_1 failobj constload2 constload3 unloadmod \
239 dep1 dep2 dep3 dep4 vismod1 vismod2 vismod3 \
240 nodelmod1 nodelmod2 nodelmod3 nodelmod4 \
241 nodel2mod1 nodel2mod2 nodel2mod3 \
242 nodlopenmod nodlopenmod2 filtmod1 filtmod2 \
243 reldepmod1 reldepmod2 reldepmod3 reldepmod4 nextmod1 nextmod2 \
244 reldep4mod1 reldep4mod2 reldep4mod3 reldep4mod4 \
245 neededobj1 neededobj2 neededobj3 neededobj4 \
246 neededobj5 neededobj6 firstobj globalmod1 \
247 unload2mod unload2dep ltglobmod1 ltglobmod2 pathoptobj \
248 dblloadmod1 dblloadmod2 dblloadmod3 reldepmod5 reldepmod6 \
249 reldep6mod0 reldep6mod1 reldep6mod2 reldep6mod3 reldep6mod4 \
250 reldep7mod1 reldep7mod2 \
251 tst-tlsmod1 tst-tlsmod2 tst-tlsmod3 tst-tlsmod4 \
252 tst-tlsmod5 tst-tlsmod6 tst-tlsmod7 tst-tlsmod8 \
253 tst-tlsmod9 tst-tlsmod10 tst-tlsmod11 tst-tlsmod12 \
254 tst-tlsmod13 tst-tlsmod13a tst-tlsmod14a tst-tlsmod14b \
255 tst-tlsmod15a tst-tlsmod15b tst-tlsmod16a tst-tlsmod16b \
256 $(tlsmod17a-modules
) tst-tlsmod17b
$(tlsmod18a-modules
) \
257 tst-tls19mod1 tst-tls19mod2 tst-tls19mod3 \
258 circlemod1 circlemod1a circlemod2 circlemod2a \
259 circlemod3 circlemod3a \
260 reldep8mod1 reldep8mod2 reldep8mod3 \
261 reldep9mod1 reldep9mod2 reldep9mod3 \
262 tst-alignmod tst-alignmod2 \
263 $(modules-execstack-
$(have-z-execstack
)) \
264 tst-dlopenrpathmod tst-deep1mod1 tst-deep1mod2 tst-deep1mod3 \
265 tst-dlmopen1mod tst-auditmod1 \
266 unload3mod1 unload3mod2 unload3mod3 unload3mod4 \
267 unload4mod1 unload4mod2 unload4mod3 unload4mod4 \
268 unload6mod1 unload6mod2 unload6mod3 \
269 unload7mod1 unload7mod2 \
270 unload8mod1 unload8mod1x unload8mod2 unload8mod3 \
271 order2mod1 order2mod2 order2mod3 order2mod4 \
272 tst-unique1mod1 tst-unique1mod2 \
273 tst-unique2mod1 tst-unique2mod2 \
274 tst-auditmod9a tst-auditmod9b \
275 $(if
$(CXX
),tst-unique3lib tst-unique3lib2 tst-unique4lib \
276 tst-nodelete-uniquemod tst-nodelete-rtldmod \
278 tst-dlopen-nodelete-reloc-mod1 \
279 tst-dlopen-nodelete-reloc-mod2 \
280 tst-dlopen-nodelete-reloc-mod3 \
281 tst-dlopen-nodelete-reloc-mod4 \
282 tst-dlopen-nodelete-reloc-mod5 \
283 tst-dlopen-nodelete-reloc-mod6 \
284 tst-dlopen-nodelete-reloc-mod7 \
285 tst-dlopen-nodelete-reloc-mod8 \
286 tst-dlopen-nodelete-reloc-mod9 \
287 tst-dlopen-nodelete-reloc-mod10 \
288 tst-dlopen-nodelete-reloc-mod11 \
289 tst-dlopen-nodelete-reloc-mod12 \
290 tst-dlopen-nodelete-reloc-mod13 \
291 tst-dlopen-nodelete-reloc-mod14 \
292 tst-dlopen-nodelete-reloc-mod15 \
293 tst-dlopen-nodelete-reloc-mod16 \
294 tst-dlopen-nodelete-reloc-mod17
) \
295 tst-initordera1 tst-initorderb1 \
296 tst-initordera2 tst-initorderb2 \
297 tst-initordera3 tst-initordera4 \
298 tst-initorder2a tst-initorder2b tst-initorder2c \
300 tst-relsort1mod1 tst-relsort1mod2 tst-array2dep \
301 tst-array5dep tst-null-argv-lib \
302 tst-tlsalign-lib tst-nodelete-opened-lib tst-nodelete2mod \
303 tst-audit11mod1 tst-audit11mod2 tst-auditmod11 \
304 tst-audit12mod1 tst-audit12mod2 tst-audit12mod3 tst-auditmod12 \
305 tst-latepthreadmod
$(tst-tls-many-dynamic-modules
) \
306 tst-nodelete-dlclose-dso tst-nodelete-dlclose-plugin \
307 tst-main1mod tst-libc_dlvsym-dso tst-absolute-sym-lib \
308 tst-absolute-zero-lib tst-big-note-lib tst-unwind-ctor-lib \
309 tst-audit13mod1 tst-sonamemove-linkmod1 \
310 tst-sonamemove-runmod1 tst-sonamemove-runmod2 \
311 tst-auditmanymod1 tst-auditmanymod2 tst-auditmanymod3 \
312 tst-auditmanymod4 tst-auditmanymod5 tst-auditmanymod6 \
313 tst-auditmanymod7 tst-auditmanymod8 tst-auditmanymod9 \
314 tst-initlazyfailmod tst-finilazyfailmod \
315 tst-dlopenfailmod1 tst-dlopenfaillinkmod tst-dlopenfailmod2 \
316 tst-dlopenfailmod3 tst-ldconfig-ld-mod \
317 tst-filterobj-flt tst-filterobj-aux tst-filterobj-filtee
318 # Most modules build with _ISOMAC defined, but those filtered out
319 # depend on internal headers.
320 modules-names-tests
= $(filter-out ifuncmod
% tst-libc_dlvsym-dso tst-tlsmod
%,\
323 ifeq (yes
,$(have-mtls-dialect-gnu2
))
324 tests
+= tst-gnu2-tls1
325 modules-names
+= tst-gnu2-tls1mod
326 $(objpfx
)tst-gnu2-tls1
: $(objpfx
)tst-gnu2-tls1mod.so
327 tst-gnu2-tls1mod.so-no-z-defs
= yes
328 CFLAGS-tst-gnu2-tls1mod.c
+= -mtls-dialect
=gnu2
330 ifeq (yes
,$(have-protected-data
))
331 modules-names
+= tst-protected1moda tst-protected1modb
332 tests
+= tst-protected1a tst-protected1b
333 $(objpfx
)tst-protected1a
: $(addprefix $(objpfx
),tst-protected1moda.so tst-protected1modb.so
)
334 $(objpfx
)tst-protected1b
: $(addprefix $(objpfx
),tst-protected1modb.so tst-protected1moda.so
)
335 tst-protected1modb.so-no-z-defs
= yes
336 # These tests fail with GCC versions prior to 5.1 and with some versions
337 # of binutils. See https://sourceware.org/bugzilla/show_bug.cgi?id=17709
338 # and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 for details.
339 # Perhaps in future we can make these XFAILs conditional on some detection
340 # of compiler/linker behavior/version.
341 test-xfail-tst-protected1a
= yes
342 test-xfail-tst-protected1b
= yes
344 ifeq (yesyes
,$(have-fpie
)$(build-shared
))
345 modules-names
+= tst-piemod1
346 tests
+= tst-pie1 tst-pie2 tst-dlopen-pie tst-dlopen-tlsmodid-pie \
348 tests-pie
+= tst-pie1 tst-pie2 tst-dlopen-tlsmodid-pie tst-dlopen-self-pie
349 ifeq (yes
,$(have-protected-data
))
352 CFLAGS-vismain.c
+= $(PIE-ccflag
)
355 modules-execstack-yes
= tst-execstack-mod
356 extra-test-objs
+= $(addsuffix .os
,$(strip $(modules-names
)))
358 # filtmod1.so, tst-big-note-lib.so have special rules.
359 modules-names-nobuild
:= filtmod1 tst-big-note-lib
361 tests
+= $(tests-static
)
363 ifeq (yes
,$(have-ifunc
))
364 tests-ifuncstatic
:= ifuncmain1static ifuncmain1picstatic \
365 ifuncmain2static ifuncmain2picstatic \
366 ifuncmain4static ifuncmain4picstatic \
367 ifuncmain5static ifuncmain5picstatic \
368 ifuncmain7static ifuncmain7picstatic \
369 ifuncmain9static ifuncmain9picstatic
370 tests-static
+= $(tests-ifuncstatic
)
371 tests-internal
+= $(tests-ifuncstatic
)
372 ifeq (yes
,$(build-shared
))
373 tests
+= tst-ifunc-fault-lazy tst-ifunc-fault-bindnow
374 # Note: sysdeps/x86_64/ifuncmain8.c uses ifuncmain8.
376 ifuncmain1 ifuncmain1pic ifuncmain1vis ifuncmain1vispic \
377 ifuncmain1staticpic \
378 ifuncmain2 ifuncmain2pic ifuncmain3 ifuncmain4 \
379 ifuncmain5 ifuncmain5pic ifuncmain5staticpic \
380 ifuncmain7 ifuncmain7pic \
381 ifuncmain9 ifuncmain9pic
382 ifunc-test-modules
= ifuncdep1 ifuncdep1pic ifuncdep2 ifuncdep2pic \
383 ifuncdep5 ifuncdep5pic
384 extra-test-objs
+= $(ifunc-test-modules
:=.o
)
385 test-internal-extras
+= $(ifunc-test-modules
)
386 ifeq (yes
,$(have-fpie
))
387 ifunc-pie-tests
= ifuncmain1pie ifuncmain1vispie ifuncmain1staticpie \
388 ifuncmain5pie ifuncmain6pie ifuncmain7pie ifuncmain9pie
389 ifeq (yes
,$(have-textrel_ifunc
))
390 ifunc-pie-tests
+= tst-ifunc-textrel
392 tests-internal
+= $(ifunc-pie-tests
)
393 tests-pie
+= $(ifunc-pie-tests
)
395 modules-names
+= ifuncmod1 ifuncmod3 ifuncmod5 ifuncmod6
399 ifeq (yes
,$(build-shared
))
400 ifeq ($(run-built-tests
),yes
)
401 tests-special
+= $(objpfx
)tst-pathopt.out
$(objpfx
)tst-rtld-load-self.out \
402 $(objpfx
)tst-rtld-preload.out
404 tests-special
+= $(objpfx
)check-textrel.out
$(objpfx
)check-execstack.out \
405 $(objpfx
)check-wx-segment.out \
406 $(objpfx
)check-localplt.out
$(objpfx
)check-initfini.out
409 ifeq ($(run-built-tests
),yes
)
410 tests-special
+= $(objpfx
)order-cmp.out
$(objpfx
)tst-array1-cmp.out \
411 $(objpfx
)tst-array1-static-cmp.out \
412 $(objpfx
)tst-array2-cmp.out
$(objpfx
)tst-array3-cmp.out \
413 $(objpfx
)tst-array4-cmp.out
$(objpfx
)tst-array5-cmp.out \
414 $(objpfx
)tst-array5-static-cmp.out
$(objpfx
)order2-cmp.out \
415 $(objpfx
)tst-initorder-cmp.out \
416 $(objpfx
)tst-initorder2-cmp.out
$(objpfx
)tst-unused-dep.out \
417 $(objpfx
)tst-unused-dep-cmp.out
420 check-abi
: $(objpfx
)check-abi-ld.out
421 tests-special
+= $(objpfx
)check-abi-ld.out
422 update-abi
: update-abi-ld
423 update-all-abi
: update-all-abi-ld
425 ifeq ($(have-glob-dat-reloc
),yes
)
427 # Don't compile tst-prelink.c with PIE for GLOB_DAT relocation.
428 CFLAGS-tst-prelink.c
+= -fno-pie
429 tst-prelink-no-pie
= yes
430 ifeq ($(run-built-tests
),yes
)
431 tests-special
+= $(objpfx
)tst-prelink-cmp.out
435 # The test requires shared _and_ PIE because the executable
436 # unit test driver must be able to link with the shared object
437 # that is going to eventually go into an installed DSO.
438 ifeq (yesyes
,$(have-fpie
)$(build-shared
))
439 tests-internal
+= tst-_dl_addr_inside_object
440 tests-pie
+= tst-_dl_addr_inside_object
441 $(objpfx
)tst-_dl_addr_inside_object
: $(objpfx
)dl-addr-obj.os
442 CFLAGS-tst-_dl_addr_inside_object.c
+= $(PIE-ccflag
)
445 # We can only test static libcrypt use if libcrypt has been built,
446 # and either NSS crypto is not in use, or static NSS libraries are
448 ifeq ($(build-crypt
),no
)
449 CFLAGS-tst-linkall-static.c
+= -DUSE_CRYPT
=0
451 ifeq ($(nss-crypt
),no
)
452 CFLAGS-tst-linkall-static.c
+= -DUSE_CRYPT
=1
454 ifeq ($(static-nss-crypt
),no
)
455 CFLAGS-tst-linkall-static.c
+= -DUSE_CRYPT
=0
457 CFLAGS-tst-linkall-static.c
+= -DUSE_CRYPT
=1
464 ifeq (yes
,$(build-shared
))
465 # Make sure these things are built in the `make lib' pass so they can be used
466 # to run programs during the `make others' pass.
467 lib-noranlib
: $(objpfx
)$(rtld-installed-name
) \
468 $(addprefix $(objpfx
),$(extra-objs
))
471 # Command to link into a larger single relocatable object.
472 reloc-link
= $(LINK.o
) -nostdlib
-nostartfiles
-r
474 $(objpfx
)sotruss-lib.so
: $(shlib-lds
)
476 $(objpfx
)dl-allobjs.os
: $(all-rtld-routines
:%=$(objpfx
)%.os
)
477 $(reloc-link
) -o
$@
$^
479 # Link together the dynamic linker into a single relocatable object.
480 # First we do a link against libc_pic.a just to get a link map,
481 # and discard the object produced by that link. From the link map
482 # we can glean all the libc modules that need to go into the dynamic
483 # linker. Then we do a recursive make that goes into all the subdirs
484 # those modules come from and builds special rtld-foo.os versions that
485 # are compiled with special flags, and puts these modules into rtld-libc.a
486 # for us. Then we do the real link using rtld-libc.a instead of libc_pic.a.
488 # These symbols need to be stubbed out during symbol discovery because
489 # their implementation is provided differently in rtld, and the symbol
490 # discovery mechanism is not compatible with the libc implementation
491 # when compiled for libc.
492 rtld-stubbed-symbols
= \
498 # The GCC arguments that implement $(rtld-stubbed-symbols).
499 rtld-stubbed-symbols-args
= \
500 $(patsubst %,-Wl
$(comma
)--defsym
=%=0, $(rtld-stubbed-symbols
))
502 ifeq ($(have-ssp
),yes
)
503 # rtld is not built with the stack protector, so these references will
504 # go away in the rebuilds.
505 rtld-stubbed-symbols
+= __stack_chk_fail __stack_chk_fail_local
508 $(objpfx
)librtld.map
: $(objpfx
)dl-allobjs.os
$(common-objpfx
)libc_pic.a
510 $(reloc-link
) -o
$@.o
$(rtld-stubbed-symbols-args
) \
511 '-Wl,-(' $^
-lgcc
'-Wl,-)' -Wl
,-Map
,$@T
515 $(objpfx
)librtld.mk
: $(objpfx
)librtld.map Makefile
517 sed
-n
's@^$(common-objpfx)\([^(]*\)(\([^)]*\.os\)) *.*$$@\1 \2@p' \
519 while read lib file
; do \
522 LC_ALL
=C fgrep
-l
/$$file \
523 $(common-objpfx
)stamp.os
$(common-objpfx
)*/stamp.os | \
525 sed
's@^$(common-objpfx)\([^/]*\)/stamp\.os$$@rtld-\1'" +=$$file@"\
528 echo rtld-
$${lib
%%/*} += $$file ;; \
529 *) echo
"Wasn't expecting $$lib($$file)" >&2; exit
1 ;; \
532 echo rtld-subdirs
= `LC_ALL=C sed 's/^rtld-\([^ ]*\).*$$/\1/' $@T \
533 | LC_ALL=C sort -u` >> $@T
536 $(objpfx
)rtld-libc.a
: $(objpfx
)librtld.mk FORCE
537 $(MAKE
) -f
$< -f rtld-Rules
539 $(objpfx
)librtld.os
: $(objpfx
)dl-allobjs.os
$(objpfx
)rtld-libc.a
540 $(LINK.o
) -nostdlib
-nostartfiles
-r
-o
$@
'-Wl,-(' $^
-lgcc
'-Wl,-)' \
543 generated
+= librtld.map librtld.mk rtld-libc.a librtld.os.map
545 z-now-yes
= -Wl
,-z
,now
547 $(objpfx
)ld.so
: $(objpfx
)librtld.os
$(ld-map
)
548 # Link into a temporary file so that we don't touch $@ at all
549 # if the sanity check below fails.
550 $(LINK.o
) -nostdlib
-nostartfiles
-shared
-o
$@.new \
551 $(LDFLAGS-rtld
) -Wl
,-z
,defs
$(z-now-
$(bind-now
)) \
552 $(filter-out $(map-file
),$^
) $(load-map-file
) \
553 -Wl
,-soname
=$(rtld-installed-name
) \
555 $(call after-link
,$@.new
)
556 $(READELF
) -s
$@.new \
557 |
$(AWK
) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
560 ifeq (yes
,$(build-shared
))
561 # interp.c exists just to get the runtime linker path into libc.so.
562 $(objpfx
)interp.os
: $(common-objpfx
)runtime-linker.h
565 ifneq (ld.so
,$(rtld-installed-name
))
566 # Make sure ld.so.1 exists in the build directory so we can link
568 $(objpfx
)$(rtld-installed-name
): $(objpfx
)ld.so
570 generated
+= $(rtld-installed-name
)
573 # Build a file mentioning all trustworthy directories to look for shared
574 # libraries when using LD_LIBRARY_PATH in a setuid program. The user can
575 # add directories to the list by defining $(user-defined-trusted-dirs)
576 # before starting make.
577 $(objpfx
)trusted-dirs.h
: $(objpfx
)trusted-dirs.st
; @
:
578 $(objpfx
)trusted-dirs.st
: Makefile
$(..
)Makeconfig
579 $(make-target-directory
)
580 echo
"$(subst :, ,$(default-rpath) $(user-defined-trusted-dirs))" \
581 |
$(AWK
) -f gen-trusted-dirs.awk
> ${@
:st
=T
};
582 echo
'#define DL_DST_LIB "$(notdir $(slibdir))"' >> ${@
:st
=T
}
583 $(move-if-change
) ${@
:st
=T
} ${@
:st
=h
}
585 CPPFLAGS-dl-load.c
+= -I
$(objpfx
).
-I
$(csu-objpfx
).
587 ifeq (yes
,$(build-shared
))
588 $(inst_slibdir
)/$(rtld-version-installed-name
): $(objpfx
)ld.so
$(+force)
589 $(make-target-directory
)
590 $(do-install-program
)
592 $(inst_rtlddir
)/$(rtld-installed-name
): \
593 $(inst_slibdir
)/$(rtld-version-installed-name
) \
594 $(inst_slibdir
)/libc-
$(version
).so
595 $(make-target-directory
)
598 # Special target called by parent to install just the dynamic linker.
600 ldso_install
: $(inst_rtlddir
)/$(rtld-installed-name
)
604 ldd-rewrite
= -e
's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \
605 -e
's%@VERSION@%$(version)%g' \
606 -e
's|@PKGVERSION@|$(PKGVERSION)|g' \
607 -e
's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \
608 -e
's%@BASH@%$(BASH)%g' \
609 -e
's%@TEXTDOMAINDIR@%$(localedir)%g'
611 ifeq ($(ldd-rewrite-script
),no
)
613 LC_ALL
=C sed
$(ldd-rewrite
) < $< > $@.new
617 LC_ALL
=C sed
$(ldd-rewrite
) < $< \
618 | LC_ALL
=C sed
-f
$(patsubst $(..
)/%,/%,$(..
)$(ldd-rewrite-script
)) > $@.new
622 $(objpfx
)ldd
: ldd.bash.in
$(common-objpfx
)soversions.mk \
623 $(common-objpfx
)config.make
628 $(objpfx
)sprof
: $(libdl
)
630 $(objpfx
)sln
: $(sln-modules
:%=$(objpfx
)%.o
)
632 $(objpfx
)ldconfig
: $(ldconfig-modules
:%=$(objpfx
)%.o
)
634 SYSCONF-FLAGS
:= -D
'SYSCONFDIR="$(sysconfdir)"'
635 CFLAGS-ldconfig.c
+= $(SYSCONF-FLAGS
) -D
'LIBDIR="$(libdir)"' \
636 -D
'SLIBDIR="$(slibdir)"'
637 libof-ldconfig
= ldconfig
638 CFLAGS-dl-cache.c
+= $(SYSCONF-FLAGS
)
639 CFLAGS-cache.c
+= $(SYSCONF-FLAGS
)
640 CFLAGS-rtld.c
+= $(SYSCONF-FLAGS
)
642 cpp-srcs-left
:= $(all-rtld-routines
:=.os
)
644 include $(patsubst %,$(..
)libof-iterator.mk
,$(cpp-srcs-left
))
646 test-modules
= $(addprefix $(objpfx
),$(addsuffix .so
,$(strip $(modules-names
))))
647 generated
+= $(addsuffix .so
,$(strip $(modules-names
)))
649 $(objpfx
)testobj1.so
: $(libdl
)
650 $(objpfx
)testobj1_1.so
: $(objpfx
)testobj1.so
$(libdl
)
651 $(objpfx
)testobj2.so
: $(objpfx
)testobj1.so
$(libdl
)
652 $(objpfx
)testobj3.so
: $(libdl
)
653 $(objpfx
)testobj4.so
: $(libdl
)
654 $(objpfx
)testobj5.so
: $(libdl
)
655 $(objpfx
)testobj6.so
: $(objpfx
)testobj1.so
$(objpfx
)testobj2.so
$(libdl
)
656 $(objpfx
)failobj.so
: $(objpfx
)testobj6.so
657 $(objpfx
)dep1.so
: $(objpfx
)dep2.so
$(objpfx
)dep4.so
658 $(objpfx
)dep2.so
: $(objpfx
)dep3.so
$(objpfx
)dep4.so
659 $(objpfx
)dep4.so
: $(objpfx
)dep3.so
660 $(objpfx
)nodelmod3.so
: $(objpfx
)nodelmod4.so
661 $(objpfx
)nextmod1.so
: $(libdl
)
662 $(objpfx
)neededobj1.so
: $(libdl
)
663 $(objpfx
)neededobj2.so
: $(objpfx
)neededobj1.so
$(libdl
)
664 $(objpfx
)neededobj3.so
: $(objpfx
)neededobj1.so
$(objpfx
)neededobj2.so
$(libdl
)
665 $(objpfx
)neededobj4.so
: $(objpfx
)neededobj1.so
$(objpfx
)neededobj2.so \
666 $(objpfx
)neededobj3.so
$(libdl
)
667 $(objpfx
)neededobj6.so
: $(objpfx
)neededobj5.so
668 $(objpfx
)unload2mod.so
: $(objpfx
)unload2dep.so
669 $(objpfx
)ltglobmod2.so
: $(libdl
)
670 $(objpfx
)firstobj.so
: $(shared-thread-library
)
671 $(objpfx
)globalmod1.so
: $(libdl
)
672 $(objpfx
)reldep4mod1.so
: $(objpfx
)reldep4mod3.so
673 $(objpfx
)reldep4mod2.so
: $(objpfx
)reldep4mod4.so
674 $(objpfx
)dblloadmod1.so
: $(objpfx
)dblloadmod3.so
675 $(objpfx
)dblloadmod2.so
: $(objpfx
)dblloadmod3.so
676 $(objpfx
)reldepmod5.so
: $(objpfx
)reldepmod2.so
677 $(objpfx
)reldepmod6.so
: $(objpfx
)reldepmod2.so
678 $(objpfx
)reldep6mod1.so
: $(objpfx
)reldep6mod0.so
679 $(objpfx
)reldep6mod2.so
: $(objpfx
)reldep6mod1.so
680 $(objpfx
)reldep6mod3.so
: $(objpfx
)reldep6mod2.so
681 $(objpfx
)reldep6mod4.so
: $(objpfx
)reldep6mod1.so
682 $(objpfx
)tst-tlsmod3.so
: $(objpfx
)tst-tlsmod2.so
683 $(objpfx
)tst-tlsmod8.so
: $(objpfx
)tst-tlsmod7.so
684 $(objpfx
)tst-tlsmod10.so
: $(objpfx
)tst-tlsmod9.so
685 $(objpfx
)tst-tlsmod12.so
: $(objpfx
)tst-tlsmod11.so
686 $(objpfx
)tst-tlsmod13a.so
: $(objpfx
)tst-tlsmod13.so
687 # For tst-tls9-static, make sure the modules it dlopens have libc.so in DT_NEEDED
688 $(objpfx
)tst-tlsmod5.so
: $(common-objpfx
)libc.so
689 $(objpfx
)tst-tlsmod6.so
: $(common-objpfx
)libc.so
690 $(objpfx
)tst-tls19mod1.so
: $(objpfx
)tst-tls19mod2.so
$(objpfx
)tst-tls19mod3.so
691 $(objpfx
)tst-tls19mod3.so
: $(objpfx
)ld.so
692 $(objpfx
)reldep8mod3.so
: $(objpfx
)reldep8mod1.so
$(objpfx
)reldep8mod2.so
693 $(objpfx
)nodel2mod3.so
: $(objpfx
)nodel2mod1.so
$(objpfx
)nodel2mod2.so
694 $(objpfx
)reldep9mod2.so
: $(objpfx
)reldep9mod1.so
695 $(objpfx
)reldep9mod3.so
: $(objpfx
)reldep9mod1.so
$(objpfx
)reldep9mod2.so
696 $(objpfx
)unload3mod1.so
: $(objpfx
)unload3mod3.so
697 $(objpfx
)unload3mod2.so
: $(objpfx
)unload3mod3.so
698 $(objpfx
)unload3mod3.so
: $(objpfx
)unload3mod4.so
699 $(objpfx
)unload4mod1.so
: $(objpfx
)unload4mod2.so
$(objpfx
)unload4mod3.so
700 $(objpfx
)unload4mod2.so
: $(objpfx
)unload4mod4.so
$(objpfx
)unload4mod3.so
701 $(objpfx
)unload6mod1.so
: $(libdl
)
702 $(objpfx
)unload6mod2.so
: $(libdl
)
703 $(objpfx
)unload6mod3.so
: $(libdl
)
704 $(objpfx
)unload7mod1.so
: $(libdl
)
705 $(objpfx
)unload7mod2.so
: $(objpfx
)unload7mod1.so
706 $(objpfx
)unload8mod1.so
: $(objpfx
)unload8mod2.so
707 $(objpfx
)unload8mod2.so
: $(objpfx
)unload8mod3.so
708 $(objpfx
)unload8mod3.so
: $(libdl
)
709 $(objpfx
)tst-initordera2.so
: $(objpfx
)tst-initordera1.so
710 $(objpfx
)tst-initorderb2.so
: $(objpfx
)tst-initorderb1.so
$(objpfx
)tst-initordera2.so
711 $(objpfx
)tst-initordera3.so
: $(objpfx
)tst-initorderb2.so
$(objpfx
)tst-initorderb1.so
712 $(objpfx
)tst-initordera4.so
: $(objpfx
)tst-initordera3.so
713 $(objpfx
)tst-initorder
: $(objpfx
)tst-initordera4.so
$(objpfx
)tst-initordera1.so
$(objpfx
)tst-initorderb2.so
714 $(objpfx
)tst-null-argv
: $(objpfx
)tst-null-argv-lib.so
715 $(objpfx
)tst-tlsalign
: $(objpfx
)tst-tlsalign-lib.so
716 $(objpfx
)tst-nodelete-opened.out
: $(objpfx
)tst-nodelete-opened-lib.so
717 $(objpfx
)tst-nodelete-opened
: $(libdl
)
718 $(objpfx
)tst-noload
: $(libdl
)
720 $(objpfx
)tst-tlsalign-extern
: $(objpfx
)tst-tlsalign-vars.o
721 $(objpfx
)tst-tlsalign-extern-static
: $(objpfx
)tst-tlsalign-vars.o
723 tst-null-argv-ENV
= LD_DEBUG
=all LD_DEBUG_OUTPUT
=$(objpfx
)tst-null-argv.debug.out
724 LDFLAGS-nodel2mod3.so
= -Wl
,--no-as-needed
725 LDFLAGS-reldepmod5.so
= -Wl
,--no-as-needed
726 LDFLAGS-reldep6mod1.so
= -Wl
,--no-as-needed
727 LDFLAGS-reldep6mod4.so
= -Wl
,--no-as-needed
728 LDFLAGS-reldep8mod3.so
= -Wl
,--no-as-needed
729 LDFLAGS-unload4mod1.so
= -Wl
,--no-as-needed
730 LDFLAGS-unload4mod2.so
= -Wl
,--no-as-needed
731 LDFLAGS-tst-initorder
= -Wl
,--no-as-needed
732 LDFLAGS-tst-initordera2.so
= -Wl
,--no-as-needed
733 LDFLAGS-tst-initordera3.so
= -Wl
,--no-as-needed
734 LDFLAGS-tst-initordera4.so
= -Wl
,--no-as-needed
735 LDFLAGS-tst-initorderb2.so
= -Wl
,--no-as-needed
736 LDFLAGS-tst-tlsmod5.so
= -nostdlib
-Wl
,--no-as-needed
737 LDFLAGS-tst-tlsmod6.so
= -nostdlib
-Wl
,--no-as-needed
739 testobj1.so-no-z-defs
= yes
740 testobj3.so-no-z-defs
= yes
741 testobj4.so-no-z-defs
= yes
742 testobj5.so-no-z-defs
= yes
743 testobj6.so-no-z-defs
= yes
744 failobj.so-no-z-defs
= yes
745 constload2.so-no-z-defs
= yes
746 constload3.so-no-z-defs
= yes
747 nodelmod1.so-no-z-defs
= yes
748 nodelmod2.so-no-z-defs
= yes
749 nodelmod4.so-no-z-defs
= yes
750 nodel2mod2.so-no-z-defs
= yes
751 reldepmod2.so-no-z-defs
= yes
752 reldepmod3.so-no-z-defs
= yes
753 reldepmod4.so-no-z-defs
= yes
754 reldep4mod4.so-no-z-defs
= yes
755 reldep4mod2.so-no-z-defs
= yes
756 ltglobmod2.so-no-z-defs
= yes
757 dblloadmod3.so-no-z-defs
= yes
758 tst-tlsmod1.so-no-z-defs
= yes
759 tst-tlsmod2.so-no-z-defs
= yes
760 tst-tlsmod3.so-no-z-defs
= yes
761 tst-tlsmod4.so-no-z-defs
= yes
762 tst-tlsmod7.so-no-z-defs
= yes
763 tst-tlsmod8.so-no-z-defs
= yes
764 tst-tlsmod9.so-no-z-defs
= yes
765 tst-tlsmod10.so-no-z-defs
= yes
766 tst-tlsmod12.so-no-z-defs
= yes
767 tst-tlsmod14a.so-no-z-defs
= yes
768 tst-tlsmod14b.so-no-z-defs
= yes
769 tst-tlsmod15a.so-no-z-defs
= yes
770 tst-tlsmod16b.so-no-z-defs
= yes
771 circlemod2.so-no-z-defs
= yes
772 circlemod3.so-no-z-defs
= yes
773 circlemod3a.so-no-z-defs
= yes
774 reldep8mod2.so-no-z-defs
= yes
775 reldep9mod1.so-no-z-defs
= yes
776 unload3mod4.so-no-z-defs
= yes
777 unload4mod1.so-no-z-defs
= yes
778 ifuncmod1.so-no-z-defs
= yes
779 ifuncmod5.so-no-z-defs
= yes
780 ifuncmod6.so-no-z-defs
= yes
781 tst-auditmod9a.so-no-z-defs
= yes
782 tst-auditmod9b.so-no-z-defs
= yes
783 tst-nodelete-uniquemod.so-no-z-defs
= yes
784 tst-nodelete-rtldmod.so-no-z-defs
= yes
785 tst-nodelete-zmod.so-no-z-defs
= yes
786 tst-nodelete2mod.so-no-z-defs
= yes
788 ifeq ($(build-shared
),yes
)
789 # Build all the modules even when not actually running test programs.
790 tests
: $(test-modules
)
793 $(objpfx
)loadtest
: $(libdl
)
794 LDFLAGS-loadtest
= -rdynamic
796 $(objpfx
)loadtest.out
: $(test-modules
)
798 $(objpfx
)neededtest
: $(libdl
)
799 $(objpfx
)neededtest.out
: $(objpfx
)neededobj1.so
$(objpfx
)neededobj2.so \
800 $(objpfx
)neededobj3.so
802 $(objpfx
)neededtest2
: $(libdl
)
803 $(objpfx
)neededtest2.out
: $(objpfx
)neededobj1.so
$(objpfx
)neededobj2.so \
804 $(objpfx
)neededobj3.so
806 $(objpfx
)neededtest3
: $(libdl
)
807 $(objpfx
)neededtest3.out
: $(objpfx
)neededobj1.so
$(objpfx
)neededobj2.so \
808 $(objpfx
)neededobj3.so
$(objpfx
)neededobj4.so
810 $(objpfx
)neededtest4
: $(libdl
) $(objpfx
)neededobj1.so
811 $(objpfx
)neededtest4.out
: $(objpfx
)neededobj5.so
$(objpfx
)neededobj6.so
813 $(objpfx
)restest1
: $(objpfx
)testobj1.so
$(objpfx
)testobj1_1.so
$(libdl
)
814 LDFLAGS-restest1
= -rdynamic
816 $(objpfx
)restest2
: $(libdl
)
817 LDFLAGS-restest2
= -rdynamic
819 $(objpfx
)restest1.out
: $(test-modules
)
821 preloadtest-preloads
= testobj1 testobj2 testobj3 testobj4 testobj5
822 $(objpfx
)preloadtest
: $(objpfx
)testobj6.so
823 LDFLAGS-preloadtest
= -rdynamic
824 $(objpfx
)preloadtest.out
: $(preloadtest-preloads
:%=$(objpfx
)%.so
)
826 LD_PRELOAD
=$(subst $(empty
) ,:,$(strip $(preloadtest-preloads
:=.so
)))
828 $(objpfx
)loadfail
: $(libdl
)
829 LDFLAGS-loadfail
= -rdynamic
831 $(objpfx
)loadfail.out
: $(objpfx
)failobj.so
833 $(objpfx
)multiload
: $(libdl
)
834 LDFLAGS-multiload
= -rdynamic
835 CFLAGS-multiload.c
+= -DOBJDIR
=\"$(elf-objpfx
)\"
837 $(objpfx
)multiload.out
: $(objpfx
)testobj1.so
839 $(objpfx
)origtest
: $(libdl
)
840 LDFLAGS-origtest
= -rdynamic
841 $(objpfx
)origtest.out
: $(objpfx
)testobj1.so
843 ifeq ($(have-thread-library
),yes
)
844 $(objpfx
)resolvfail
: $(libdl
) $(shared-thread-library
)
846 $(objpfx
)resolvfail
: $(libdl
)
849 $(objpfx
)constload1
: $(libdl
)
850 $(objpfx
)constload1.out
: $(objpfx
)constload2.so
$(objpfx
)constload3.so
852 $(objpfx
)circleload1
: $(libdl
)
853 $(objpfx
)circleload1.out
: $(objpfx
)circlemod1.so \
854 $(objpfx
)circlemod1a.so
856 $(objpfx
)circlemod1.so
: $(objpfx
)circlemod2.so
857 $(objpfx
)circlemod2.so
: $(objpfx
)circlemod3.so
858 $(objpfx
)circlemod1a.so
: $(objpfx
)circlemod2a.so
859 $(objpfx
)circlemod2a.so
: $(objpfx
)circlemod3a.so
861 $(objpfx
)order
: $(addprefix $(objpfx
),dep4.so dep3.so dep2.so dep1.so
)
863 $(objpfx
)order-cmp.out
: $(objpfx
)order.out
864 (echo
"0123456789" | cmp
$< -) > $@
; \
867 $(objpfx
)vismain
: $(addprefix $(objpfx
),vismod1.so vismod2.so
)
868 $(objpfx
)vismain.out
: $(addprefix $(objpfx
),vismod3.so
)
869 vismain-ENV
= LD_PRELOAD
=$(addprefix $(objpfx
),vismod3.so
)
871 $(objpfx
)noload
: $(objpfx
)testobj1.so
$(libdl
)
872 LDFLAGS-noload
= -rdynamic
-Wl
,--no-as-needed
873 $(objpfx
)noload.out
: $(objpfx
)testobj5.so
875 $(objpfx
)noload-mem.out
: $(objpfx
)noload.out
876 $(common-objpfx
)malloc
/mtrace
$(objpfx
)noload.mtrace
> $@
; \
878 noload-ENV
= MALLOC_TRACE
=$(objpfx
)noload.mtrace
880 LDFLAGS-nodelete
= -rdynamic
881 LDFLAGS-nodelmod1.so
= -Wl
,--enable-new-dtags
,-z
,nodelete
882 LDFLAGS-nodelmod4.so
= -Wl
,--enable-new-dtags
,-z
,nodelete
883 $(objpfx
)nodelete
: $(libdl
)
884 $(objpfx
)nodelete.out
: $(objpfx
)nodelmod1.so
$(objpfx
)nodelmod2.so \
885 $(objpfx
)nodelmod3.so
887 LDFLAGS-nodlopenmod.so
= -Wl
,--enable-new-dtags
,-z
,nodlopen
888 $(objpfx
)nodlopen
: $(libdl
)
889 $(objpfx
)nodlopen.out
: $(objpfx
)nodlopenmod.so
891 $(objpfx
)nodlopenmod2.so
: $(objpfx
)nodlopenmod.so
892 $(objpfx
)nodlopen2
: $(libdl
)
893 $(objpfx
)nodlopen2.out
: $(objpfx
)nodlopenmod2.so
895 $(objpfx
)filtmod1.so
: $(objpfx
)filtmod1.os
$(objpfx
)filtmod2.so
896 $(LINK.o
) -shared
-o
$@
-B
$(csu-objpfx
) $(LDFLAGS.so
) \
897 -L
$(subst :, -L
,$(rpath-link
)) \
898 -Wl
,-rpath-link
=$(rpath-link
) \
899 $< -Wl
,-F
,$(objpfx
)filtmod2.so
900 $(objpfx
)filter: $(objpfx
)filtmod1.so
902 # This does not link against libc.
903 CFLAGS-filtmod1.c
+= $(no-stack-protector
)
905 $(objpfx
)unload
: $(libdl
)
906 $(objpfx
)unload.out
: $(objpfx
)unloadmod.so
908 $(objpfx
)reldep
: $(libdl
)
909 $(objpfx
)reldep.out
: $(objpfx
)reldepmod1.so
$(objpfx
)reldepmod2.so
911 $(objpfx
)reldep2
: $(libdl
)
912 $(objpfx
)reldep2.out
: $(objpfx
)reldepmod1.so
$(objpfx
)reldepmod3.so
914 $(objpfx
)reldep3
: $(libdl
)
915 $(objpfx
)reldep3.out
: $(objpfx
)reldepmod1.so
$(objpfx
)reldepmod4.so
917 $(objpfx
)reldep4
: $(libdl
)
918 $(objpfx
)reldep4.out
: $(objpfx
)reldep4mod1.so
$(objpfx
)reldep4mod2.so
920 $(objpfx
)next
: $(objpfx
)nextmod1.so
$(objpfx
)nextmod2.so
$(libdl
)
921 LDFLAGS-next
= -Wl
,--no-as-needed
923 $(objpfx
)unload2
: $(libdl
)
924 $(objpfx
)unload2.out
: $(objpfx
)unload2mod.so
$(objpfx
)unload2dep.so
926 $(objpfx
)lateglobal
: $(libdl
)
927 $(objpfx
)lateglobal.out
: $(objpfx
)ltglobmod1.so
$(objpfx
)ltglobmod2.so
929 $(objpfx
)tst-pathopt
: $(libdl
)
930 $(objpfx
)tst-pathopt.out
: tst-pathopt.sh
$(objpfx
)tst-pathopt \
931 $(objpfx
)pathoptobj.so
932 $(SHELL
) $< $(common-objpfx
) '$(test-wrapper-env)' \
933 '$(run-program-env)' > $@
; \
936 $(objpfx
)tst-rtld-load-self.out
: tst-rtld-load-self.sh
$(objpfx
)ld.so
937 $(SHELL
) $^
'$(test-wrapper)' '$(test-wrapper-env)' > $@
; \
940 tst-rtld-preload-OBJS
= $(subst $(empty
) ,:,$(strip $(preloadtest-preloads
:=.so
)))
941 $(objpfx
)tst-rtld-preload.out
: tst-rtld-preload.sh
$(objpfx
)ld.so \
942 $(objpfx
)preloadtest \
943 $(preloadtest-preloads
:%=$(objpfx
)%.so
)
944 $(SHELL
) $< $(objpfx
)ld.so
$(objpfx
)preloadtest \
945 '$(test-wrapper-env)' '$(run_program_env)' \
946 '$(rpath-link)' '$(tst-rtld-preload-OBJS)' > $@
; \
949 $(objpfx
)initfirst
: $(libdl
)
950 $(objpfx
)initfirst.out
: $(objpfx
)firstobj.so
952 $(objpfx
)global
: $(objpfx
)globalmod1.so
953 $(objpfx
)global.out
: $(objpfx
)reldepmod1.so
955 $(objpfx
)dblload
: $(libdl
)
956 $(objpfx
)dblload.out
: $(objpfx
)dblloadmod1.so
$(objpfx
)dblloadmod2.so
958 $(objpfx
)dblunload
: $(libdl
)
959 $(objpfx
)dblunload.out
: $(objpfx
)dblloadmod1.so
$(objpfx
)dblloadmod2.so
961 $(objpfx
)reldep5
: $(libdl
)
962 $(objpfx
)reldep5.out
: $(objpfx
)reldepmod5.so
$(objpfx
)reldepmod6.so
964 $(objpfx
)reldep6
: $(libdl
)
965 $(objpfx
)reldep6.out
: $(objpfx
)reldep6mod3.so
$(objpfx
)reldep6mod4.so
967 $(objpfx
)reldep7
: $(libdl
)
968 $(objpfx
)reldep7.out
: $(objpfx
)reldep7mod1.so
$(objpfx
)reldep7mod2.so
970 $(objpfx
)reldep8
: $(libdl
)
971 $(objpfx
)reldep8.out
: $(objpfx
)reldep8mod3.so
973 LDFLAGS-nodel2mod2.so
= -Wl
,--enable-new-dtags
,-z
,nodelete
974 $(objpfx
)nodelete2
: $(libdl
)
975 $(objpfx
)nodelete2.out
: $(objpfx
)nodel2mod3.so
977 $(objpfx
)reldep9
: $(libdl
)
978 $(objpfx
)reldep9.out
: $(objpfx
)reldep9mod3.so
980 $(objpfx
)tst-tls3
: $(objpfx
)tst-tlsmod1.so
982 $(objpfx
)tst-tls4
: $(libdl
)
983 $(objpfx
)tst-tls4.out
: $(objpfx
)tst-tlsmod2.so
985 $(objpfx
)tst-tls5
: $(libdl
)
986 $(objpfx
)tst-tls5.out
: $(objpfx
)tst-tlsmod2.so
988 $(objpfx
)tst-tls6
: $(libdl
)
989 $(objpfx
)tst-tls6.out
: $(objpfx
)tst-tlsmod2.so
991 $(objpfx
)tst-tls7
: $(libdl
)
992 $(objpfx
)tst-tls7.out
: $(objpfx
)tst-tlsmod3.so
994 $(objpfx
)tst-tls8
: $(libdl
)
995 $(objpfx
)tst-tls8.out
: $(objpfx
)tst-tlsmod3.so
$(objpfx
)tst-tlsmod4.so
997 $(objpfx
)tst-tls9
: $(libdl
)
998 $(objpfx
)tst-tls9.out
: $(objpfx
)tst-tlsmod5.so
$(objpfx
)tst-tlsmod6.so
1000 $(objpfx
)tst-tls10
: $(objpfx
)tst-tlsmod8.so
$(objpfx
)tst-tlsmod7.so
1002 $(objpfx
)tst-tls11
: $(objpfx
)tst-tlsmod10.so
$(objpfx
)tst-tlsmod9.so
1004 $(objpfx
)tst-tls12
: $(objpfx
)tst-tlsmod12.so
$(objpfx
)tst-tlsmod11.so
1006 $(objpfx
)tst-tls13
: $(libdl
)
1007 $(objpfx
)tst-tls13.out
: $(objpfx
)tst-tlsmod13a.so
1009 $(objpfx
)tst-tls14
: $(objpfx
)tst-tlsmod14a.so
$(libdl
)
1010 $(objpfx
)tst-tls14.out
: $(objpfx
)tst-tlsmod14b.so
1012 $(objpfx
)tst-tls15
: $(libdl
)
1013 $(objpfx
)tst-tls15.out
: $(objpfx
)tst-tlsmod15a.so
$(objpfx
)tst-tlsmod15b.so
1015 $(objpfx
)tst-tls-dlinfo
: $(libdl
)
1016 $(objpfx
)tst-tls-dlinfo.out
: $(objpfx
)tst-tlsmod2.so
1020 $(objpfx
)tst-tls16
: $(libdl
)
1021 $(objpfx
)tst-tls16.out
: $(objpfx
)tst-tlsmod16a.so
$(objpfx
)tst-tlsmod16b.so
1023 $(objpfx
)tst-tls17
: $(libdl
)
1024 $(objpfx
)tst-tls17.out
: $(objpfx
)tst-tlsmod17b.so
1025 $(patsubst %,$(objpfx
)%.os
,$(tlsmod17a-modules
)): $(objpfx
)tst-tlsmod17a
%.os
: tst-tlsmod17a.c
1026 $(compile-command.c
) -DN
=$*
1027 $(patsubst %,$(objpfx
)%.so
,$(tlsmod17a-modules
)): $(objpfx
)tst-tlsmod17a
%.so
: $(objpfx
)ld.so
1028 $(objpfx
)tst-tlsmod17b.so
: $(patsubst %,$(objpfx
)%.so
,$(tlsmod17a-modules
))
1030 $(objpfx
)tst-tls18
: $(libdl
)
1031 $(objpfx
)tst-tls18.out
: $(patsubst %,$(objpfx
)%.so
,$(tlsmod18a-modules
))
1032 $(patsubst %,$(objpfx
)%.os
,$(tlsmod18a-modules
)): $(objpfx
)tst-tlsmod18a
%.os
: tst-tlsmod18a.c
1033 $(compile-command.c
) -DN
=$*
1034 $(patsubst %,$(objpfx
)%.so
,$(tlsmod18a-modules
)): $(objpfx
)tst-tlsmod18a
%.so
: $(objpfx
)ld.so
1036 $(objpfx
)tst-tls19
: $(libdl
)
1037 $(objpfx
)tst-tls19.out
: $(objpfx
)tst-tls19mod1.so
1039 CFLAGS-tst-align.c
+= $(stack-align-test-flags
)
1040 CFLAGS-tst-align2.c
+= $(stack-align-test-flags
)
1041 CFLAGS-tst-alignmod.c
+= $(stack-align-test-flags
)
1042 CFLAGS-tst-alignmod2.c
+= $(stack-align-test-flags
)
1043 $(objpfx
)tst-align
: $(libdl
)
1044 $(objpfx
)tst-align.out
: $(objpfx
)tst-alignmod.so
1045 $(objpfx
)tst-align2
: $(objpfx
)tst-alignmod2.so
1047 $(objpfx
)unload3
: $(libdl
)
1048 $(objpfx
)unload3.out
: $(objpfx
)unload3mod1.so
$(objpfx
)unload3mod2.so \
1049 $(objpfx
)unload3mod3.so
$(objpfx
)unload3mod4.so
1051 $(objpfx
)unload4
: $(libdl
)
1052 $(objpfx
)unload4.out
: $(objpfx
)unload4mod1.so
$(objpfx
)unload4mod3.so
1054 $(objpfx
)unload5
: $(libdl
)
1055 $(objpfx
)unload5.out
: $(objpfx
)unload3mod1.so
$(objpfx
)unload3mod2.so \
1056 $(objpfx
)unload3mod3.so
$(objpfx
)unload3mod4.so
1058 $(objpfx
)unload6
: $(libdl
)
1059 $(objpfx
)unload6.out
: $(objpfx
)unload6mod1.so
$(objpfx
)unload6mod2.so \
1060 $(objpfx
)unload6mod3.so
1062 $(objpfx
)unload7
: $(libdl
)
1063 $(objpfx
)unload7.out
: $(objpfx
)unload7mod1.so
$(objpfx
)unload7mod2.so
1064 unload7-ENV
= MALLOC_PERTURB_
=85
1066 $(objpfx
)unload8
: $(libdl
)
1067 $(objpfx
)unload8.out
: $(objpfx
)unload8mod1.so
$(objpfx
)unload8mod1x.so
1070 $(objpfx
)tst-tls9-static
: $(common-objpfx
)dlfcn
/libdl.a
1071 $(objpfx
)tst-tls9-static.out
: $(objpfx
)tst-tlsmod5.so
$(objpfx
)tst-tlsmod6.so
1074 ifeq ($(have-z-execstack
),yes
)
1075 $(objpfx
)tst-execstack
: $(libdl
)
1076 $(objpfx
)tst-execstack.out
: $(objpfx
)tst-execstack-mod.so
1077 CPPFLAGS-tst-execstack.c
+= -DUSE_PTHREADS
=0
1078 LDFLAGS-tst-execstack
= -Wl
,-z
,noexecstack
1079 LDFLAGS-tst-execstack-mod.so
= -Wl
,-z
,execstack
1081 $(objpfx
)tst-execstack-needed
: $(objpfx
)tst-execstack-mod.so
1082 LDFLAGS-tst-execstack-needed
= -Wl
,-z
,noexecstack
1084 LDFLAGS-tst-execstack-prog
= -Wl
,-z
,execstack
1085 CFLAGS-tst-execstack-prog.c
+= -Wno-trampolines
1086 CFLAGS-tst-execstack-mod.c
+= -Wno-trampolines
1089 LDFLAGS-tst-array2
= -Wl
,--no-as-needed
1090 LDFLAGS-tst-array5
= -Wl
,--no-as-needed
1092 $(objpfx
)tst-array1-cmp.out
: tst-array1.exp
$(objpfx
)tst-array1.out
1096 $(objpfx
)tst-array1-static-cmp.out
: tst-array1.exp \
1097 $(objpfx
)tst-array1-static.out
1101 $(objpfx
)tst-array2
: $(objpfx
)tst-array2dep.so
1102 $(objpfx
)tst-array2-cmp.out
: tst-array2.exp
$(objpfx
)tst-array2.out
1106 $(objpfx
)tst-array3-cmp.out
: tst-array1.exp
$(objpfx
)tst-array3.out
1110 $(objpfx
)tst-array4
: $(libdl
)
1111 $(objpfx
)tst-array4.out
: $(objpfx
)tst-array2dep.so
1112 $(objpfx
)tst-array4-cmp.out
: tst-array4.exp
$(objpfx
)tst-array4.out
1116 $(objpfx
)tst-array5
: $(objpfx
)tst-array5dep.so
1117 $(objpfx
)tst-array5-cmp.out
: tst-array5.exp
$(objpfx
)tst-array5.out
1121 $(objpfx
)tst-array5-static-cmp.out
: tst-array5-static.exp \
1122 $(objpfx
)tst-array5-static.out
1126 CFLAGS-tst-pie1.c
+= $(pie-ccflag
)
1127 CFLAGS-tst-pie2.c
+= $(pie-ccflag
)
1129 $(objpfx
)tst-piemod1.so
: $(libsupport
)
1130 $(objpfx
)tst-pie1
: $(objpfx
)tst-piemod1.so
1131 $(objpfx
)tst-dlopen-pie
: $(libdl
)
1132 $(objpfx
)tst-dlopen-pie.out
: $(objpfx
)tst-pie1
1134 ifeq (yes
,$(build-shared
))
1135 # NB: Please keep cet-built-dso in sysdeps/x86/Makefile in sync with
1136 # all-built-dso here.
1137 all-built-dso
:= $(common-objpfx
)elf
/ld.so
$(common-objpfx
)libc.so \
1138 $(filter-out $(common-objpfx
)linkobj
/libc.so
, \
1139 $(sort $(wildcard $(addprefix $(common-objpfx
), \
1143 $(all-built-dso
:=.dyn
): %.dyn
: %
1145 LC_ALL
=C
$(READELF
) -W
-d
$< > $@T
1148 common-generated
+= $(all-built-dso
:$(common-objpfx
)%=%.dyn
)
1150 $(objpfx
)check-textrel.out
: $(..
)scripts
/check-textrel.awk \
1151 $(all-built-dso
:=.dyn
)
1152 LC_ALL
=C
$(AWK
) -f
$^
> $@
; \
1154 generated
+= check-textrel.out
1156 $(objpfx
)execstack-default
: $(first-word
$(wildcard $(sysdirs
:%=%/stackinfo.h
)))
1157 $(make-target-directory
)
1158 { echo
'#include <elf.h>'; \
1159 echo
'#include <stackinfo.h>'; \
1160 echo
'#if (DEFAULT_STACK_PERMS & PF_X) == 0'; \
1161 echo
'@@@execstack-no@@@'; \
1163 echo
'@@@execstack-yes@@@'; \
1164 echo
'#endif'; } | \
1165 $(CC
) $(CFLAGS
) $(CPPFLAGS
) -E
-x c-header
- | \
1166 sed
-n
-e
's/^@@@\(.*\)@@@/\1/p' > $@T
1168 generated
+= execstack-default
1170 $(all-built-dso
:=.phdr
): %.phdr
: %
1172 LC_ALL
=C
$(READELF
) -W
-l
$< > $@T
1175 common-generated
+= $(all-built-dso
:$(common-objpfx
)%=%.phdr
)
1177 $(objpfx
)check-execstack.out
: $(..
)scripts
/check-execstack.awk \
1178 $(objpfx
)execstack-default \
1179 $(all-built-dso
:=.phdr
)
1180 LC_ALL
=C
$(AWK
) -v
"xfail=$(check-execstack-xfail)" -f
$^
> $@
; \
1182 generated
+= check-execstack.out
1184 $(objpfx
)check-wx-segment.out
: $(..
)scripts
/check-wx-segment.py \
1185 $(all-built-dso
:=.phdr
)
1186 $(PYTHON
) $^
--xfail
="$(check-wx-segment-xfail)" > $@
; \
1188 generated
+= check-wx-segment.out
1190 $(objpfx
)tst-dlmodcount
: $(libdl
)
1191 $(objpfx
)tst-dlmodcount.out
: $(test-modules
)
1193 $(all-built-dso
:=.jmprel
): %.jmprel
: % Makefile
1195 LC_ALL
=C
$(READELF
) -W
-S
-d
-r
$< > $@T
1198 common-generated
+= $(all-built-dso
:$(common-objpfx
)%=%.jmprel
)
1200 localplt-built-dso
:= $(addprefix $(common-objpfx
),\
1206 resolv
/libresolv.so \
1208 ifeq ($(build-mathvec
),yes
)
1209 localplt-built-dso
+= $(addprefix $(common-objpfx
), mathvec
/libmvec.so
)
1211 ifeq ($(have-thread-library
),yes
)
1212 localplt-built-dso
+= $(filter-out %_nonshared.a
, $(shared-thread-library
))
1214 ifeq ($(build-crypt
),yes
)
1215 localplt-built-dso
+= $(addprefix $(common-objpfx
), crypt
/libcrypt.so
)
1218 vpath localplt.data
$(+sysdep_dirs
)
1220 $(objpfx
)check-localplt.out
: $(..
)scripts
/check-localplt.awk \
1221 $(..
)scripts
/localplt.awk \
1222 $(localplt-built-dso
:=.jmprel
) \
1224 LC_ALL
=C
$(AWK
) -f
$(filter-out $< %localplt.data
,$^
) | \
1225 LC_ALL
=C
$(AWK
) -f
$< $(filter %localplt.data
,$^
) - \
1230 $(all-built-dso
:=.dynsym
): %.dynsym
: %
1232 LC_ALL
=C
$(READELF
) -W
--dyn-syms
$< > $@T
1235 common-generated
+= $(all-built-dso
:$(common-objpfx
)%=%.dynsym
)
1237 $(objpfx
)check-initfini.out
: $(..
)scripts
/check-initfini.awk \
1238 $(all-built-dso
:=.dynsym
)
1239 LC_ALL
=C
$(AWK
) -f
$^
> $@
; \
1241 generated
+= check-initfini.out
1243 $(objpfx
)tst-dlopenrpathmod.so
: $(libdl
)
1244 $(objpfx
)tst-dlopenrpath
: $(objpfx
)tst-dlopenrpathmod.so
$(libdl
)
1245 CFLAGS-tst-dlopenrpath.c
+= -DPFX
=\"$(objpfx
)\"
1246 LDFLAGS-tst-dlopenrpathmod.so
+= -Wl
,-rpath
,\
$$ORIGIN/test-subdir
1247 $(objpfx
)tst-dlopenrpath.out
: $(objpfx
)firstobj.so
1249 $(objpfx
)tst-deep1mod2.so
: $(objpfx
)tst-deep1mod3.so
1250 $(objpfx
)tst-deep1
: $(libdl
) $(objpfx
)tst-deep1mod1.so
1251 $(objpfx
)tst-deep1.out
: $(objpfx
)tst-deep1mod2.so
1252 LDFLAGS-tst-deep1
+= -rdynamic
1253 tst-deep1mod3.so-no-z-defs
= yes
1255 $(objpfx
)tst-dlmopen1mod.so
: $(libdl
)
1256 $(objpfx
)tst-dlmopen1
: $(libdl
)
1257 $(objpfx
)tst-dlmopen1.out
: $(objpfx
)tst-dlmopen1mod.so
1259 $(objpfx
)tst-dlmopen2
: $(libdl
)
1260 $(objpfx
)tst-dlmopen2.out
: $(objpfx
)tst-dlmopen1mod.so
1262 $(objpfx
)tst-dlmopen3
: $(libdl
)
1263 $(objpfx
)tst-dlmopen3.out
: $(objpfx
)tst-dlmopen1mod.so
1265 $(objpfx
)tst-audit1.out
: $(objpfx
)tst-auditmod1.so
1266 tst-audit1-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod1.so
1268 $(objpfx
)tst-audit2
: $(libdl
)
1269 $(objpfx
)tst-audit2.out
: $(objpfx
)tst-auditmod1.so
$(objpfx
)tst-auditmod9b.so
1270 # Prevent GCC-5 from translating a malloc/memset pair into calloc
1271 CFLAGS-tst-audit2.c
+= -fno-builtin
1272 tst-audit2-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod1.so
1274 $(objpfx
)tst-audit9
: $(libdl
)
1275 $(objpfx
)tst-audit9.out
: $(objpfx
)tst-auditmod9a.so
$(objpfx
)tst-auditmod9b.so
1276 tst-audit9-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod9a.so
1278 $(objpfx
)tst-audit8
: $(libm
)
1279 $(objpfx
)tst-audit8.out
: $(objpfx
)tst-auditmod1.so
1280 tst-audit8-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod1.so
1282 $(objpfx
)tst-global1
: $(libdl
)
1283 $(objpfx
)tst-global1.out
: $(objpfx
)testobj6.so
$(objpfx
)testobj2.so
1285 $(objpfx
)order2
: $(libdl
)
1286 $(objpfx
)order2.out
: $(objpfx
)order2mod1.so
$(objpfx
)order2mod2.so
1287 $(objpfx
)order2-cmp.out
: $(objpfx
)order2.out
1288 (echo
"12345" | cmp
$< -) > $@
; \
1290 $(objpfx
)order2mod1.so
: $(objpfx
)order2mod4.so
1291 $(objpfx
)order2mod4.so
: $(objpfx
)order2mod3.so
1292 $(objpfx
)order2mod2.so
: $(objpfx
)order2mod3.so
1293 order2mod2.so-no-z-defs
= yes
1294 LDFLAGS-order2mod1.so
= -Wl
,--no-as-needed
1295 LDFLAGS-order2mod2.so
= -Wl
,--no-as-needed
1297 tst-stackguard1-ARGS
= --command
"$(host-test-program-cmd) --child"
1298 tst-stackguard1-static-ARGS
= --command
"$(objpfx)tst-stackguard1-static --child"
1300 tst-ptrguard1-ARGS
= --command
"$(host-test-program-cmd) --child"
1301 # When built statically, the pointer guard interface uses
1302 # __pointer_chk_guard_local.
1303 CFLAGS-tst-ptrguard1-static.c
+= -DPTRGUARD_LOCAL
1304 tst-ptrguard1-static-ARGS
= --command
"$(objpfx)tst-ptrguard1-static --child"
1306 $(objpfx
)tst-leaks1
: $(libdl
)
1307 $(objpfx
)tst-leaks1-mem.out
: $(objpfx
)tst-leaks1.out
1308 $(common-objpfx
)malloc
/mtrace
$(objpfx
)tst-leaks1.mtrace
> $@
; \
1311 $(objpfx
)tst-leaks1-static
: $(common-objpfx
)dlfcn
/libdl.a
1312 $(objpfx
)tst-leaks1-static-mem.out
: $(objpfx
)tst-leaks1-static.out
1313 $(common-objpfx
)malloc
/mtrace
$(objpfx
)tst-leaks1-static.mtrace
> $@
; \
1316 tst-leaks1-ENV
= MALLOC_TRACE
=$(objpfx
)tst-leaks1.mtrace
1317 tst-leaks1-static-ENV
= MALLOC_TRACE
=$(objpfx
)tst-leaks1-static.mtrace
1319 $(objpfx
)tst-addr1
: $(libdl
)
1321 $(objpfx
)tst-thrlock
: $(libdl
) $(shared-thread-library
)
1323 tst-tst-dlopen-tlsmodid-no-pie
= yes
1324 $(objpfx
)tst-dlopen-tlsmodid
: $(libdl
) $(shared-thread-library
)
1325 $(objpfx
)tst-dlopen-tlsmodid.out
: $(objpfx
)tst-dlopen-self
1326 CFLAGS-tst-dlopen-tlsmodid-pie.c
+= $(pie-ccflag
)
1327 $(objpfx
)tst-dlopen-tlsmodid-pie
: $(libdl
) $(shared-thread-library
)
1328 $(objpfx
)tst-dlopen-tlsmodid-pie.out
: $(objpfx
)tst-dlopen-self-pie
1329 $(objpfx
)tst-dlopen-tlsmodid-container
: $(libdl
) $(shared-thread-library
)
1330 LDFLAGS-tst-dlopen-tlsmodid-container
+= -Wl
,-rpath
,\
$$ORIGIN
1332 tst-tst-dlopen-self-no-pie
= yes
1333 $(objpfx
)tst-dlopen-self
: $(libdl
)
1334 CFLAGS-tst-dlopen-self-pie.c
+= $(pie-ccflag
)
1335 $(objpfx
)tst-dlopen-self-pie
: $(libdl
)
1336 $(objpfx
)tst-dlopen-self-container
: $(libdl
)
1337 LDFLAGS-tst-dlopen-self-container
+= -Wl
,-rpath
,\
$$ORIGIN
1339 CFLAGS-ifuncmain1pic.c
+= $(pic-ccflag
)
1340 CFLAGS-ifuncmain1picstatic.c
+= $(pic-ccflag
)
1341 CFLAGS-ifuncmain1staticpic.c
+= $(pic-ccflag
)
1342 CFLAGS-ifuncdep1pic.c
+= $(pic-ccflag
)
1343 CFLAGS-ifuncmain1vispic.c
+= $(pic-ccflag
)
1344 CFLAGS-ifuncmain2pic.c
+= $(pic-ccflag
)
1345 CFLAGS-ifuncmain2picstatic.c
+= $(pic-ccflag
)
1346 CFLAGS-ifuncdep2pic.c
+= $(pic-ccflag
)
1347 CFLAGS-ifuncmain4picstatic.c
+= $(pic-ccflag
)
1348 CFLAGS-ifuncmain5pic.c
+= $(pic-ccflag
)
1349 CFLAGS-ifuncmain5picstatic.c
+= $(pic-ccflag
)
1350 CFLAGS-ifuncmain5staticpic.c
+= $(pic-ccflag
)
1351 CFLAGS-ifuncdep5pic.c
+= $(pic-ccflag
)
1352 CFLAGS-ifuncmain7pic.c
+= $(pic-ccflag
)
1353 CFLAGS-ifuncmain7picstatic.c
+= $(pic-ccflag
)
1354 CFLAGS-ifuncmain9pic.c
+= $(pic-ccflag
)
1355 CFLAGS-ifuncmain9picstatic.c
+= $(pic-ccflag
)
1357 LDFLAGS-ifuncmain3
= -Wl
,-export-dynamic
1359 CFLAGS-ifuncmain1pie.c
+= $(pie-ccflag
)
1360 CFLAGS-ifuncmain1vispie.c
+= $(pie-ccflag
)
1361 CFLAGS-ifuncmain1staticpie.c
+= $(pie-ccflag
)
1362 CFLAGS-ifuncmain5pie.c
+= $(pie-ccflag
)
1363 CFLAGS-ifuncmain6pie.c
+= $(pie-ccflag
)
1364 CFLAGS-ifuncmain7pie.c
+= $(pie-ccflag
)
1365 CFLAGS-ifuncmain9pie.c
+= $(pie-ccflag
)
1366 CFLAGS-tst-ifunc-textrel.c
+= $(pic-ccflag
)
1368 $(objpfx
)ifuncmain1pie
: $(objpfx
)ifuncmod1.so
1369 $(objpfx
)ifuncmain1staticpie
: $(objpfx
)ifuncdep1pic.o
1370 $(objpfx
)ifuncmain1vispie
: $(objpfx
)ifuncmod1.so
1371 $(objpfx
)ifuncmain5pie
: $(objpfx
)ifuncmod5.so
1372 $(objpfx
)ifuncmain6pie
: $(objpfx
)ifuncmod6.so
1374 $(objpfx
)ifuncmain1
: $(addprefix $(objpfx
),ifuncmod1.so
)
1375 $(objpfx
)ifuncmain1pic
: $(addprefix $(objpfx
),ifuncmod1.so
)
1376 $(objpfx
)ifuncmain1staticpic
: $(addprefix $(objpfx
),ifuncdep1pic.o
)
1377 $(objpfx
)ifuncmain1static
: $(addprefix $(objpfx
),ifuncdep1.o
)
1378 $(objpfx
)ifuncmain1picstatic
: $(addprefix $(objpfx
),ifuncdep1pic.o
)
1379 $(objpfx
)ifuncmain1vis
: $(addprefix $(objpfx
),ifuncmod1.so
)
1380 $(objpfx
)ifuncmain1vispic
: $(addprefix $(objpfx
),ifuncmod1.so
)
1381 $(objpfx
)ifuncmain2
: $(addprefix $(objpfx
),ifuncdep2.o
)
1382 $(objpfx
)ifuncmain2pic
: $(addprefix $(objpfx
),ifuncdep2pic.o
)
1383 $(objpfx
)ifuncmain2static
: $(addprefix $(objpfx
),ifuncdep2.o
)
1384 $(objpfx
)ifuncmain2picstatic
: $(addprefix $(objpfx
),ifuncdep2pic.o
)
1386 $(objpfx
)ifuncmain3
: $(libdl
)
1387 $(objpfx
)ifuncmain3.out
: $(objpfx
)ifuncmod3.so
1389 $(objpfx
)ifuncmain5
: $(addprefix $(objpfx
),ifuncmod5.so
)
1390 $(objpfx
)ifuncmain5pic
: $(addprefix $(objpfx
),ifuncmod5.so
)
1391 $(objpfx
)ifuncmain5static
: $(addprefix $(objpfx
),ifuncdep5.o
)
1392 $(objpfx
)ifuncmain5staticpic
: $(addprefix $(objpfx
),ifuncdep5pic.o
)
1393 $(objpfx
)ifuncmain5picstatic
: $(addprefix $(objpfx
),ifuncdep5pic.o
)
1395 LDFLAGS-tst-ifunc-fault-lazy
= -Wl
,-z
,lazy
1396 LDFLAGS-tst-ifunc-fault-bindnow
= -Wl
,-z
,now
1397 define tst-ifunc-fault-script
1398 ( $(test-wrapper
) $(rtld-prefix
) --verify
$^ \
1399 && $(test-wrapper-env
) LD_TRACE_LOADED_OBJECTS
=1 $(rtld-prefix
) $^ \
1400 && $(test-wrapper-env
) LD_TRACE_LOADED_OBJECTS
=1 LD_DEBUG
=unused \
1402 ) > $@
; $(evaluate-test
)
1404 $(objpfx
)tst-ifunc-fault-lazy.out
: $(objpfx
)tst-ifunc-fault-lazy
$(objpfx
)ld.so
1405 $(tst-ifunc-fault-script
)
1406 $(objpfx
)tst-ifunc-fault-bindnow.out
: $(objpfx
)tst-ifunc-fault-bindnow \
1408 $(tst-ifunc-fault-script
)
1410 $(objpfx
)tst-unique1
: $(libdl
)
1411 $(objpfx
)tst-unique1.out
: $(objpfx
)tst-unique1mod1.so \
1412 $(objpfx
)tst-unique1mod2.so
1414 $(objpfx
)tst-unique2
: $(libdl
) $(objpfx
)tst-unique2mod1.so
1415 $(objpfx
)tst-unique2.out
: $(objpfx
)tst-unique2mod2.so
1417 $(objpfx
)tst-unique3
: $(libdl
) $(objpfx
)tst-unique3lib.so
1418 $(objpfx
)tst-unique3.out
: $(objpfx
)tst-unique3lib2.so
1420 $(objpfx
)tst-unique4
: $(objpfx
)tst-unique4lib.so
1422 $(objpfx
)tst-nodelete
: $(libdl
)
1423 $(objpfx
)tst-nodelete.out
: $(objpfx
)tst-nodelete-uniquemod.so \
1424 $(objpfx
)tst-nodelete-rtldmod.so \
1425 $(objpfx
)tst-nodelete-zmod.so
1427 LDFLAGS-tst-nodelete
= -rdynamic
1428 LDFLAGS-tst-nodelete-zmod.so
= -Wl
,--enable-new-dtags
,-z
,nodelete
1430 $(objpfx
)tst-nodelete2
: $(libdl
)
1431 $(objpfx
)tst-nodelete2.out
: $(objpfx
)tst-nodelete2mod.so
1433 LDFLAGS-tst-nodelete2
= -rdynamic
1435 $(objpfx
)tst-initorder-cmp.out
: tst-initorder.exp
$(objpfx
)tst-initorder.out
1439 $(objpfx
)tst-initorder2
: $(objpfx
)tst-initorder2a.so
$(objpfx
)tst-initorder2d.so
$(objpfx
)tst-initorder2c.so
1440 $(objpfx
)tst-initorder2a.so
: $(objpfx
)tst-initorder2b.so
1441 $(objpfx
)tst-initorder2b.so
: $(objpfx
)tst-initorder2c.so
1442 $(objpfx
)tst-initorder2c.so
: $(objpfx
)tst-initorder2d.so
1443 LDFLAGS-tst-initorder2
= -Wl
,--no-as-needed
1444 LDFLAGS-tst-initorder2a.so
= -Wl
,--no-as-needed
1445 LDFLAGS-tst-initorder2b.so
= -Wl
,--no-as-needed
1446 LDFLAGS-tst-initorder2c.so
= -Wl
,--no-as-needed
1447 define o-iterator-doit
1448 $(objpfx
)tst-initorder2
$o.os
: tst-initorder2.c
; \
1449 $$(compile-command.c
) -DNAME
=\"$o\"
1451 object-suffixes-left
:= a b c d
1452 include $(o-iterator
)
1454 $(objpfx
)tst-initorder2-cmp.out
: tst-initorder2.exp
$(objpfx
)tst-initorder2.out
1458 $(objpfx
)tst-relsort1
: $(libdl
)
1459 $(objpfx
)tst-relsort1mod1.so
: $(libm
) $(objpfx
)tst-relsort1mod2.so
1460 $(objpfx
)tst-relsort1mod2.so
: $(libm
)
1461 $(objpfx
)tst-relsort1.out
: $(objpfx
)tst-relsort1mod1.so \
1462 $(objpfx
)tst-relsort1mod2.so
1464 $(objpfx
)tst-unused-dep.out
: $(objpfx
)testobj1.so
1465 $(test-wrapper-env
) \
1466 LD_TRACE_LOADED_OBJECTS
=1 \
1473 $(objpfx
)tst-unused-dep-cmp.out
: $(objpfx
)tst-unused-dep.out
1474 cmp
$< /dev
/null
> $@
; \
1477 $(objpfx
)tst-audit11.out
: $(objpfx
)tst-auditmod11.so
$(objpfx
)tst-audit11mod1.so
1478 $(objpfx
)tst-audit11
: $(libdl
)
1479 tst-audit11-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod11.so
1480 $(objpfx
)tst-audit11mod1.so
: $(objpfx
)tst-audit11mod2.so
1481 LDFLAGS-tst-audit11mod2.so
= -Wl
,--version-script
=tst-audit11mod2.map
,-soname
,tst-audit11mod2.so
1483 $(objpfx
)tst-audit12.out
: $(objpfx
)tst-auditmod12.so
$(objpfx
)tst-audit12mod1.so
$(objpfx
)tst-audit12mod3.so
1484 $(objpfx
)tst-audit12
: $(libdl
)
1485 tst-audit12-ENV
= LD_AUDIT
=$(objpfx
)tst-auditmod12.so
1486 $(objpfx
)tst-audit12mod1.so
: $(objpfx
)tst-audit12mod2.so
1487 LDFLAGS-tst-audit12mod2.so
= -Wl
,--version-script
=tst-audit12mod2.map
1489 $(objpfx
)tst-audit13.out
: $(objpfx
)tst-audit13mod1.so
1490 LDFLAGS-tst-audit13mod1.so
= -Wl
,-z
,lazy
1491 tst-audit13-ENV
= LD_AUDIT
=$(objpfx
)tst-audit13mod1.so
1493 $(objpfx
)tst-auditmany.out
: $(objpfx
)tst-auditmanymod1.so \
1494 $(objpfx
)tst-auditmanymod2.so
$(objpfx
)tst-auditmanymod3.so \
1495 $(objpfx
)tst-auditmanymod4.so
$(objpfx
)tst-auditmanymod5.so \
1496 $(objpfx
)tst-auditmanymod6.so
$(objpfx
)tst-auditmanymod7.so \
1497 $(objpfx
)tst-auditmanymod8.so
$(objpfx
)tst-auditmanymod9.so
1498 tst-auditmany-ENV
= \
1499 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
1501 # tst-sonamemove links against an older implementation of the library.
1502 LDFLAGS-tst-sonamemove-linkmod1.so
= \
1503 -Wl
,--version-script
=tst-sonamemove-linkmod1.map \
1504 -Wl
,-soname
,tst-sonamemove-runmod1.so
1505 LDFLAGS-tst-sonamemove-runmod1.so
= -Wl
,--no-as-needed \
1506 -Wl
,--version-script
=tst-sonamemove-runmod1.map \
1507 -Wl
,-soname
,tst-sonamemove-runmod1.so
1508 LDFLAGS-tst-sonamemove-runmod2.so
= \
1509 -Wl
,--version-script
=tst-sonamemove-runmod2.map \
1510 -Wl
,-soname
,tst-sonamemove-runmod2.so
1511 $(objpfx
)tst-sonamemove-runmod1.so
: $(objpfx
)tst-sonamemove-runmod2.so
1512 # Link against the link module, but depend on the run-time modules
1514 $(objpfx
)tst-sonamemove-link
: $(objpfx
)tst-sonamemove-linkmod1.so
1515 $(objpfx
)tst-sonamemove-link.out
: \
1516 $(objpfx
)tst-sonamemove-runmod1.so \
1517 $(objpfx
)tst-sonamemove-runmod2.so
1518 $(objpfx
)tst-sonamemove-dlopen
: $(libdl
)
1519 $(objpfx
)tst-sonamemove-dlopen.out
: \
1520 $(objpfx
)tst-sonamemove-runmod1.so \
1521 $(objpfx
)tst-sonamemove-runmod2.so
1523 # Override -z defs, so that we can reference an undefined symbol.
1524 # Force lazy binding for the same reason.
1525 LDFLAGS-tst-latepthreadmod.so
= \
1526 -Wl
,-z
,lazy
-Wl
,--unresolved-symbols
=ignore-all
1527 # Do not optimize sibling calls as the test relies on a JMP_SLOT relocation for
1528 # function this_function_is_not_defined.
1529 CFLAGS-tst-latepthreadmod.c
+= -fno-optimize-sibling-calls
1530 $(objpfx
)tst-latepthreadmod.so
: $(shared-thread-library
)
1531 $(objpfx
)tst-latepthread
: $(libdl
)
1532 $(objpfx
)tst-latepthread.out
: $(objpfx
)tst-latepthreadmod.so
1534 # The test modules are parameterized by preprocessor macros.
1535 $(patsubst %,$(objpfx
)%.os
,$(tst-tls-many-dynamic-modules
)): \
1536 $(objpfx
)tst-tls-manydynamic
%mod.os
: tst-tls-manydynamicmod.c
1537 $(compile-command.c
) \
1538 -DNAME
=tls_global_
$* -DSETTER
=set_value_
$* -DGETTER
=get_value_
$*
1539 $(objpfx
)tst-tls-manydynamic
: $(libdl
) $(shared-thread-library
)
1540 $(objpfx
)tst-tls-manydynamic.out
: \
1541 $(patsubst %,$(objpfx
)%.so
,$(tst-tls-many-dynamic-modules
))
1543 tst-prelink-ENV
= LD_TRACE_PRELINKING
=1
1545 $(objpfx
)tst-prelink-conflict.out
: $(objpfx
)tst-prelink.out
1546 grep stdout
$< | grep conflict |
$(AWK
) '{ print $$10, $$11 }' > $@
1548 $(objpfx
)tst-prelink-cmp.out
: tst-prelink.exp \
1549 $(objpfx
)tst-prelink-conflict.out
1553 $(objpfx
)tst-ldconfig-X.out
: tst-ldconfig-X.sh
$(objpfx
)ldconfig
1554 $(SHELL
) $< '$(common-objpfx)' '$(test-wrapper-env)' \
1555 '$(run-program-env)' > $@
; \
1558 $(objpfx
)tst-dlsym-error
: $(libdl
)
1560 # Test static linking of all the libraries we can possibly link
1561 # together. Note that in some configurations this may be less than the
1562 # complete list of libraries we build but we try to maxmimize this list.
1563 $(objpfx
)tst-linkall-static
: \
1564 $(common-objpfx
)math
/libm.a \
1565 $(common-objpfx
)resolv
/libresolv.a \
1566 $(common-objpfx
)dlfcn
/libdl.a \
1567 $(common-objpfx
)login
/libutil.a \
1568 $(common-objpfx
)rt
/librt.a \
1569 $(common-objpfx
)resolv
/libanl.a \
1570 $(static-thread-library
)
1572 ifeq ($(build-crypt
),yes
)
1573 # If we are using NSS crypto and we have the ability to link statically
1574 # then we include libcrypt.a, otherwise we leave out libcrypt.a and
1575 # link as much as we can into the tst-linkall-static test. This assumes
1576 # that linking with libcrypt.a does everything required to include the
1577 # static NSS crypto library.
1578 ifeq (yesyes
,$(nss-crypt
)$(static-nss-crypt
))
1579 $(objpfx
)tst-linkall-static
: \
1580 $(common-objpfx
)crypt
/libcrypt.a
1582 # If we are not using NSS crypto then we always have the ability to link
1584 ifeq (no
,$(nss-crypt
))
1585 $(objpfx
)tst-linkall-static
: \
1586 $(common-objpfx
)crypt
/libcrypt.a
1590 # The application depends on the DSO, and the DSO loads the plugin.
1591 # The plugin also depends on the DSO. This creates the circular
1592 # dependency via dlopen that we're testing to make sure works.
1593 $(objpfx
)tst-nodelete-dlclose-dso.so
: $(libdl
)
1594 $(objpfx
)tst-nodelete-dlclose-plugin.so
: $(objpfx
)tst-nodelete-dlclose-dso.so
1595 $(objpfx
)tst-nodelete-dlclose
: $(objpfx
)tst-nodelete-dlclose-dso.so
1596 $(objpfx
)tst-nodelete-dlclose.out
: $(objpfx
)tst-nodelete-dlclose-dso.so \
1597 $(objpfx
)tst-nodelete-dlclose-plugin.so
1599 tst-env-setuid-ENV
= MALLOC_CHECK_
=2 MALLOC_MMAP_THRESHOLD_
=4096 \
1601 tst-env-setuid-tunables-ENV
= \
1602 GLIBC_TUNABLES
=glibc.malloc.
check=2:glibc.malloc.mmap_threshold
=4096
1604 $(objpfx
)tst-debug1
: $(libdl
)
1605 $(objpfx
)tst-debug1.out
: $(objpfx
)tst-debug1mod1.so
1607 $(objpfx
)tst-debug1mod1.so
: $(objpfx
)testobj1.so
1608 $(OBJCOPY
) --only-keep-debug
$< $@
1610 $(objpfx
)tst-main1
: $(objpfx
)tst-main1mod.so
1611 CRT-tst-main1
:= $(csu-objpfx
)crt1.o
1612 tst-main1-no-pie
= yes
1613 LDLIBS-tst-main1
= $(libsupport
)
1614 tst-main1mod.so-no-z-defs
= yes
1616 LDLIBS-tst-absolute-sym-lib.so
= tst-absolute-sym-lib.lds
1617 $(objpfx
)tst-absolute-sym-lib.so
: $(LDLIBS-tst-absolute-sym-lib.so
)
1618 $(objpfx
)tst-absolute-sym
: $(objpfx
)tst-absolute-sym-lib.so
1620 LDLIBS-tst-absolute-zero-lib.so
= tst-absolute-zero-lib.lds
1621 $(objpfx
)tst-absolute-zero-lib.so
: $(LDLIBS-tst-absolute-zero-lib.so
)
1622 $(objpfx
)tst-absolute-zero
: $(objpfx
)tst-absolute-zero-lib.so
1624 # Both the main program and the DSO for tst-libc_dlvsym need to link
1626 $(objpfx
)tst-libc_dlvsym
: $(libdl
)
1627 $(objpfx
)tst-libc_dlvsym-dso.so
: $(libsupport
) $(libdl
)
1628 $(objpfx
)tst-libc_dlvsym.out
: $(objpfx
)tst-libc_dlvsym-dso.so
1629 $(objpfx
)tst-libc_dlvsym-static
: $(common-objpfx
)dlfcn
/libdl.a
1630 tst-libc_dlvsym-static-ENV
= \
1631 LD_LIBRARY_PATH
=$(objpfx
):$(common-objpfx
):$(common-objpfx
)dlfcn
1632 $(objpfx
)tst-libc_dlvsym-static.out
: $(objpfx
)tst-libc_dlvsym-dso.so
1634 $(objpfx
)tst-big-note
: $(objpfx
)tst-big-note-lib.so
1635 # Avoid creating an ABI tag note, which may come before the
1636 # artificial, large note in tst-big-note-lib.o and invalidate the
1638 $(objpfx
)tst-big-note-lib.so
: $(objpfx
)tst-big-note-lib.o
1639 $(LINK.o
) -shared
-o
$@
$(LDFLAGS.so
) $<
1641 $(objpfx
)tst-unwind-ctor
: $(objpfx
)tst-unwind-ctor-lib.so
1643 CFLAGS-tst-unwind-main.c
+= -funwind-tables
-DUSE_PTHREADS
=0
1645 $(objpfx
)tst-initfinilazyfail
: $(libdl
)
1646 $(objpfx
)tst-initfinilazyfail.out
: \
1647 $(objpfx
)tst-initlazyfailmod.so
$(objpfx
)tst-finilazyfailmod.so
1648 # Override -z defs, so that we can reference an undefined symbol.
1649 # Force lazy binding for the same reason.
1650 LDFLAGS-tst-initlazyfailmod.so
= \
1651 -Wl
,-z
,lazy
-Wl
,--unresolved-symbols
=ignore-all
1652 LDFLAGS-tst-finilazyfailmod.so
= \
1653 -Wl
,-z
,lazy
-Wl
,--unresolved-symbols
=ignore-all
1655 $(objpfx
)tst-dlopenfail
: $(libdl
)
1656 $(objpfx
)tst-dlopenfail.out
: \
1657 $(objpfx
)tst-dlopenfailmod1.so
$(objpfx
)tst-dlopenfailmod2.so
1658 # Order matters here. tst-dlopenfaillinkmod.so's soname ensures a
1659 # run-time loader failure. --as-needed breaks this test because
1660 # nothing actually references tst-dlopenfailmod2.so (with its soname
1661 # tst-dlopenfail-missingmod.so).
1662 LDFLAGS-tst-dlopenfailmod1.so
= -Wl
,--no-as-needed
1663 $(objpfx
)tst-dlopenfailmod1.so
: \
1664 $(shared-thread-library
) $(objpfx
)tst-dlopenfaillinkmod.so
1665 LDFLAGS-tst-dlopenfaillinkmod.so
= -Wl
,-soname
,tst-dlopenfail-missingmod.so
1666 $(objpfx
)tst-dlopenfailmod2.so
: $(shared-thread-library
)
1667 $(objpfx
)tst-dlopenfail-2
: $(libdl
)
1668 $(objpfx
)tst-dlopenfail.out
: \
1669 $(objpfx
)tst-dlopenfailmod1.so
$(objpfx
)tst-dlopenfailmod2.so \
1670 $(objpfx
)tst-dlopenfailmod3.so
1672 $(objpfx
)tst-dlopen-nodelete-reloc
: $(libdl
)
1673 $(objpfx
)tst-dlopen-nodelete-reloc.out
: \
1674 $(objpfx
)tst-dlopen-nodelete-reloc-mod1.so \
1675 $(objpfx
)tst-dlopen-nodelete-reloc-mod2.so \
1676 $(objpfx
)tst-dlopen-nodelete-reloc-mod3.so \
1677 $(objpfx
)tst-dlopen-nodelete-reloc-mod4.so \
1678 $(objpfx
)tst-dlopen-nodelete-reloc-mod5.so \
1679 $(objpfx
)tst-dlopen-nodelete-reloc-mod6.so \
1680 $(objpfx
)tst-dlopen-nodelete-reloc-mod7.so \
1681 $(objpfx
)tst-dlopen-nodelete-reloc-mod8.so \
1682 $(objpfx
)tst-dlopen-nodelete-reloc-mod9.so \
1683 $(objpfx
)tst-dlopen-nodelete-reloc-mod10.so \
1684 $(objpfx
)tst-dlopen-nodelete-reloc-mod11.so \
1685 $(objpfx
)tst-dlopen-nodelete-reloc-mod12.so \
1686 $(objpfx
)tst-dlopen-nodelete-reloc-mod13.so \
1687 $(objpfx
)tst-dlopen-nodelete-reloc-mod14.so \
1688 $(objpfx
)tst-dlopen-nodelete-reloc-mod15.so \
1689 $(objpfx
)tst-dlopen-nodelete-reloc-mod16.so \
1690 $(objpfx
)tst-dlopen-nodelete-reloc-mod17.so
1691 tst-dlopen-nodelete-reloc-mod2.so-no-z-defs
= yes
1692 LDFLAGS-tst-dlopen-nodelete-reloc-mod2.so
= -Wl
,-z
,nodelete
1693 $(objpfx
)tst-dlopen-nodelete-reloc-mod4.so
: \
1694 $(objpfx
)tst-dlopen-nodelete-reloc-mod3.so
1695 LDFLAGS-tst-dlopen-nodelete-reloc-mod4.so
= -Wl
,--no-as-needed
1696 $(objpfx
)tst-dlopen-nodelete-reloc-mod5.so
: \
1697 $(objpfx
)tst-dlopen-nodelete-reloc-mod4.so
1698 LDFLAGS-tst-dlopen-nodelete-reloc-mod5.so
= -Wl
,-z
,nodelete
,--no-as-needed
1699 tst-dlopen-nodelete-reloc-mod5.so-no-z-defs
= yes
1700 tst-dlopen-nodelete-reloc-mod7.so-no-z-defs
= yes
1701 $(objpfx
)tst-dlopen-nodelete-reloc-mod8.so
: $(libdl
)
1702 $(objpfx
)tst-dlopen-nodelete-reloc-mod10.so
: $(libdl
)
1703 tst-dlopen-nodelete-reloc-mod11.so-no-z-defs
= yes
1704 $(objpfx
)tst-dlopen-nodelete-reloc-mod13.so
: \
1705 $(objpfx
)tst-dlopen-nodelete-reloc-mod12.so
1706 $(objpfx
)tst-dlopen-nodelete-reloc-mod15.so
: \
1707 $(objpfx
)tst-dlopen-nodelete-reloc-mod14.so
1708 tst-dlopen-nodelete-reloc-mod16.so-no-z-defs
= yes
1709 $(objpfx
)tst-dlopen-nodelete-reloc-mod16.so
: \
1710 $(objpfx
)tst-dlopen-nodelete-reloc-mod15.so
1711 LDFLAGS-tst-dlopen-nodelete-reloc-mod16.so
= -Wl
,--no-as-needed
1712 $(objpfx
)tst-dlopen-nodelete-reloc-mod17.so
: \
1713 $(objpfx
)tst-dlopen-nodelete-reloc-mod15.so \
1714 $(objpfx
)tst-dlopen-nodelete-reloc-mod16.so
1715 LDFLAGS-tst-dlopen-nodelete-reloc-mod17.so
= -Wl
,--no-as-needed
1717 $(objpfx
)tst-ldconfig-ld_so_conf-update.out
: $(objpfx
)tst-ldconfig-ld-mod.so
1718 $(objpfx
)tst-ldconfig-ld_so_conf-update
: $(libdl
)
1720 LDFLAGS-tst-filterobj-flt.so
= -Wl
,--filter=$(objpfx
)tst-filterobj-filtee.so
1721 $(objpfx
)tst-filterobj
: $(objpfx
)tst-filterobj-flt.so
1722 $(objpfx
)tst-filterobj-dlopen
: $(libdl
)
1723 $(objpfx
)tst-filterobj.out
: $(objpfx
)tst-filterobj-filtee.so
1724 $(objpfx
)tst-filterobj-dlopen.out
: $(objpfx
)tst-filterobj-filtee.so
1726 LDFLAGS-tst-filterobj-aux.so
= -Wl
,--auxiliary
=$(objpfx
)tst-filterobj-filtee.so
1727 $(objpfx
)tst-auxobj
: $(objpfx
)tst-filterobj-aux.so
1728 $(objpfx
)tst-auxobj-dlopen
: $(libdl
)
1729 $(objpfx
)tst-auxobj.out
: $(objpfx
)tst-filterobj-filtee.so
1730 $(objpfx
)tst-auxobj-dlopen.out
: $(objpfx
)tst-filterobj-filtee.so