]> git.ipfire.org Git - thirdparty/glibc.git/blame - elf/Makefile
2005-02-21 Alan Modra <amodra@bigpond.net.au>
[thirdparty/glibc.git] / elf / Makefile
CommitLineData
a1194e83 1# Copyright (C) 1995-2004, 2005 Free Software Foundation, Inc.
01cc0be6
RM
2# This file is part of the GNU C Library.
3
4# The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
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.
01cc0be6
RM
8
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
41bdb6e2 12# Lesser General Public License for more details.
01cc0be6 13
41bdb6e2
AJ
14# You should have received a copy of the GNU Lesser General Public
15# License along with the GNU C Library; if not, write to the Free
16# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17# 02111-1307 USA.
01cc0be6 18
3db52d94
UD
19# Makefile for elf subdirectory of GNU C Library.
20
d66e34cd
RM
21subdir := elf
22
9fbdeb41 23headers = elf.h bits/elfclass.h link.h bits/link.h
9dcafc55 24routines = $(dl-routines) dl-support dl-iteratephdr \
27d640be 25 dl-addr enbl-secure dl-profstub \
ce460d04 26 dl-origin dl-libc dl-sym dl-tsd
266180eb
RM
27
28# The core dynamic linking functions are in libc for the static and
29# profiled libraries.
f18edac3 30dl-routines = $(addprefix dl-,load cache lookup object reloc deps \
3996f34b 31 runtime error init fini debug misc \
2abf9ff1 32 version profile conflict tls origin \
9dcafc55 33 execstack caller open close trampoline)
b79f74cd 34all-dl-routines = $(dl-routines) $(sysdep-dl-routines)
266180eb 35# But they are absent from the shared libc, because that code is in ld.so.
27d640be 36elide-routines.os = $(all-dl-routines) dl-support enbl-secure dl-origin
44094580 37shared-only-routines += dl-caller
266180eb
RM
38
39# ld.so uses those routines, plus some special stuff for being the program
40# interpreter and operating independent of libc.
ce460d04 41rtld-routines := rtld $(dl-routines) dl-sysdep dl-environ dl-minimal
e39e6956 42all-rtld-routines = $(rtld-routines) $(sysdep-rtld-routines)
b79f74cd 43
ce460d04
RM
44distribute := rtld-Rules \
45 $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
b3ed8219 46 dl-cache.h dl-hash.h soinit.c sofini.c ldd.bash.in \
94e365c6
UD
47 genrtldtbl.awk atomicity.h dl-procinfo.h ldsodefs.h \
48 dl-librecon.h interp.c sln.c dl-dst.h hp-timing.h \
c77ec56d 49 do-lookup.h dl-lookupcfg.h sprof.c gen-trusted-dirs.awk \
94e365c6 50 testobj1.c testobj2.c testobj3.c testobj4.c testobj5.c \
2b7238dd 51 testobj6.c testobj1_1.c failobj.c unloadmod.c \
84ddc586 52 ldconfig.h ldconfig.c cache.c readlib.c readelflib.c \
e340a2a2 53 chroot_canon.c gccframe.h \
74955460 54 dep1.c dep2.c dep3.c dep4.c dl-dtprocnum.h unsecvars.h \
afa0569f 55 vismain.c vismod1.c vismod2.c vismod3.c \
74dd1fee
UD
56 constload2.c constload3.c filtmod1.c filtmod2.c \
57 nodlopenmod.c nodelete.c nodelmod1.c nodelmod2.c \
2b7238dd 58 nodelmod3.c nodelmod4.c nodlopen.c dl-osinfo.h \
917fd061 59 reldepmod1.c reldepmod2.c reldepmod3.c reldepmod4.c \
c4bb124a 60 reldepmod5.c reldepmod6.c \
1826d793 61 reldep4mod1.c reldep4mod2.c reldep4mod3.c reldep4mod4.c \
8bc6161d 62 nextmod1.c nextmod2.c pathoptobj.c tst-pathopt.sh \
5ab7f7c1 63 neededobj1.c neededobj2.c neededobj3.c neededobj4.c \
421f0c9d 64 neededobj5.c neededobj6.c firstobj.c \
1a511d31 65 unload2mod.c unload2dep.c ltglobmod1.c ltglobmod2.c \
3fac0001 66 testobj.h vismod.h globalmod1.c \
ab92bebd
UD
67 dblloadmod1.c dblloadmod2.c dblloadmod3.c \
68 reldep6mod4.c reldep6mod3.c reldep6mod2.c reldep6mod1.c \
a41d8a74 69 reldep6mod0.c reldep7mod1.c reldep7mod2.c \
ab92bebd 70 unwind-dw2.c unwind-dw2-fde.c unwind.h unwind-pe.h \
2cef4257 71 unwind-dw2-fde.h dwarf2.h dl-procinfo.c tls.h dl-tls.h \
4c53d221 72 tst-tlsmod1.c tst-tlsmod2.c tst-tlsmod3.c tst-tlsmod4.c \
94c24227
UD
73 tst-tlsmod5.c tst-tlsmod6.c tst-tlsmod7.c tst-tlsmod8.c \
74 tst-tlsmod9.c tst-tlsmod10.c tst-tlsmod11.c \
be184b1d 75 tst-tlsmod12.c tst-tls10.h tst-alignmod.c tst-alignmod2.c \
4c53d221
UD
76 circlemod1.c circlemod1a.c circlemod2.c circlemod2a.c \
77 circlemod3.c circlemod3a.c nodlopenmod2.c \
cfaf5e56 78 tls-macros.h \
aff4519d
UD
79 reldep8mod1.c reldep8mod2.c reldep8mod3.c \
80 nodel2mod1.c nodel2mod2.c nodel2mod3.c \
ec503662
UD
81 reldep9.c reldep9mod1.c reldep9mod2.c reldep9mod3.c \
82 tst-array1.exp tst-array2.exp tst-array4.exp \
f17ed1a9 83 tst-array2dep.c tst-piemod1.c \
bed12f78 84 tst-execstack-mod.c tst-dlmodcount.c \
1fc07491 85 check-textrel.c dl-sysdep.h test-dlopenrpathmod.c \
9dcafc55
UD
86 tst-deep1mod1.c tst-deep1mod2.c tst-deep1mod3.c \
87 tst-auditmod1.c
d66e34cd 88
80b54217 89CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
bb958f59 90CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
e07bb02a 91CFLAGS-dl-iterate-phdr.c = $(uses-callbacks)
80b54217 92
05f732b3
UD
93include ../Makeconfig
94
74bd2300 95ifeq ($(unwind-find-fde),yes)
a0dcb689 96routines += unwind-dw2-fde-glibc
44094580 97shared-only-routines += unwind-dw2-fde-glibc
74bd2300
UD
98endif
99
40c4c9b5 100before-compile = $(objpfx)trusted-dirs.h
5a384a91
UD
101generated := trusted-dirs.h trusted-dirs.st for-renamed/renamed.so
102generated-dirs := for-renamed
fd26970f 103
bdd421cc 104ifeq ($(versioning),yes)
a0edd63e 105ld-map = $(common-objpfx)ld.map
bdd421cc
UD
106endif
107
d66e34cd 108ifeq (yes,$(build-shared))
b79f74cd 109extra-objs = $(all-rtld-routines:%=%.os) soinit.os sofini.os interp.os
40c4c9b5 110generated += librtld.os dl-allobjs.os ld.so ldd
8d57beea 111install-others = $(inst_slibdir)/$(rtld-installed-name)
6c3ebebd 112install-bin-script = ldd
f49bc43f 113endif
86d2c878 114
9d141cae 115others = sprof sln
6c3ebebd 116install-bin = sprof
9d141cae
UD
117others-static = sln
118install-rootsbin = sln
ae828bc6 119
591e1ffb 120ifeq (yes,$(use-ldconfig))
99ac5e47 121ifeq (yes,$(build-shared))
e1586792 122others-static += ldconfig
da2d1bc5 123others += ldconfig
9d141cae 124install-rootsbin += ldconfig
591e1ffb 125
b4a555d6 126ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
591e1ffb
UD
127extra-objs += $(ldconfig-modules:=.o)
128
129# To find xmalloc.c and xstrdup.c
130vpath %.c ../locale/programs
131
99ac5e47 132endif
1ef32c3d
UD
133endif
134
a334319f 135tests = tst-tls1 tst-tls2 tst-tls9
dfe4c900 136ifeq (yes,$(have-initfini-array))
a334319f 137tests += tst-array1 tst-array2 tst-array3 tst-array4
dfe4c900 138endif
db265313 139ifeq (yes,$(build-static))
a334319f 140tests-static = tst-tls1-static tst-tls2-static
ec1af1d8
UD
141ifeq (yesyesyes,$(build-static)$(build-shared)$(elf))
142tests-static += tst-tls9-static
143tst-tls9-static-ENV = \
144 LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
145endif
43c59a70 146ifeq (yes,$(have-initfini-array))
e13e33e2 147tests-static += tst-array1-static
6ef518c3 148endif
db265313
RM
149tests += $(tests-static)
150endif
2f512715 151ifeq (yes,$(build-shared))
db265313
RM
152tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
153 constload1 order $(tests-vis-$(have-protected)) noload filter unload \
154 reldep reldep2 reldep3 reldep4 $(tests-nodelete-$(have-z-nodelete)) \
155 $(tests-nodlopen-$(have-z-nodlopen)) neededtest neededtest2 \
156 neededtest3 neededtest4 unload2 lateglobal initfirst global \
cfaf5e56 157 restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \
94c24227 158 circleload1 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 \
a334319f 159 tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-align \
be184b1d 160 tst-align2 $(tests-execstack-$(have-z-execstack)) tst-dlmodcount \
9dcafc55
UD
161 tst-dlopenrpath tst-deep1 tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
162 tst-audit1
aff4519d 163# reldep9
5a384a91 164test-srcs = tst-pathopt
c1025c19 165tests-vis-yes = vismain
aff4519d 166tests-nodelete-yes = nodelete nodelete2
87837aac 167tests-nodlopen-yes = nodlopen nodlopen2
c70ba488 168tests-execstack-yes = tst-execstack tst-execstack-needed tst-execstack-prog
2f512715 169endif
f17ed1a9 170ifeq (yesyes,$(have-fpie)$(build-shared))
b9c736f0 171tests: $(objpfx)tst-pie1.out
f17ed1a9 172endif
a25f2023 173modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
2b7238dd 174 testobj1_1 failobj constload2 constload3 unloadmod \
0fb7851f 175 dep1 dep2 dep3 dep4 $(modules-vis-$(have-protected)) \
2f54c82d 176 $(modules-nodelete-$(have-z-nodelete)) \
2b7238dd 177 $(modules-nodlopen-$(have-z-nodlopen)) filtmod1 filtmod2 \
ceb579a3 178 reldepmod1 reldepmod2 reldepmod3 reldepmod4 nextmod1 nextmod2 \
1826d793 179 reldep4mod1 reldep4mod2 reldep4mod3 reldep4mod4 \
8edd9172 180 neededobj1 neededobj2 neededobj3 neededobj4 \
273a3cfb 181 neededobj5 neededobj6 firstobj globalmod1 \
3fac0001 182 unload2mod unload2dep ltglobmod1 ltglobmod2 pathoptobj \
c47e78b1 183 dblloadmod1 dblloadmod2 dblloadmod3 reldepmod5 reldepmod6 \
2e36cb48 184 reldep6mod0 reldep6mod1 reldep6mod2 reldep6mod3 reldep6mod4 \
a41d8a74 185 reldep7mod1 reldep7mod2 \
6d78cd00 186 tst-tlsmod1 tst-tlsmod2 tst-tlsmod3 tst-tlsmod4 \
94c24227
UD
187 tst-tlsmod5 tst-tlsmod6 tst-tlsmod7 tst-tlsmod8 \
188 tst-tlsmod9 tst-tlsmod10 tst-tlsmod11 tst-tlsmod12 \
99fe3b0e 189 tst-tlsmod13 tst-tlsmod13a tst-tlsmod14a tst-tlsmod14b \
6d78cd00 190 circlemod1 circlemod1a circlemod2 circlemod2a \
cfaf5e56 191 circlemod3 circlemod3a \
aff4519d 192 reldep8mod1 reldep8mod2 reldep8mod3 \
06f6ca90 193 reldep9mod1 reldep9mod2 reldep9mod3 \
be184b1d
UD
194 tst-alignmod tst-alignmod2 \
195 $(modules-execstack-$(have-z-execstack)) \
c0f62c56 196 tst-dlopenrpathmod tst-deep1mod1 tst-deep1mod2 tst-deep1mod3 \
9dcafc55 197 tst-dlmopen1mod tst-auditmod1
dfe4c900 198ifeq (yes,$(have-initfini-array))
a334319f 199modules-names += tst-array2dep
dfe4c900 200endif
f17ed1a9
UD
201ifeq (yesyes,$(have-fpie)$(build-shared))
202modules-names += tst-piemod1
203endif
c1025c19 204modules-vis-yes = vismod1 vismod2 vismod3
aff4519d
UD
205modules-nodelete-yes = nodelmod1 nodelmod2 nodelmod3 nodelmod4 \
206 nodel2mod1 nodel2mod2 nodel2mod3
87837aac 207modules-nodlopen-yes = nodlopenmod nodlopenmod2
2abf9ff1 208modules-execstack-yes = tst-execstack-mod
a334319f 209extra-objs += $(addsuffix .os,$(strip $(modules-names)))
724d8c3f
RM
210# We need this variable to be sure the test modules get the right CPPFLAGS.
211test-extras += $(modules-names)
dc18d4d8 212
01cc0be6 213include ../Rules
d66e34cd 214
fd54683c
RM
215check-abi: check-abi-ld
216update-abi: update-abi-ld
217
1ef32c3d 218ifeq (yes,$(build-shared))
a89d30d4
RM
219# Make sure these things are built in the `make lib' pass so they can be used
220# to run programs during the `make others' pass.
221lib-noranlib: $(objpfx)$(rtld-installed-name) \
222 $(addprefix $(objpfx),$(extra-objs))
223endif
224
db2286f6 225# Command to link into a larger single relocatable object.
ce460d04 226reloc-link = $(LINK.o) -nostdlib -nostartfiles -r
db2286f6 227
b79f74cd 228$(objpfx)dl-allobjs.os: $(all-rtld-routines:%=$(objpfx)%.os)
ce460d04 229 $(reloc-link) -o $@ $^
db2286f6 230
86d2c878 231# Link together the dynamic linker into a single relocatable object.
ce460d04
RM
232# First we do a link against libc_pic.a just to get a link map,
233# and discard the object produced by that link. From the link map
234# we can glean all the libc modules that need to go into the dynamic
235# linker. Then we do a recursive make that goes into all the subdirs
236# those modules come from and builds special rtld-foo.os versions that
237# are compiled with special flags, and puts these modules into rtld-libc.a
238# for us. Then we do the real link using rtld-libc.a instead of libc_pic.a.
239
240$(objpfx)librtld.map: $(objpfx)dl-allobjs.os $(common-objpfx)libc_pic.a
240e87c2
RM
241 @-rm -f $@T
242 $(reloc-link) -o $@.o '-Wl,-(' $^ -lgcc '-Wl,-)' -Wl,-Map,$@T
ce460d04 243 rm -f $@.o
240e87c2 244 mv -f $@T $@
ce460d04
RM
245
246$(objpfx)librtld.mk: $(objpfx)librtld.map Makefile
b61c8aba 247 LC_ALL=C \
6461e577
RM
248 sed -n 's@^$(common-objpfx)\([^(]*\)(\([^)]*\.os\)) *.*$$@\1 \2@p' \
249 $< | \
ce460d04
RM
250 while read lib file; do \
251 case $$lib in \
252 libc_pic.a) \
b61c8aba 253 LC_ALL=C fgrep -l /$$file \
ce460d04 254 $(common-objpfx)stamp.os $(common-objpfx)*/stamp.os | \
b61c8aba 255 LC_ALL=C \
ce460d04
RM
256 sed 's@^$(common-objpfx)\([^/]*\)/stamp\.os$$@rtld-\1'" +=$$file@"\
257 ;; \
258 */*.a) \
259 echo rtld-$${lib%%/*} += $$file ;; \
260 *) echo "Wasn't expecting $$lib($$file)" >&2; exit 1 ;; \
261 esac; \
262 done > $@T
b61c8aba
UD
263 echo rtld-subdirs = `LC_ALL=C sed 's/^rtld-\([^ ]*\).*$$/\1/' $@T \
264 | LC_ALL=C sort -u` >> $@T
ce460d04
RM
265 mv -f $@T $@
266
267$(objpfx)rtld-libc.a: $(objpfx)librtld.mk FORCE
268 $(MAKE) -f $< -f rtld-Rules
269
ce460d04 270$(objpfx)librtld.os: $(objpfx)dl-allobjs.os $(objpfx)rtld-libc.a
5896ffa8
UD
271 $(LINK.o) -nostdlib -nostartfiles -r -o $@ '-Wl,-(' $^ -lgcc '-Wl,-)' \
272 -Wl,-Map,$@.map
273
274generated += librtld.map librtld.mk rtld-libc.a librtld.os.map
d66e34cd 275
4df8c11d
UD
276z-now-yes = -Wl,-z,now
277
32e6df36 278$(objpfx)ld.so: $(objpfx)librtld.os $(ld-map)
070cadeb 279 @rm -f $@.lds
4df8c11d 280 $(LINK.o) -nostdlib -nostartfiles -shared $(z-now-$(bind-now)) \
9ae10332 281 $(LDFLAGS-rtld) -Wl,-z,defs -Wl,--verbose 2>&1 | \
b61c8aba 282 LC_ALL=C \
32e6df36
UD
283 sed -e '/^=========/,/^=========/!d;/^=========/d' \
284 -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
070cadeb 285 > $@.lds
9ae10332 286 $(LINK.o) -nostdlib -nostartfiles -shared -o $@ \
4df8c11d 287 $(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now)) \
32e6df36 288 $(filter-out $(map-file),$^) $(load-map-file) \
070cadeb 289 -Wl,-soname=$(rtld-installed-name) -T $@.lds
32e6df36 290 rm -f $@.lds
266180eb 291
c7562c74 292# interp.c exists just to get this string into the libraries.
b30542fb
UD
293CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"' \
294 -DNOT_IN_libc=1
656f8223 295$(objpfx)interp.os: $(common-objpfx)config.make
c7562c74 296
1ef32c3d 297ifneq (ld.so,$(rtld-installed-name))
afd4eb37 298# Make sure ld.so.1 exists in the build directory so we can link
852fc4b9
RM
299# against it.
300$(objpfx)$(rtld-installed-name): $(objpfx)ld.so
301 rm -f $@
f332db02 302 ln -s $(<F) $@
da2d1bc5 303generated += $(rtld-installed-name)
852fc4b9
RM
304endif
305
fd26970f
UD
306# Build a file mentioning all trustworthy directories to look for shared
307# libraries when using LD_LIBRARY_PATH in a setuid program. The user can
308# add directories to the list by defining $(user-defined-trusted-dirs)
309# before starting make.
6598ac30
UD
310$(objpfx)trusted-dirs.h: $(objpfx)trusted-dirs.st; @:
311$(objpfx)trusted-dirs.st: Makefile $(..)Makeconfig
1ef32c3d 312 $(make-target-directory)
ab7eb292
UD
313 echo "$(subst :, ,$(default-rpath) $(user-defined-trusted-dirs))" \
314 | $(AWK) -f gen-trusted-dirs.awk > ${@:st=T};
ce460d04 315 echo '#define DL_DST_LIB "$(notdir $(slibdir))"' >> ${@:st=T}
6598ac30
UD
316 $(move-if-change) ${@:st=T} ${@:st=h}
317 touch $@
a986484f 318CPPFLAGS-dl-load.c = -I$(objpfx). -I$(csu-objpfx).
86d2c878 319
9f2a9248 320ifeq (yes,$(build-shared))
73237de3 321$(inst_slibdir)/$(rtld-version-installed-name): $(objpfx)ld.so $(+force)
460adbb8 322 $(make-target-directory)
925e31d9 323 $(do-install-program)
1ef32c3d 324
8d57beea 325$(inst_slibdir)/$(rtld-installed-name): \
460adbb8
UD
326 $(inst_slibdir)/$(rtld-version-installed-name) \
327 $(inst_slibdir)/libc-$(version).so
925e31d9 328 $(make-shlib-link)
b122c703 329
5148d49f
UD
330# Special target called by parent to install just the dynamic linker.
331.PHONY: ldso_install
332ldso_install: $(inst_slibdir)/$(rtld-installed-name)
9f2a9248 333endif
5148d49f 334
cb343854 335
926e512f
RM
336common-ldd-rewrite = -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
337 -e 's%@VERSION@%$(version)%g'
1ddf537f 338sh-ldd-rewrite = $(common-ldd-rewrite) -e 's%@BASH@%/bin/sh%g;s/\$$"/"/g'
926e512f 339bash-ldd-rewrite = $(common-ldd-rewrite) -e 's%@BASH@%$(BASH)%g' \
4a33c2f5 340 -e 's%@TEXTDOMAINDIR@%$(msgcatdir)%g'
cb343854 341
84384f5b 342ifneq ($(have-bash2),yes)
cb343854 343ldd-shell = sh
e2102c14
UD
344else
345ldd-shell = bash
cb343854
UD
346endif
347
348ifeq ($(ldd-rewrite-script),no)
349define gen-ldd
b61c8aba 350LC_ALL=C sed $($(ldd-shell)-ldd-rewrite) < $< > $@.new
cb343854 351endef
84384f5b 352else
cb343854 353define gen-ldd
b61c8aba 354LC_ALL=C sed $($(ldd-shell)-ldd-rewrite) < $< | LC_ALL=C sed -f $(ldd-rewrite-script) > $@.new
cb343854
UD
355endef
356endif
357
926e512f 358$(objpfx)ldd: ldd.bash.in $(common-objpfx)soversions.mk \
ee74a442 359 $(common-objpfx)config.make
cb343854 360 $(gen-ldd)
84384f5b
UD
361 chmod 555 $@.new
362 mv -f $@.new $@
cb343854 363
aaff4ba9 364$(objpfx)sprof: $(libdl)
94e365c6 365
591e1ffb 366$(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
8ca91b36 367SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
1a379ea0 368CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
11bf8ce1 369 -D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1
8ca91b36
UD
370CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
371CFLAGS-cache.c = $(SYSCONF-FLAGS)
591e1ffb 372
ce460d04 373CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),-DNOT_IN_libc=1 -DIS_IN_rtld=1)
0d01dace 374
9b014809
UD
375test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
376generated += $(addsuffix .so,$(strip $(modules-names)))
482eec0d 377
e1e3ba54 378ifeq (yes,$(build-shared))
8c0fe290 379ifeq ($(cross-compiling),no)
5a384a91 380tests: $(objpfx)tst-pathopt.out
e1e3ba54 381endif
8c0fe290 382endif
5a384a91 383
aaff4ba9
UD
384$(objpfx)testobj1.so: $(libdl)
385$(objpfx)testobj1_1.so: $(objpfx)testobj1.so $(libdl)
386$(objpfx)testobj2.so: $(objpfx)testobj1.so $(libdl)
387$(objpfx)testobj3.so: $(libdl)
388$(objpfx)testobj4.so: $(libdl)
389$(objpfx)testobj5.so: $(libdl)
e30f2b98 390$(objpfx)testobj6.so: $(objpfx)testobj1.so $(objpfx)testobj2.so $(libdl)
e18db2b0 391$(objpfx)failobj.so: $(objpfx)testobj6.so
84ddc586
UD
392$(objpfx)dep1.so: $(objpfx)dep2.so $(objpfx)dep4.so
393$(objpfx)dep2.so: $(objpfx)dep3.so $(objpfx)dep4.so
394$(objpfx)dep4.so: $(objpfx)dep3.so
2cb8cefb 395$(objpfx)nodelmod3.so: $(objpfx)nodelmod4.so
917fd061 396$(objpfx)nextmod1.so: $(libdl)
ceb579a3
UD
397$(objpfx)neededobj1.so: $(libdl)
398$(objpfx)neededobj2.so: $(objpfx)neededobj1.so $(libdl)
399$(objpfx)neededobj3.so: $(objpfx)neededobj1.so $(objpfx)neededobj2.so $(libdl)
8edd9172
UD
400$(objpfx)neededobj4.so: $(objpfx)neededobj1.so $(objpfx)neededobj2.so \
401 $(objpfx)neededobj3.so $(libdl)
c77a4478 402$(objpfx)neededobj6.so: $(objpfx)neededobj5.so
f6de2239 403$(objpfx)unload2mod.so: $(objpfx)unload2dep.so
d785c366 404$(objpfx)ltglobmod2.so: $(libdl)
b71e7ce8 405$(objpfx)firstobj.so: $(shared-thread-library)
273a3cfb 406$(objpfx)globalmod1.so: $(libdl)
1826d793
UD
407$(objpfx)reldep4mod1.so: $(objpfx)reldep4mod3.so
408$(objpfx)reldep4mod2.so: $(objpfx)reldep4mod4.so
3fac0001
UD
409$(objpfx)dblloadmod1.so: $(objpfx)dblloadmod3.so
410$(objpfx)dblloadmod2.so: $(objpfx)dblloadmod3.so
c4bb124a
UD
411$(objpfx)reldepmod5.so: $(objpfx)reldepmod2.so
412$(objpfx)reldepmod6.so: $(objpfx)reldepmod2.so
c47e78b1
UD
413$(objpfx)reldep6mod1.so: $(objpfx)reldep6mod0.so
414$(objpfx)reldep6mod2.so: $(objpfx)reldep6mod1.so
415$(objpfx)reldep6mod3.so: $(objpfx)reldep6mod2.so
416$(objpfx)reldep6mod4.so: $(objpfx)reldep6mod1.so
fc093be1 417$(objpfx)tst-tlsmod3.so: $(objpfx)tst-tlsmod2.so
94c24227
UD
418$(objpfx)tst-tlsmod8.so: $(objpfx)tst-tlsmod7.so
419$(objpfx)tst-tlsmod10.so: $(objpfx)tst-tlsmod9.so
420$(objpfx)tst-tlsmod12.so: $(objpfx)tst-tlsmod11.so
541765b6 421$(objpfx)tst-tlsmod13a.so: $(objpfx)tst-tlsmod13.so
aff4519d
UD
422# For tst-tls9-static, make sure the modules it dlopens have libc.so in DT_NEEDED
423$(objpfx)tst-tlsmod5.so: $(common-objpfx)libc.so
424$(objpfx)tst-tlsmod6.so: $(common-objpfx)libc.so
556224ab 425$(objpfx)reldep8mod3.so: $(objpfx)reldep8mod1.so $(objpfx)reldep8mod2.so
aff4519d
UD
426$(objpfx)nodel2mod3.so: $(objpfx)nodel2mod1.so $(objpfx)nodel2mod2.so
427$(objpfx)reldep9mod2.so: $(objpfx)reldep9mod1.so
428$(objpfx)reldep9mod3.so: $(objpfx)reldep9mod1.so $(objpfx)reldep9mod2.so
ceb579a3 429
6ef518c3
RM
430LDFLAGS-tst-tlsmod5.so = -nostdlib
431LDFLAGS-tst-tlsmod6.so = -nostdlib
432
1a379ea0
UD
433testobj1.so-no-z-defs = yes
434testobj3.so-no-z-defs = yes
435testobj4.so-no-z-defs = yes
436testobj5.so-no-z-defs = yes
437testobj6.so-no-z-defs = yes
438failobj.so-no-z-defs = yes
439constload2.so-no-z-defs = yes
440constload3.so-no-z-defs = yes
441nodelmod1.so-no-z-defs = yes
442nodelmod2.so-no-z-defs = yes
443nodelmod4.so-no-z-defs = yes
444nodel2mod2.so-no-z-defs = yes
445reldepmod2.so-no-z-defs = yes
446reldepmod3.so-no-z-defs = yes
447reldepmod4.so-no-z-defs = yes
448reldep4mod4.so-no-z-defs = yes
449reldep4mod2.so-no-z-defs = yes
450ltglobmod2.so-no-z-defs = yes
451dblloadmod3.so-no-z-defs = yes
452tst-tlsmod1.so-no-z-defs = yes
453tst-tlsmod2.so-no-z-defs = yes
454tst-tlsmod3.so-no-z-defs = yes
455tst-tlsmod4.so-no-z-defs = yes
456tst-tlsmod7.so-no-z-defs = yes
457tst-tlsmod8.so-no-z-defs = yes
458tst-tlsmod9.so-no-z-defs = yes
459tst-tlsmod10.so-no-z-defs = yes
460tst-tlsmod12.so-no-z-defs = yes
99fe3b0e
UD
461tst-tlsmod14a.so-no-z-defs = yes
462tst-tlsmod14b.so-no-z-defs = yes
1a379ea0
UD
463circlemod2.so-no-z-defs = yes
464circlemod3.so-no-z-defs = yes
465circlemod3a.so-no-z-defs = yes
466reldep8mod2.so-no-z-defs = yes
467reldep9mod1.so-no-z-defs = yes
a334319f
UD
468
469# filtmod1.so has a special rule
470$(filter-out $(objpfx)filtmod1.so, $(test-modules)): $(objpfx)%.so: $(objpfx)%.os
471 $(build-module)
482eec0d 472
5181d776
RM
473ifeq ($(build-shared),yes)
474# Build all the modules even when not actually running test programs.
475tests: $(test-modules)
476endif
477
aaff4ba9 478$(objpfx)loadtest: $(libdl)
482eec0d
UD
479LDFLAGS-loadtest = -rdynamic
480
481$(objpfx)loadtest.out: $(test-modules)
6bd06384 482
ceb579a3 483$(objpfx)neededtest: $(libdl)
ceb579a3 484$(objpfx)neededtest.out: $(objpfx)neededobj1.so $(objpfx)neededobj2.so \
8edd9172 485 $(objpfx)neededobj3.so
ceb579a3 486
9807e540
UD
487$(objpfx)neededtest2: $(libdl)
488$(objpfx)neededtest2.out: $(objpfx)neededobj1.so $(objpfx)neededobj2.so \
8edd9172
UD
489 $(objpfx)neededobj3.so
490
491$(objpfx)neededtest3: $(libdl)
492$(objpfx)neededtest3.out: $(objpfx)neededobj1.so $(objpfx)neededobj2.so \
493 $(objpfx)neededobj3.so $(objpfx)neededobj4.so
9807e540 494
c77a4478
UD
495neededtest4-ENV = LC_ALL=C LANGUAGE=C
496$(objpfx)neededtest4: $(libdl) $(objpfx)neededobj1.so
497$(objpfx)neededtest4.out: $(objpfx)neededobj5.so $(objpfx)neededobj6.so
498
aaff4ba9 499$(objpfx)restest1: $(objpfx)testobj1.so $(objpfx)testobj1_1.so $(libdl)
e18db2b0 500LDFLAGS-restest1 = -rdynamic
6bd06384 501
2373b30e
UD
502$(objpfx)restest2: $(libdl)
503LDFLAGS-restest2 = -rdynamic
504
6bd06384 505$(objpfx)restest1.out: $(test-modules)
3d91edb2 506
e18db2b0 507preloadtest-preloads = testobj1 testobj2 testobj3 testobj4 testobj5
10584d2e 508$(objpfx)preloadtest: $(objpfx)testobj6.so
10584d2e 509LDFLAGS-preloadtest = -rdynamic
e18db2b0
UD
510$(objpfx)preloadtest.out: $(preloadtest-preloads:%=$(objpfx)%.so)
511preloadtest-ENV = \
512 LD_PRELOAD=$(subst $(empty) ,:,$(strip $(preloadtest-preloads:=.so)))
1e262312 513
aaff4ba9 514$(objpfx)loadfail: $(libdl)
1e262312
UD
515LDFLAGS-loadfail = -rdynamic
516
61e0617a
UD
517$(objpfx)loadfail.out: $(objpfx)failobj.so
518
519$(objpfx)multiload: $(libdl)
520LDFLAGS-multiload = -rdynamic
9df54168 521CFLAGS-multiload.c = -DOBJDIR=\"$(elf-objpfx)\"
61e0617a
UD
522
523$(objpfx)multiload.out: $(objpfx)testobj1.so
dc5efe83
UD
524
525$(objpfx)origtest: $(libdl)
394679eb 526LDFLAGS-origtest = -rdynamic
dc5efe83 527$(objpfx)origtest.out: $(objpfx)testobj1.so
ff5fad16
UD
528
529ifeq ($(have-thread-library),yes)
530$(objpfx)resolvfail: $(libdl) $(shared-thread-library)
531else
532$(objpfx)resolvfail: $(libdl)
533endif
19cf43be
UD
534
535$(objpfx)constload1: $(libdl)
536$(objpfx)constload1.out: $(objpfx)constload2.so $(objpfx)constload3.so
84ddc586 537
6d78cd00
UD
538$(objpfx)circleload1: $(libdl)
539$(objpfx)circleload1.out: $(objpfx)circlemod1.so \
540 $(objpfx)circlemod1a.so
541
542$(objpfx)circlemod1.so: $(objpfx)circlemod2.so
543$(objpfx)circlemod2.so: $(objpfx)circlemod3.so
544$(objpfx)circlemod1a.so: $(objpfx)circlemod2a.so
545$(objpfx)circlemod2a.so: $(objpfx)circlemod3a.so
546
84ddc586
UD
547$(objpfx)order: $(addprefix $(objpfx),dep4.so dep3.so dep2.so dep1.so)
548
549$(objpfx)order.out: $(objpfx)order
550 $(elf-objpfx)$(rtld-installed-name) \
551 --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
552 $(objpfx)order > $@
553 (echo "0123456789" | cmp $@ -) > /dev/null
c1025c19
UD
554
555$(objpfx)vismain: $(addprefix $(objpfx),vismod1.so vismod2.so)
556$(objpfx)vismain.out: $(addprefix $(objpfx),vismod3.so)
557vismain-ENV = LD_PRELOAD=$(addprefix $(objpfx),vismod3.so)
5e61ef88
UD
558
559$(objpfx)noload: $(objpfx)testobj1.so
560LDFLAGS-noload = -rdynamic
561$(objpfx)noload.out: $(objpfx)testobj5.so
0fb7851f 562
ad7534c8 563LDFLAGS-nodelete = -rdynamic
0fb7851f 564LDFLAGS-nodelmod1.so = -Wl,--enable-new-dtags,-z,nodelete
2cb8cefb 565LDFLAGS-nodelmod4.so = -Wl,--enable-new-dtags,-z,nodelete
0fb7851f 566$(objpfx)nodelete: $(libdl)
2cb8cefb
UD
567$(objpfx)nodelete.out: $(objpfx)nodelmod1.so $(objpfx)nodelmod2.so \
568 $(objpfx)nodelmod3.so
2f54c82d
UD
569
570LDFLAGS-nodlopenmod.so = -Wl,--enable-new-dtags,-z,nodlopen
571$(objpfx)nodlopen: $(libdl)
572$(objpfx)nodlopen.out: $(objpfx)nodlopenmod.so
fcacb36a 573
87837aac
UD
574$(objpfx)nodlopenmod2.so: $(objpfx)nodlopenmod.so
575$(objpfx)nodlopen2: $(libdl)
576$(objpfx)nodlopen2.out: $(objpfx)nodlopenmod2.so
577
137bca87
UD
578$(objpfx)filtmod1.so: $(objpfx)filtmod1.os $(objpfx)filtmod2.so
579 $(LINK.o) -shared -o $@ -B$(csu-objpfx) $(LDFLAGS.so) \
580 -L$(subst :, -L,$(rpath-link)) \
581 -Wl,-rpath-link=$(rpath-link) \
582 $< -Wl,-F,$(objpfx)filtmod2.so
fcacb36a 583$(objpfx)filter: $(objpfx)filtmod1.so
2b7238dd
UD
584
585$(objpfx)unload: $(libdl)
586$(objpfx)unload.out: $(objpfx)unloadmod.so
587
588$(objpfx)reldep: $(libdl)
589$(objpfx)reldep.out: $(objpfx)reldepmod1.so $(objpfx)reldepmod2.so
590
591$(objpfx)reldep2: $(libdl)
592$(objpfx)reldep2.out: $(objpfx)reldepmod1.so $(objpfx)reldepmod3.so
593
594$(objpfx)reldep3: $(libdl)
595$(objpfx)reldep3.out: $(objpfx)reldepmod1.so $(objpfx)reldepmod4.so
917fd061 596
1826d793
UD
597$(objpfx)reldep4: $(libdl)
598$(objpfx)reldep4.out: $(objpfx)reldep4mod1.so $(objpfx)reldep4mod2.so
599
917fd061 600$(objpfx)next: $(objpfx)nextmod1.so $(objpfx)nextmod2.so $(libdl)
f6de2239
UD
601
602$(objpfx)unload2: $(libdl)
603$(objpfx)unload2.out: $(objpfx)unload2mod.so $(objpfx)unload2dep.so
d785c366
UD
604
605$(objpfx)lateglobal: $(libdl)
606$(objpfx)lateglobal.out: $(objpfx)ltglobmod1.so $(objpfx)ltglobmod2.so
5a384a91
UD
607
608$(objpfx)tst-pathopt: $(libdl)
609$(objpfx)tst-pathopt.out: tst-pathopt.sh $(objpfx)tst-pathopt \
610 $(objpfx)pathoptobj.so
611 $(SHELL) -e $< $(common-objpfx)
b71e7ce8
UD
612
613$(objpfx)initfirst: $(libdl)
614$(objpfx)initfirst.out: $(objpfx)firstobj.so
273a3cfb
UD
615
616$(objpfx)global: $(objpfx)globalmod1.so
617$(objpfx)global.out: $(objpfx)reldepmod1.so
3fac0001
UD
618
619$(objpfx)dblload: $(libdl)
620$(objpfx)dblload.out: $(objpfx)dblloadmod1.so $(objpfx)dblloadmod2.so
621
622$(objpfx)dblunload: $(libdl)
623$(objpfx)dblunload.out: $(objpfx)dblloadmod1.so $(objpfx)dblloadmod2.so
c4bb124a
UD
624
625$(objpfx)reldep5: $(libdl)
a334319f 626$(objpfx)reldep5.out: $(objpfx)reldepmod5.so $(objpfx)reldepmod5.so
c47e78b1
UD
627
628$(objpfx)reldep6: $(libdl)
629$(objpfx)reldep6.out: $(objpfx)reldep6mod3.so $(objpfx)reldep6mod4.so
2e36cb48 630
a41d8a74
UD
631$(objpfx)reldep7: $(libdl)
632$(objpfx)reldep7.out: $(objpfx)reldep7mod1.so $(objpfx)reldep7mod2.so
633
cfaf5e56
UD
634$(objpfx)reldep8: $(libdl)
635$(objpfx)reldep8.out: $(objpfx)reldep8mod3.so
636
aff4519d
UD
637LDFLAGS-nodel2mod2.so = -Wl,--enable-new-dtags,-z,nodelete
638$(objpfx)nodelete2: $(libdl)
639$(objpfx)nodelete2.out: $(objpfx)nodel2mod3.so
640
641$(objpfx)reldep9: $(libdl)
642$(objpfx)reldep9.out: $(objpfx)reldep9mod3.so
643
2e36cb48 644$(objpfx)tst-tls3: $(objpfx)tst-tlsmod1.so
aed283dd
UD
645
646$(objpfx)tst-tls4: $(libdl)
647$(objpfx)tst-tls4.out: $(objpfx)tst-tlsmod2.so
648
649$(objpfx)tst-tls5: $(libdl)
650$(objpfx)tst-tls5.out: $(objpfx)tst-tlsmod2.so
bb4cb252
UD
651
652$(objpfx)tst-tls6: $(libdl)
653$(objpfx)tst-tls6.out: $(objpfx)tst-tlsmod2.so
fc093be1
UD
654
655$(objpfx)tst-tls7: $(libdl)
656$(objpfx)tst-tls7.out: $(objpfx)tst-tlsmod3.so
ebda6173
UD
657
658$(objpfx)tst-tls8: $(libdl)
659$(objpfx)tst-tls8.out: $(objpfx)tst-tlsmod3.so $(objpfx)tst-tlsmod4.so
6ef518c3
RM
660
661$(objpfx)tst-tls9: $(libdl)
662$(objpfx)tst-tls9.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
663
94c24227
UD
664$(objpfx)tst-tls10: $(objpfx)tst-tlsmod8.so
665
666$(objpfx)tst-tls11: $(objpfx)tst-tlsmod10.so
667
668$(objpfx)tst-tls12: $(objpfx)tst-tlsmod12.so
669
541765b6
UD
670$(objpfx)tst-tls13: $(libdl)
671$(objpfx)tst-tls13.out: $(objpfx)tst-tlsmod13a.so
672
a334319f
UD
673$(objpfx)tst-tls14: $(objpfx)tst-tlsmod14a.so $(libdl)
674$(objpfx)tst-tls14.out:$(objpfx)tst-tlsmod14b.so
99fe3b0e 675
06f6ca90 676CFLAGS-tst-align.c = $(stack-align-test-flags)
be184b1d 677CFLAGS-tst-align2.c = $(stack-align-test-flags)
06f6ca90 678CFLAGS-tst-alignmod.c = $(stack-align-test-flags)
be184b1d 679CFLAGS-tst-alignmod2.c = $(stack-align-test-flags)
06f6ca90
UD
680$(objpfx)tst-align: $(libdl)
681$(objpfx)tst-align.out: $(objpfx)tst-alignmod.so
be184b1d 682$(objpfx)tst-align2: $(objpfx)tst-alignmod2.so
06f6ca90 683
6ef518c3
RM
684ifdef libdl
685$(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a
686$(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
687endif
dfe4c900 688
2abf9ff1
RM
689ifeq ($(have-z-execstack),yes)
690$(objpfx)tst-execstack: $(libdl)
691$(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so
692LDFLAGS-tst-execstack = -Wl,-z,noexecstack
693LDFLAGS-tst-execstack-mod = -Wl,-z,execstack
694
695$(objpfx)tst-execstack-needed: $(objpfx)tst-execstack-mod.so
696LDFLAGS-tst-execstack-needed = -Wl,-z,noexecstack
c70ba488
RM
697
698LDFLAGS-tst-execstack-prog = -Wl,-z,execstack
2abf9ff1
RM
699endif
700
dfe4c900
RM
701$(objpfx)tst-array1.out: $(objpfx)tst-array1
702 $(elf-objpfx)$(rtld-installed-name) \
703 --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
704 $(objpfx)tst-array1 > $@
705 cmp $@ tst-array1.exp > /dev/null
706
43c59a70
UD
707$(objpfx)tst-array1-static.out: $(objpfx)tst-array1-static
708 $(objpfx)tst-array1-static > $@
709 cmp $@ tst-array1.exp > /dev/null
710
dfe4c900
RM
711$(objpfx)tst-array2: $(objpfx)tst-array2dep.so
712$(objpfx)tst-array2.out: $(objpfx)tst-array2
713 $(elf-objpfx)$(rtld-installed-name) \
714 --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
715 $(objpfx)tst-array2 > $@
716 cmp $@ tst-array2.exp > /dev/null
717
718$(objpfx)tst-array3.out: $(objpfx)tst-array3
719 $(elf-objpfx)$(rtld-installed-name) \
720 --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
721 $(objpfx)tst-array3 > $@
722 cmp $@ tst-array1.exp > /dev/null
efd56f53 723
62f29da7
UD
724$(objpfx)tst-array4: $(libdl)
725$(objpfx)tst-array4.out: $(objpfx)tst-array4 $(objpfx)tst-array2dep.so
726 $(elf-objpfx)$(rtld-installed-name) \
727 --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
728 $< > $@
729 cmp $@ tst-array4.exp > /dev/null
efd56f53 730
f17ed1a9
UD
731ifeq (yesyes,$(have-fpie)$(build-shared))
732CFLAGS-tst-pie1.c += -fpie
733
734$(objpfx)tst-pie1.out: $(objpfx)tst-pie1
735 $(elf-objpfx)$(rtld-installed-name) \
736 --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
737 $< > $@
738
739$(objpfx)tst-pie1: $(objpfx)tst-pie1.o $(objpfx)tst-piemod1.so
740 $(LINK.o) -pie -Wl,-O1 \
741 $(sysdep-LDFLAGS) $(config-LDFLAGS) \
742 $(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \
743 $(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
744 $(LDFLAGS) $(LDFLAGS-$(@F)) \
745 -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
746 -o $@ $(objpfx)tst-pie1.o $(objpfx)tst-piemod1.so \
747 $(common-objpfx)libc_nonshared.a
217fc747
UD
748
749generated += tst-pie1 tst-pie1.out tst-pie1.o
f17ed1a9
UD
750endif
751
e5ffa64a 752check-textrel-CFLAGS = -O -Wall -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
efd56f53
UD
753$(objpfx)check-textrel: check-textrel.c
754 $(native-compile)
755
756ifeq (yes,$(build-shared))
757tests: $(objpfx)check-textrel.out
758
759$(objpfx)check-textrel.out: $(objpfx)check-textrel
760 $(dir $<)$(notdir $<) $(common-objpfx)libc.so \
b4c98dc4
UD
761 $(sort $(wildcard $(common-objpfx)*/lib*.so \
762 $(common-objpfx)iconvdata/*.so)) > $@
efd56f53 763generated += check-textrel check-textrel.out
bed12f78
UD
764
765$(objpfx)tst-dlmodcount: $(libdl)
766$(objpfx)tst-dlmodcount.out: $(test-modules)
767
efd56f53 768endif
28977c2c
UD
769
770$(objpfx)tst-dlopenrpathmod.so: $(libdl)
771$(objpfx)tst-dlopenrpath: $(objpfx)tst-dlopenrpathmod.so $(libdl)
772CFLAGS-tst-dlopenrpath.c += -DPFX=\"$(objpfx)\"
773LDFLAGS-tst-dlopenrpathmod.so += -Wl,-rpath,\$$ORIGIN/test-subdir
774$(objpfx)tst-dlopenrpath.out: $(objpfx)firstobj.so
1fc07491
UD
775
776$(objpfx)tst-deep1mod2.so: $(objpfx)tst-deep1mod3.so
777$(objpfx)tst-deep1: $(libdl) $(objpfx)tst-deep1mod1.so
778$(objpfx)tst-deep1.out: $(objpfx)tst-deep1mod2.so
779LDFLAGS-tst-deep1 += -rdynamic
780tst-deep1mod3.so-no-z-defs = yes
c0f62c56
UD
781
782$(objpfx)tst-dlmopen1mod.so: $(libdl)
783$(objpfx)tst-dlmopen1: $(libdl)
784$(objpfx)tst-dlmopen1.out: $(objpfx)tst-dlmopen1mod.so
785
786$(objpfx)tst-dlmopen2: $(libdl)
787$(objpfx)tst-dlmopen2.out: $(objpfx)tst-dlmopen1mod.so
b1f68750
UD
788
789$(objpfx)tst-dlmopen3: $(libdl)
790$(objpfx)tst-dlmopen3.out: $(objpfx)tst-dlmopen1mod.so
9dcafc55
UD
791
792$(objpfx)tst-audit1.out: $(objpfx)tst-auditmod1.so
793tst-audit1-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so