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