|
Packit |
6c4009 |
# Copyright (C) 1995-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
# This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
# modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
# License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
# version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
# Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
# License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
# <http://www.gnu.org/licenses/>.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Makefile for elf subdirectory of GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
subdir := elf
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
include ../Makeconfig
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
headers = elf.h bits/elfclass.h link.h bits/link.h
|
|
Packit |
6c4009 |
routines = $(all-dl-routines) dl-support dl-iteratephdr \
|
|
Packit |
6c4009 |
dl-addr dl-addr-obj enbl-secure dl-profstub \
|
|
Packit |
6c4009 |
dl-origin dl-libc dl-sym dl-sysdep dl-error \
|
|
Packit |
6c4009 |
dl-reloc-static-pie
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The core dynamic linking functions are in libc for the static and
|
|
Packit |
6c4009 |
# profiled libraries.
|
|
Packit |
6c4009 |
dl-routines = $(addprefix dl-,load lookup object reloc deps hwcaps \
|
|
Packit |
6c4009 |
runtime init fini debug misc \
|
|
Packit |
6c4009 |
version profile tls origin scope \
|
|
Packit |
6c4009 |
execstack open close trampoline \
|
|
Packit |
6c4009 |
exception sort-maps)
|
|
Packit |
6c4009 |
ifeq (yes,$(use-ldconfig))
|
|
Packit |
6c4009 |
dl-routines += dl-cache
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifneq (no,$(have-tunables))
|
|
Packit |
6c4009 |
dl-routines += dl-tunables
|
|
Packit |
6c4009 |
tunables-type = $(addprefix TUNABLES_FRONTEND_,$(have-tunables))
|
|
Packit |
6c4009 |
CPPFLAGS-dl-tunables.c += -DTUNABLES_FRONTEND=$(tunables-type)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Make sure that the compiler does not insert any library calls in tunables
|
|
Packit |
6c4009 |
# code paths.
|
|
Packit |
6c4009 |
ifeq (yes,$(have-loop-to-function))
|
|
Packit |
6c4009 |
CFLAGS-dl-tunables.c += -fno-tree-loop-distribute-patterns
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
all-dl-routines = $(dl-routines) $(sysdep-dl-routines)
|
|
Packit |
6c4009 |
# But they are absent from the shared libc, because that code is in ld.so.
|
|
Packit |
6c4009 |
elide-routines.os = $(all-dl-routines) dl-support enbl-secure dl-origin \
|
|
Packit |
6c4009 |
dl-sysdep dl-exception dl-reloc-static-pie
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# ld.so uses those routines, plus some special stuff for being the program
|
|
Packit |
6c4009 |
# interpreter and operating independent of libc.
|
|
Packit |
6c4009 |
rtld-routines = rtld $(all-dl-routines) dl-sysdep dl-environ dl-minimal \
|
|
Packit |
6c4009 |
dl-error-minimal dl-conflict
|
|
Packit |
6c4009 |
all-rtld-routines = $(rtld-routines) $(sysdep-rtld-routines)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
CFLAGS-dl-runtime.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-dl-lookup.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit |
6c4009 |
CFLAGS-dl-iterate-phdr.c += $(uses-callbacks)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Compile rtld itself without stack protection.
|
|
Packit |
6c4009 |
# Also compile all routines in the static library that are elided from
|
|
Packit |
6c4009 |
# the shared libc because they are in libc.a in the same way.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
define elide-stack-protector
|
|
Packit |
6c4009 |
$(if $(filter $(@F),$(patsubst %,%$(1),$(2))), $(no-stack-protector))
|
|
Packit |
6c4009 |
endef
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
CFLAGS-.o += $(call elide-stack-protector,.o,$(elide-routines.os))
|
|
Packit |
6c4009 |
CFLAGS-.op += $(call elide-stack-protector,.op,$(elide-routines.os))
|
|
Packit |
6c4009 |
CFLAGS-.os += $(call elide-stack-protector,.os,$(all-rtld-routines))
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(unwind-find-fde),yes)
|
|
Packit |
6c4009 |
routines += unwind-dw2-fde-glibc
|
|
Packit |
6c4009 |
shared-only-routines += unwind-dw2-fde-glibc
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
before-compile += $(objpfx)trusted-dirs.h
|
|
Packit |
6c4009 |
generated += trusted-dirs.h trusted-dirs.st for-renamed/renamed.so
|
|
Packit |
6c4009 |
generated-dirs += for-renamed
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(build-shared),yes)
|
|
Packit |
6c4009 |
ld-map = $(common-objpfx)ld.map
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (yes,$(build-shared))
|
|
Packit |
6c4009 |
extra-objs = $(all-rtld-routines:%=%.os) soinit.os sofini.os interp.os
|
|
Packit |
6c4009 |
generated += librtld.os dl-allobjs.os ld.so ldd
|
|
Packit |
6c4009 |
install-others = $(inst_rtlddir)/$(rtld-installed-name)
|
|
Packit |
6c4009 |
install-bin-script = ldd
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
others = sprof sln
|
|
Packit |
6c4009 |
install-bin = sprof
|
|
Packit |
6c4009 |
others-static = sln
|
|
Packit |
6c4009 |
install-rootsbin = sln
|
|
Packit |
6c4009 |
sln-modules := static-stubs
|
|
Packit |
6c4009 |
extra-objs += $(sln-modules:=.o)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (yes,$(use-ldconfig))
|
|
Packit |
6c4009 |
ifeq (yes,$(build-shared))
|
|
Packit |
6c4009 |
others-static += ldconfig
|
|
Packit |
6c4009 |
others += ldconfig
|
|
Packit |
6c4009 |
install-rootsbin += ldconfig
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon static-stubs
|
|
Packit |
6c4009 |
extra-objs += $(ldconfig-modules:=.o)
|
|
Packit |
6c4009 |
others-extras = $(ldconfig-modules)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# To find xmalloc.c and xstrdup.c
|
|
Packit |
6c4009 |
vpath %.c ../locale/programs
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(build-shared),yes)
|
|
Packit |
6c4009 |
extra-objs += sotruss-lib.os sotruss-lib.so
|
|
Packit |
6c4009 |
install-others += $(inst_auditdir)/sotruss-lib.so
|
|
Packit |
6c4009 |
install-bin-script += sotruss
|
|
Packit |
6c4009 |
generated += sotruss
|
|
Packit |
6c4009 |
libof-sotruss-lib = extramodules
|
|
Packit Service |
607966 |
LDFLAGS-sotruss-lib.so += $(z-now-$(bind-now))
|
|
Packit |
6c4009 |
$(objpfx)sotruss-lib.so: $(objpfx)sotruss-lib.os
|
|
Packit |
6c4009 |
$(build-module-asneeded)
|
|
Packit |
6c4009 |
$(objpfx)sotruss-lib.so: $(common-objpfx)libc.so $(objpfx)ld.so \
|
|
Packit |
6c4009 |
$(common-objpfx)libc_nonshared.a
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)sotruss: sotruss.sh $(common-objpfx)config.make
|
|
Packit |
6c4009 |
sed -e 's%@BASH@%$(BASH)%g' \
|
|
Packit |
6c4009 |
-e 's%@VERSION@%$(version)%g' \
|
|
Packit |
6c4009 |
-e 's%@TEXTDOMAINDIR@%$(localedir)%g' \
|
|
Packit |
6c4009 |
-e 's%@PREFIX@%$(prefix)%g' \
|
|
Packit |
6c4009 |
-e 's|@PKGVERSION@|$(PKGVERSION)|g' \
|
|
Packit |
6c4009 |
-e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \
|
|
Packit |
6c4009 |
< $< > $@.new
|
|
Packit |
6c4009 |
chmod 555 $@.new
|
|
Packit |
6c4009 |
mv -f $@.new $@
|
|
Packit |
6c4009 |
$(inst_auditdir)/sotruss-lib.so: $(objpfx)sotruss-lib.so $(+force)
|
|
Packit |
6c4009 |
$(do-install-program)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tests-static-normal := tst-leaks1-static tst-array1-static tst-array5-static \
|
|
Packit |
6c4009 |
tst-dl-iter-static \
|
|
Packit |
6c4009 |
tst-tlsalign-static tst-tlsalign-extern-static \
|
|
Packit |
6c4009 |
tst-linkall-static tst-env-setuid tst-env-setuid-tunables
|
|
Packit |
6c4009 |
tests-static-internal := tst-tls1-static tst-tls2-static \
|
|
Packit |
6c4009 |
tst-ptrguard1-static tst-stackguard1-static \
|
|
Packit |
6c4009 |
tst-tls1-static-non-pie tst-libc_dlvsym-static
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
CRT-tst-tls1-static-non-pie := $(csu-objpfx)crt1.o
|
|
Packit |
6c4009 |
tst-tls1-static-non-pie-no-pie = yes
|
|
Packit |
6c4009 |
|
|
Packit Service |
63567f |
tests-container = \
|
|
Packit Service |
63567f |
tst-ldconfig-bad-aux-cache
|
|
Packit Service |
63567f |
|
|
Packit |
6c4009 |
tests := tst-tls9 tst-leaks1 \
|
|
Packit |
6c4009 |
tst-array1 tst-array2 tst-array3 tst-array4 tst-array5 \
|
|
Packit |
6c4009 |
tst-auxv
|
|
Packit |
6c4009 |
tests-internal := tst-tls1 tst-tls2 $(tests-static-internal)
|
|
Packit |
6c4009 |
tests-static := $(tests-static-normal) $(tests-static-internal)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (yes,$(build-shared))
|
|
Packit |
6c4009 |
tests-static += tst-tls9-static
|
|
Packit |
6c4009 |
tst-tls9-static-ENV = \
|
|
Packit |
6c4009 |
LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tests += restest1 preloadtest loadfail multiload origtest resolvfail \
|
|
Packit |
6c4009 |
constload1 order noload filter \
|
|
Packit |
6c4009 |
reldep reldep2 reldep3 reldep4 nodelete nodelete2 \
|
|
Packit |
6c4009 |
nodlopen nodlopen2 lateglobal initfirst global \
|
|
Packit |
6c4009 |
restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \
|
|
Packit |
6c4009 |
tst-tls4 tst-tls5 \
|
|
Packit |
6c4009 |
tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-tls15 \
|
|
Packit |
6c4009 |
tst-tls16 tst-tls17 tst-tls18 tst-tls19 tst-tls-dlinfo \
|
|
Packit |
6c4009 |
tst-align tst-align2 \
|
|
Packit |
6c4009 |
tst-dlmodcount tst-dlopenrpath tst-deep1 \
|
|
Packit |
6c4009 |
tst-dlmopen1 tst-dlmopen3 \
|
|
Packit |
6c4009 |
unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \
|
|
Packit |
6c4009 |
tst-audit1 tst-audit2 tst-audit8 tst-audit9 \
|
|
Packit |
6c4009 |
tst-addr1 tst-thrlock \
|
|
Packit |
6c4009 |
tst-unique1 tst-unique2 $(if $(CXX),tst-unique3 tst-unique4 \
|
|
Packit Service |
93dc7a |
tst-nodelete) \
|
|
Packit |
6c4009 |
tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \
|
|
Packit |
6c4009 |
tst-tlsalign tst-tlsalign-extern tst-nodelete-opened \
|
|
Packit |
6c4009 |
tst-nodelete2 tst-audit11 tst-audit12 tst-dlsym-error tst-noload \
|
|
Packit |
6c4009 |
tst-latepthread tst-tls-manydynamic tst-nodelete-dlclose \
|
|
Packit Service |
93dc7a |
tst-debug1 tst-main1 tst-absolute-sym tst-absolute-zero tst-big-note
|
|
Packit |
6c4009 |
# reldep9
|
|
Packit |
6c4009 |
tests-internal += loadtest unload unload2 circleload1 \
|
|
Packit |
6c4009 |
neededtest neededtest2 neededtest3 neededtest4 \
|
|
Packit |
6c4009 |
tst-tls3 tst-tls6 tst-tls7 tst-tls8 tst-dlmopen2 \
|
|
Packit |
6c4009 |
tst-ptrguard1 tst-stackguard1 tst-libc_dlvsym
|
|
Packit Service |
e8569b |
tests-container += tst-pldd
|
|
Packit |
6c4009 |
ifeq ($(build-hardcoded-path-in-tests),yes)
|
|
Packit |
6c4009 |
tests += tst-dlopen-aout
|
|
Packit |
6c4009 |
tst-dlopen-aout-no-pie = yes
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
test-srcs = tst-pathopt
|
|
Packit |
6c4009 |
selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
|
|
Packit |
6c4009 |
ifneq ($(selinux-enabled),1)
|
|
Packit |
6c4009 |
tests-execstack-yes = tst-execstack tst-execstack-needed tst-execstack-prog
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
tests += $(tests-execstack-$(have-z-execstack))
|
|
Packit |
6c4009 |
ifeq ($(run-built-tests),yes)
|
|
Packit |
6c4009 |
tests-special += $(objpfx)tst-leaks1-mem.out \
|
|
Packit |
6c4009 |
$(objpfx)tst-leaks1-static-mem.out $(objpfx)noload-mem.out \
|
|
Packit |
6c4009 |
$(objpfx)tst-ldconfig-X.out
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
tlsmod17a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
|
Packit |
6c4009 |
tlsmod18a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
|
Packit |
6c4009 |
tlsmod17a-modules = $(addprefix tst-tlsmod17a, $(tlsmod17a-suffixes))
|
|
Packit |
6c4009 |
tlsmod18a-modules = $(addprefix tst-tlsmod18a, $(tlsmod17a-suffixes))
|
|
Packit |
6c4009 |
one-hundred = $(foreach x,0 1 2 3 4 5 6 7 8 9, \
|
|
Packit |
6c4009 |
0$x 1$x 2$x 3$x 4$x 5$x 6$x 7$x 8$x 9$x)
|
|
Packit |
6c4009 |
tst-tls-many-dynamic-modules := \
|
|
Packit |
6c4009 |
$(foreach n,$(one-hundred),tst-tls-manydynamic$(n)mod)
|
|
Packit |
6c4009 |
extra-test-objs += $(tlsmod17a-modules:=.os) $(tlsmod18a-modules:=.os) \
|
|
Packit |
6c4009 |
tst-tlsalign-vars.o
|
|
Packit |
6c4009 |
test-extras += tst-tlsmod17a tst-tlsmod18a tst-tlsalign-vars
|
|
Packit |
6c4009 |
modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
|
|
Packit |
6c4009 |
testobj1_1 failobj constload2 constload3 unloadmod \
|
|
Packit |
6c4009 |
dep1 dep2 dep3 dep4 vismod1 vismod2 vismod3 \
|
|
Packit |
6c4009 |
nodelmod1 nodelmod2 nodelmod3 nodelmod4 \
|
|
Packit |
6c4009 |
nodel2mod1 nodel2mod2 nodel2mod3 \
|
|
Packit |
6c4009 |
nodlopenmod nodlopenmod2 filtmod1 filtmod2 \
|
|
Packit |
6c4009 |
reldepmod1 reldepmod2 reldepmod3 reldepmod4 nextmod1 nextmod2 \
|
|
Packit |
6c4009 |
reldep4mod1 reldep4mod2 reldep4mod3 reldep4mod4 \
|
|
Packit |
6c4009 |
neededobj1 neededobj2 neededobj3 neededobj4 \
|
|
Packit |
6c4009 |
neededobj5 neededobj6 firstobj globalmod1 \
|
|
Packit |
6c4009 |
unload2mod unload2dep ltglobmod1 ltglobmod2 pathoptobj \
|
|
Packit |
6c4009 |
dblloadmod1 dblloadmod2 dblloadmod3 reldepmod5 reldepmod6 \
|
|
Packit |
6c4009 |
reldep6mod0 reldep6mod1 reldep6mod2 reldep6mod3 reldep6mod4 \
|
|
Packit |
6c4009 |
reldep7mod1 reldep7mod2 \
|
|
Packit |
6c4009 |
tst-tlsmod1 tst-tlsmod2 tst-tlsmod3 tst-tlsmod4 \
|
|
Packit |
6c4009 |
tst-tlsmod5 tst-tlsmod6 tst-tlsmod7 tst-tlsmod8 \
|
|
Packit |
6c4009 |
tst-tlsmod9 tst-tlsmod10 tst-tlsmod11 tst-tlsmod12 \
|
|
Packit |
6c4009 |
tst-tlsmod13 tst-tlsmod13a tst-tlsmod14a tst-tlsmod14b \
|
|
Packit |
6c4009 |
tst-tlsmod15a tst-tlsmod15b tst-tlsmod16a tst-tlsmod16b \
|
|
Packit |
6c4009 |
$(tlsmod17a-modules) tst-tlsmod17b $(tlsmod18a-modules) \
|
|
Packit |
6c4009 |
tst-tls19mod1 tst-tls19mod2 tst-tls19mod3 \
|
|
Packit |
6c4009 |
circlemod1 circlemod1a circlemod2 circlemod2a \
|
|
Packit |
6c4009 |
circlemod3 circlemod3a \
|
|
Packit |
6c4009 |
reldep8mod1 reldep8mod2 reldep8mod3 \
|
|
Packit |
6c4009 |
reldep9mod1 reldep9mod2 reldep9mod3 \
|
|
Packit |
6c4009 |
tst-alignmod tst-alignmod2 \
|
|
Packit |
6c4009 |
$(modules-execstack-$(have-z-execstack)) \
|
|
Packit |
6c4009 |
tst-dlopenrpathmod tst-deep1mod1 tst-deep1mod2 tst-deep1mod3 \
|
|
Packit |
6c4009 |
tst-dlmopen1mod tst-auditmod1 \
|
|
Packit |
6c4009 |
unload3mod1 unload3mod2 unload3mod3 unload3mod4 \
|
|
Packit |
6c4009 |
unload4mod1 unload4mod2 unload4mod3 unload4mod4 \
|
|
Packit |
6c4009 |
unload6mod1 unload6mod2 unload6mod3 \
|
|
Packit |
6c4009 |
unload7mod1 unload7mod2 \
|
|
Packit |
6c4009 |
unload8mod1 unload8mod1x unload8mod2 unload8mod3 \
|
|
Packit |
6c4009 |
order2mod1 order2mod2 order2mod3 order2mod4 \
|
|
Packit |
6c4009 |
tst-unique1mod1 tst-unique1mod2 \
|
|
Packit |
6c4009 |
tst-unique2mod1 tst-unique2mod2 \
|
|
Packit |
6c4009 |
tst-auditmod9a tst-auditmod9b \
|
|
Packit |
6c4009 |
$(if $(CXX),tst-unique3lib tst-unique3lib2 tst-unique4lib \
|
|
Packit |
6c4009 |
tst-nodelete-uniquemod tst-nodelete-rtldmod \
|
|
Packit Service |
93dc7a |
tst-nodelete-zmod) \
|
|
Packit |
6c4009 |
tst-initordera1 tst-initorderb1 \
|
|
Packit |
6c4009 |
tst-initordera2 tst-initorderb2 \
|
|
Packit |
6c4009 |
tst-initordera3 tst-initordera4 \
|
|
Packit |
6c4009 |
tst-initorder2a tst-initorder2b tst-initorder2c \
|
|
Packit |
6c4009 |
tst-initorder2d \
|
|
Packit |
6c4009 |
tst-relsort1mod1 tst-relsort1mod2 tst-array2dep \
|
|
Packit |
6c4009 |
tst-array5dep tst-null-argv-lib \
|
|
Packit |
6c4009 |
tst-tlsalign-lib tst-nodelete-opened-lib tst-nodelete2mod \
|
|
Packit |
6c4009 |
tst-audit11mod1 tst-audit11mod2 tst-auditmod11 \
|
|
Packit |
6c4009 |
tst-audit12mod1 tst-audit12mod2 tst-audit12mod3 tst-auditmod12 \
|
|
Packit |
6c4009 |
tst-latepthreadmod $(tst-tls-many-dynamic-modules) \
|
|
Packit |
6c4009 |
tst-nodelete-dlclose-dso tst-nodelete-dlclose-plugin \
|
|
Packit |
6c4009 |
tst-main1mod tst-libc_dlvsym-dso tst-absolute-sym-lib \
|
|
Packit Service |
93dc7a |
tst-absolute-zero-lib tst-big-note-lib
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (yes,$(have-mtls-dialect-gnu2))
|
|
Packit |
6c4009 |
tests += tst-gnu2-tls1
|
|
Packit |
6c4009 |
modules-names += tst-gnu2-tls1mod
|
|
Packit |
6c4009 |
$(objpfx)tst-gnu2-tls1: $(objpfx)tst-gnu2-tls1mod.so
|
|
Packit |
6c4009 |
tst-gnu2-tls1mod.so-no-z-defs = yes
|
|
Packit |
6c4009 |
CFLAGS-tst-gnu2-tls1mod.c += -mtls-dialect=gnu2
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
ifeq (yes,$(have-protected-data))
|
|
Packit |
6c4009 |
modules-names += tst-protected1moda tst-protected1modb
|
|
Packit |
6c4009 |
tests += tst-protected1a tst-protected1b
|
|
Packit |
6c4009 |
$(objpfx)tst-protected1a: $(addprefix $(objpfx),tst-protected1moda.so tst-protected1modb.so)
|
|
Packit |
6c4009 |
$(objpfx)tst-protected1b: $(addprefix $(objpfx),tst-protected1modb.so tst-protected1moda.so)
|
|
Packit |
6c4009 |
tst-protected1modb.so-no-z-defs = yes
|
|
Packit |
6c4009 |
# These tests fail with GCC versions prior to 5.1 and with some versions
|
|
Packit |
6c4009 |
# of binutils. See https://sourceware.org/bugzilla/show_bug.cgi?id=17709
|
|
Packit |
6c4009 |
# and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 for details.
|
|
Packit |
6c4009 |
# Perhaps in future we can make these XFAILs conditional on some detection
|
|
Packit |
6c4009 |
# of compiler/linker behavior/version.
|
|
Packit |
6c4009 |
test-xfail-tst-protected1a = yes
|
|
Packit |
6c4009 |
test-xfail-tst-protected1b = yes
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
ifeq (yesyes,$(have-fpie)$(build-shared))
|
|
Packit |
6c4009 |
modules-names += tst-piemod1
|
|
Packit Service |
93dc7a |
tests += tst-pie1 tst-pie2
|
|
Packit |
6c4009 |
tests-pie += tst-pie1 tst-pie2
|
|
Packit |
6c4009 |
ifeq (yes,$(have-protected-data))
|
|
Packit |
6c4009 |
tests += vismain
|
|
Packit |
6c4009 |
tests-pie += vismain
|
|
Packit |
6c4009 |
CFLAGS-vismain.c += $(PIE-ccflag)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
modules-execstack-yes = tst-execstack-mod
|
|
Packit |
6c4009 |
extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# filtmod1.so has a special rule
|
|
Packit |
6c4009 |
modules-names-nobuild := filtmod1
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tests += $(tests-static)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifneq (no,$(multi-arch))
|
|
Packit |
6c4009 |
tests-ifuncstatic := ifuncmain1static ifuncmain1picstatic \
|
|
Packit |
6c4009 |
ifuncmain2static ifuncmain2picstatic \
|
|
Packit |
6c4009 |
ifuncmain4static ifuncmain4picstatic \
|
|
Packit |
6c4009 |
ifuncmain5static ifuncmain5picstatic \
|
|
Packit |
6c4009 |
ifuncmain7static ifuncmain7picstatic
|
|
Packit |
6c4009 |
tests-static += $(tests-ifuncstatic)
|
|
Packit |
6c4009 |
tests-internal += $(tests-ifuncstatic)
|
|
Packit |
6c4009 |
ifeq (yes,$(build-shared))
|
|
Packit |
6c4009 |
tests-internal += \
|
|
Packit |
6c4009 |
ifuncmain1 ifuncmain1pic ifuncmain1vis ifuncmain1vispic \
|
|
Packit |
6c4009 |
ifuncmain1staticpic \
|
|
Packit |
6c4009 |
ifuncmain2 ifuncmain2pic ifuncmain3 ifuncmain4 \
|
|
Packit |
6c4009 |
ifuncmain5 ifuncmain5pic ifuncmain5staticpic \
|
|
Packit |
6c4009 |
ifuncmain7 ifuncmain7pic
|
|
Packit |
6c4009 |
ifunc-test-modules = ifuncdep1 ifuncdep1pic ifuncdep2 ifuncdep2pic \
|
|
Packit |
6c4009 |
ifuncdep5 ifuncdep5pic
|
|
Packit |
6c4009 |
extra-test-objs += $(ifunc-test-modules:=.o)
|
|
Packit |
6c4009 |
test-internal-extras += $(ifunc-test-modules)
|
|
Packit |
6c4009 |
ifeq (yes,$(have-fpie))
|
|
Packit |
6c4009 |
ifunc-pie-tests = ifuncmain1pie ifuncmain1vispie ifuncmain1staticpie \
|
|
Packit |
6c4009 |
ifuncmain5pie ifuncmain6pie ifuncmain7pie
|
|
Packit |
6c4009 |
tests-internal += $(ifunc-pie-tests)
|
|
Packit |
6c4009 |
tests-pie += $(ifunc-pie-tests)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
modules-names += ifuncmod1 ifuncmod3 ifuncmod5 ifuncmod6
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (yes,$(build-shared))
|
|
Packit |
6c4009 |
ifeq ($(run-built-tests),yes)
|
|
Packit Service |
95091f |
tests-special += $(objpfx)tst-pathopt.out $(objpfx)tst-rtld-load-self.out \
|
|
Packit Service |
95091f |
$(objpfx)tst-rtld-preload.out
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
tests-special += $(objpfx)check-textrel.out $(objpfx)check-execstack.out \
|
|
Packit |
6c4009 |
$(objpfx)check-localplt.out $(objpfx)check-initfini.out
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(run-built-tests),yes)
|
|
Packit |
6c4009 |
tests-special += $(objpfx)order-cmp.out $(objpfx)tst-array1-cmp.out \
|
|
Packit |
6c4009 |
$(objpfx)tst-array1-static-cmp.out \
|
|
Packit |
6c4009 |
$(objpfx)tst-array2-cmp.out $(objpfx)tst-array3-cmp.out \
|
|
Packit |
6c4009 |
$(objpfx)tst-array4-cmp.out $(objpfx)tst-array5-cmp.out \
|
|
Packit |
6c4009 |
$(objpfx)tst-array5-static-cmp.out $(objpfx)order2-cmp.out \
|
|
Packit |
6c4009 |
$(objpfx)tst-initorder-cmp.out \
|
|
Packit |
6c4009 |
$(objpfx)tst-initorder2-cmp.out $(objpfx)tst-unused-dep.out \
|
|
Packit |
6c4009 |
$(objpfx)tst-unused-dep-cmp.out
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
check-abi: $(objpfx)check-abi-ld.out
|
|
Packit |
6c4009 |
tests-special += $(objpfx)check-abi-ld.out
|
|
Packit |
6c4009 |
update-abi: update-abi-ld
|
|
Packit |
6c4009 |
update-all-abi: update-all-abi-ld
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(have-glob-dat-reloc),yes)
|
|
Packit |
6c4009 |
tests += tst-prelink
|
|
Packit |
6c4009 |
# Don't compile tst-prelink.c with PIE for GLOB_DAT relocation.
|
|
Packit |
6c4009 |
CFLAGS-tst-prelink.c += -fno-pie
|
|
Packit |
6c4009 |
tst-prelink-no-pie = yes
|
|
Packit |
6c4009 |
ifeq ($(run-built-tests),yes)
|
|
Packit |
6c4009 |
tests-special += $(objpfx)tst-prelink-cmp.out
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The test requires shared _and_ PIE because the executable
|
|
Packit |
6c4009 |
# unit test driver must be able to link with the shared object
|
|
Packit |
6c4009 |
# that is going to eventually go into an installed DSO.
|
|
Packit |
6c4009 |
ifeq (yesyes,$(have-fpie)$(build-shared))
|
|
Packit |
6c4009 |
tests-internal += tst-_dl_addr_inside_object
|
|
Packit |
6c4009 |
tests-pie += tst-_dl_addr_inside_object
|
|
Packit |
6c4009 |
$(objpfx)tst-_dl_addr_inside_object: $(objpfx)dl-addr-obj.os
|
|
Packit |
6c4009 |
CFLAGS-tst-_dl_addr_inside_object.c += $(PIE-ccflag)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# We can only test static libcrypt use if libcrypt has been built,
|
|
Packit |
6c4009 |
# and either NSS crypto is not in use, or static NSS libraries are
|
|
Packit |
6c4009 |
# available.
|
|
Packit |
6c4009 |
ifeq ($(build-crypt),no)
|
|
Packit |
6c4009 |
CFLAGS-tst-linkall-static.c += -DUSE_CRYPT=0
|
|
Packit |
6c4009 |
else
|
|
Packit |
6c4009 |
ifeq ($(nss-crypt),no)
|
|
Packit |
6c4009 |
CFLAGS-tst-linkall-static.c += -DUSE_CRYPT=1
|
|
Packit |
6c4009 |
else
|
|
Packit |
6c4009 |
ifeq ($(static-nss-crypt),no)
|
|
Packit |
6c4009 |
CFLAGS-tst-linkall-static.c += -DUSE_CRYPT=0
|
|
Packit |
6c4009 |
else
|
|
Packit |
6c4009 |
CFLAGS-tst-linkall-static.c += -DUSE_CRYPT=1
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
include ../Rules
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (yes,$(build-shared))
|
|
Packit |
6c4009 |
# Make sure these things are built in the `make lib' pass so they can be used
|
|
Packit |
6c4009 |
# to run programs during the `make others' pass.
|
|
Packit |
6c4009 |
lib-noranlib: $(objpfx)$(rtld-installed-name) \
|
|
Packit |
6c4009 |
$(addprefix $(objpfx),$(extra-objs))
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Command to link into a larger single relocatable object.
|
|
Packit |
6c4009 |
reloc-link = $(LINK.o) -nostdlib -nostartfiles -r
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)sotruss-lib.so: $(shlib-lds)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)dl-allobjs.os: $(all-rtld-routines:%=$(objpfx)%.os)
|
|
Packit |
6c4009 |
$(reloc-link) -o $@ $^
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Link together the dynamic linker into a single relocatable object.
|
|
Packit |
6c4009 |
# First we do a link against libc_pic.a just to get a link map,
|
|
Packit |
6c4009 |
# and discard the object produced by that link. From the link map
|
|
Packit |
6c4009 |
# we can glean all the libc modules that need to go into the dynamic
|
|
Packit |
6c4009 |
# linker. Then we do a recursive make that goes into all the subdirs
|
|
Packit |
6c4009 |
# those modules come from and builds special rtld-foo.os versions that
|
|
Packit |
6c4009 |
# are compiled with special flags, and puts these modules into rtld-libc.a
|
|
Packit |
6c4009 |
# for us. Then we do the real link using rtld-libc.a instead of libc_pic.a.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# If the compiler can do SSP, build the mapfile with dummy __stack_chk_fail
|
|
Packit |
6c4009 |
# and __stack_chk_fail_local symbols defined, to prevent the real things
|
|
Packit |
6c4009 |
# being dragged into rtld even though rtld is never built with stack-
|
|
Packit |
6c4009 |
# protection.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(have-ssp),yes)
|
|
Packit |
6c4009 |
dummy-stack-chk-fail := -Wl,--defsym='__stack_chk_fail=0' \
|
|
Packit |
6c4009 |
-Wl,--defsym='__stack_chk_fail_local=0'
|
|
Packit |
6c4009 |
else
|
|
Packit |
6c4009 |
dummy-stack-chk-fail :=
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)librtld.map: $(objpfx)dl-allobjs.os $(common-objpfx)libc_pic.a
|
|
Packit |
6c4009 |
@-rm -f $@T
|
|
Packit |
6c4009 |
$(reloc-link) -o $@.o $(dummy-stack-chk-fail) \
|
|
Packit |
6c4009 |
'-Wl,-(' $^ -lgcc '-Wl,-)' -Wl,-Map,$@T
|
|
Packit |
6c4009 |
rm -f $@.o
|
|
Packit |
6c4009 |
mv -f $@T $@
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)librtld.mk: $(objpfx)librtld.map Makefile
|
|
Packit |
6c4009 |
LC_ALL=C \
|
|
Packit |
6c4009 |
sed -n 's@^$(common-objpfx)\([^(]*\)(\([^)]*\.os\)) *.*$$@\1 \2@p' \
|
|
Packit |
6c4009 |
$< | \
|
|
Packit |
6c4009 |
while read lib file; do \
|
|
Packit |
6c4009 |
case $$lib in \
|
|
Packit |
6c4009 |
libc_pic.a) \
|
|
Packit |
6c4009 |
LC_ALL=C fgrep -l /$$file \
|
|
Packit |
6c4009 |
$(common-objpfx)stamp.os $(common-objpfx)*/stamp.os | \
|
|
Packit |
6c4009 |
LC_ALL=C \
|
|
Packit |
6c4009 |
sed 's@^$(common-objpfx)\([^/]*\)/stamp\.os$$@rtld-\1'" +=$$file@"\
|
|
Packit |
6c4009 |
;; \
|
|
Packit |
6c4009 |
*/*.a) \
|
|
Packit |
6c4009 |
echo rtld-$${lib%%/*} += $$file ;; \
|
|
Packit |
6c4009 |
*) echo "Wasn't expecting $$lib($$file)" >&2; exit 1 ;; \
|
|
Packit |
6c4009 |
esac; \
|
|
Packit |
6c4009 |
done > $@T
|
|
Packit |
6c4009 |
echo rtld-subdirs = `LC_ALL=C sed 's/^rtld-\([^ ]*\).*$$/\1/' $@T \
|
|
Packit |
6c4009 |
| LC_ALL=C sort -u` >> $@T
|
|
Packit |
6c4009 |
mv -f $@T $@
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)rtld-libc.a: $(objpfx)librtld.mk FORCE
|
|
Packit |
6c4009 |
$(MAKE) -f $< -f rtld-Rules
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)librtld.os: $(objpfx)dl-allobjs.os $(objpfx)rtld-libc.a
|
|
Packit |
6c4009 |
$(LINK.o) -nostdlib -nostartfiles -r -o $@ '-Wl,-(' $^ -lgcc '-Wl,-)' \
|
|
Packit |
6c4009 |
-Wl,-Map,$@.map
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
generated += librtld.map librtld.mk rtld-libc.a librtld.os.map
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
z-now-yes = -Wl,-z,now
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)ld.so: $(objpfx)librtld.os $(ld-map)
|
|
Packit |
6c4009 |
# Link into a temporary file so that we don't touch $@ at all
|
|
Packit |
6c4009 |
# if the sanity check below fails.
|
|
Packit |
6c4009 |
$(LINK.o) -nostdlib -nostartfiles -shared -o $@.new \
|
|
Packit |
6c4009 |
$(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now)) \
|
|
Packit |
6c4009 |
$(filter-out $(map-file),$^) $(load-map-file) \
|
|
Packit |
6c4009 |
-Wl,-soname=$(rtld-installed-name) \
|
|
Packit |
6c4009 |
-Wl,-defsym=_begin=0
|
|
Packit |
6c4009 |
$(call after-link,$@.new)
|
|
Packit |
6c4009 |
$(READELF) -s $@.new \
|
|
Packit |
6c4009 |
| $(AWK) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
|
|
Packit |
6c4009 |
mv -f $@.new $@
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (yes,$(build-shared))
|
|
Packit |
6c4009 |
# interp.c exists just to get the runtime linker path into libc.so.
|
|
Packit |
6c4009 |
$(objpfx)interp.os: $(common-objpfx)runtime-linker.h
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifneq (ld.so,$(rtld-installed-name))
|
|
Packit |
6c4009 |
# Make sure ld.so.1 exists in the build directory so we can link
|
|
Packit |
6c4009 |
# against it.
|
|
Packit |
6c4009 |
$(objpfx)$(rtld-installed-name): $(objpfx)ld.so
|
|
Packit |
6c4009 |
$(make-link)
|
|
Packit |
6c4009 |
generated += $(rtld-installed-name)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Build a file mentioning all trustworthy directories to look for shared
|
|
Packit |
6c4009 |
# libraries when using LD_LIBRARY_PATH in a setuid program. The user can
|
|
Packit |
6c4009 |
# add directories to the list by defining $(user-defined-trusted-dirs)
|
|
Packit |
6c4009 |
# before starting make.
|
|
Packit |
6c4009 |
$(objpfx)trusted-dirs.h: $(objpfx)trusted-dirs.st; @:
|
|
Packit |
6c4009 |
$(objpfx)trusted-dirs.st: Makefile $(..)Makeconfig
|
|
Packit |
6c4009 |
$(make-target-directory)
|
|
Packit |
6c4009 |
echo "$(subst :, ,$(default-rpath) $(user-defined-trusted-dirs))" \
|
|
Packit |
6c4009 |
| $(AWK) -f gen-trusted-dirs.awk > ${@:st=T};
|
|
Packit |
6c4009 |
echo '#define DL_DST_LIB "$(notdir $(slibdir))"' >> ${@:st=T}
|
|
Packit |
6c4009 |
$(move-if-change) ${@:st=T} ${@:st=h}
|
|
Packit |
6c4009 |
touch $@
|
|
Packit |
6c4009 |
CPPFLAGS-dl-load.c += -I$(objpfx). -I$(csu-objpfx).
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (yes,$(build-shared))
|
|
Packit |
6c4009 |
$(inst_slibdir)/$(rtld-version-installed-name): $(objpfx)ld.so $(+force)
|
|
Packit |
6c4009 |
$(make-target-directory)
|
|
Packit |
6c4009 |
$(do-install-program)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(inst_rtlddir)/$(rtld-installed-name): \
|
|
Packit |
6c4009 |
$(inst_slibdir)/$(rtld-version-installed-name) \
|
|
Packit |
6c4009 |
$(inst_slibdir)/libc-$(version).so
|
|
Packit |
6c4009 |
$(make-target-directory)
|
|
Packit |
6c4009 |
$(make-shlib-link)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Special target called by parent to install just the dynamic linker.
|
|
Packit |
6c4009 |
.PHONY: ldso_install
|
|
Packit |
6c4009 |
ldso_install: $(inst_rtlddir)/$(rtld-installed-name)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \
|
|
Packit |
6c4009 |
-e 's%@VERSION@%$(version)%g' \
|
|
Packit |
6c4009 |
-e 's|@PKGVERSION@|$(PKGVERSION)|g' \
|
|
Packit |
6c4009 |
-e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \
|
|
Packit |
6c4009 |
-e 's%@BASH@%$(BASH)%g' \
|
|
Packit |
6c4009 |
-e 's%@TEXTDOMAINDIR@%$(localedir)%g'
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(ldd-rewrite-script),no)
|
|
Packit |
6c4009 |
define gen-ldd
|
|
Packit |
6c4009 |
LC_ALL=C sed $(ldd-rewrite) < $< > $@.new
|
|
Packit |
6c4009 |
endef
|
|
Packit |
6c4009 |
else
|
|
Packit |
6c4009 |
define gen-ldd
|
|
Packit |
6c4009 |
LC_ALL=C sed $(ldd-rewrite) < $< \
|
|
Packit |
6c4009 |
| LC_ALL=C sed -f $(patsubst $(..)/%,/%,$(..)$(ldd-rewrite-script)) > $@.new
|
|
Packit |
6c4009 |
endef
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)ldd: ldd.bash.in $(common-objpfx)soversions.mk \
|
|
Packit |
6c4009 |
$(common-objpfx)config.make
|
|
Packit |
6c4009 |
$(gen-ldd)
|
|
Packit |
6c4009 |
chmod 555 $@.new
|
|
Packit |
6c4009 |
mv -f $@.new $@
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)sprof: $(libdl)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)sln: $(sln-modules:%=$(objpfx)%.o)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
|
|
Packit |
6c4009 |
CFLAGS-ldconfig.c += $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
|
|
Packit |
6c4009 |
-D'SLIBDIR="$(slibdir)"'
|
|
Packit |
6c4009 |
libof-ldconfig = ldconfig
|
|
Packit |
6c4009 |
CFLAGS-dl-cache.c += $(SYSCONF-FLAGS)
|
|
Packit |
6c4009 |
CFLAGS-cache.c += $(SYSCONF-FLAGS)
|
|
Packit |
6c4009 |
CFLAGS-rtld.c += $(SYSCONF-FLAGS)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
cpp-srcs-left := $(all-rtld-routines:=.os)
|
|
Packit |
6c4009 |
lib := rtld
|
|
Packit |
6c4009 |
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
|
|
Packit |
6c4009 |
generated += $(addsuffix .so,$(strip $(modules-names)))
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)testobj1.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)testobj1_1.so: $(objpfx)testobj1.so $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)testobj2.so: $(objpfx)testobj1.so $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)testobj3.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)testobj4.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)testobj5.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)testobj6.so: $(objpfx)testobj1.so $(objpfx)testobj2.so $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)failobj.so: $(objpfx)testobj6.so
|
|
Packit |
6c4009 |
$(objpfx)dep1.so: $(objpfx)dep2.so $(objpfx)dep4.so
|
|
Packit |
6c4009 |
$(objpfx)dep2.so: $(objpfx)dep3.so $(objpfx)dep4.so
|
|
Packit |
6c4009 |
$(objpfx)dep4.so: $(objpfx)dep3.so
|
|
Packit |
6c4009 |
$(objpfx)nodelmod3.so: $(objpfx)nodelmod4.so
|
|
Packit |
6c4009 |
$(objpfx)nextmod1.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)neededobj1.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)neededobj2.so: $(objpfx)neededobj1.so $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)neededobj3.so: $(objpfx)neededobj1.so $(objpfx)neededobj2.so $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)neededobj4.so: $(objpfx)neededobj1.so $(objpfx)neededobj2.so \
|
|
Packit |
6c4009 |
$(objpfx)neededobj3.so $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)neededobj6.so: $(objpfx)neededobj5.so
|
|
Packit |
6c4009 |
$(objpfx)unload2mod.so: $(objpfx)unload2dep.so
|
|
Packit |
6c4009 |
$(objpfx)ltglobmod2.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)firstobj.so: $(shared-thread-library)
|
|
Packit |
6c4009 |
$(objpfx)globalmod1.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)reldep4mod1.so: $(objpfx)reldep4mod3.so
|
|
Packit |
6c4009 |
$(objpfx)reldep4mod2.so: $(objpfx)reldep4mod4.so
|
|
Packit |
6c4009 |
$(objpfx)dblloadmod1.so: $(objpfx)dblloadmod3.so
|
|
Packit |
6c4009 |
$(objpfx)dblloadmod2.so: $(objpfx)dblloadmod3.so
|
|
Packit |
6c4009 |
$(objpfx)reldepmod5.so: $(objpfx)reldepmod2.so
|
|
Packit |
6c4009 |
$(objpfx)reldepmod6.so: $(objpfx)reldepmod2.so
|
|
Packit |
6c4009 |
$(objpfx)reldep6mod1.so: $(objpfx)reldep6mod0.so
|
|
Packit |
6c4009 |
$(objpfx)reldep6mod2.so: $(objpfx)reldep6mod1.so
|
|
Packit |
6c4009 |
$(objpfx)reldep6mod3.so: $(objpfx)reldep6mod2.so
|
|
Packit |
6c4009 |
$(objpfx)reldep6mod4.so: $(objpfx)reldep6mod1.so
|
|
Packit |
6c4009 |
$(objpfx)tst-tlsmod3.so: $(objpfx)tst-tlsmod2.so
|
|
Packit |
6c4009 |
$(objpfx)tst-tlsmod8.so: $(objpfx)tst-tlsmod7.so
|
|
Packit |
6c4009 |
$(objpfx)tst-tlsmod10.so: $(objpfx)tst-tlsmod9.so
|
|
Packit |
6c4009 |
$(objpfx)tst-tlsmod12.so: $(objpfx)tst-tlsmod11.so
|
|
Packit |
6c4009 |
$(objpfx)tst-tlsmod13a.so: $(objpfx)tst-tlsmod13.so
|
|
Packit |
6c4009 |
# For tst-tls9-static, make sure the modules it dlopens have libc.so in DT_NEEDED
|
|
Packit |
6c4009 |
$(objpfx)tst-tlsmod5.so: $(common-objpfx)libc.so
|
|
Packit |
6c4009 |
$(objpfx)tst-tlsmod6.so: $(common-objpfx)libc.so
|
|
Packit |
6c4009 |
$(objpfx)tst-tls19mod1.so: $(objpfx)tst-tls19mod2.so $(objpfx)tst-tls19mod3.so
|
|
Packit |
6c4009 |
$(objpfx)tst-tls19mod3.so: $(objpfx)ld.so
|
|
Packit |
6c4009 |
$(objpfx)reldep8mod3.so: $(objpfx)reldep8mod1.so $(objpfx)reldep8mod2.so
|
|
Packit |
6c4009 |
$(objpfx)nodel2mod3.so: $(objpfx)nodel2mod1.so $(objpfx)nodel2mod2.so
|
|
Packit |
6c4009 |
$(objpfx)reldep9mod2.so: $(objpfx)reldep9mod1.so
|
|
Packit |
6c4009 |
$(objpfx)reldep9mod3.so: $(objpfx)reldep9mod1.so $(objpfx)reldep9mod2.so
|
|
Packit |
6c4009 |
$(objpfx)unload3mod1.so: $(objpfx)unload3mod3.so
|
|
Packit |
6c4009 |
$(objpfx)unload3mod2.so: $(objpfx)unload3mod3.so
|
|
Packit |
6c4009 |
$(objpfx)unload3mod3.so: $(objpfx)unload3mod4.so
|
|
Packit |
6c4009 |
$(objpfx)unload4mod1.so: $(objpfx)unload4mod2.so $(objpfx)unload4mod3.so
|
|
Packit |
6c4009 |
$(objpfx)unload4mod2.so: $(objpfx)unload4mod4.so $(objpfx)unload4mod3.so
|
|
Packit |
6c4009 |
$(objpfx)unload6mod1.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)unload6mod2.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)unload6mod3.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)unload7mod1.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)unload7mod2.so: $(objpfx)unload7mod1.so
|
|
Packit |
6c4009 |
$(objpfx)unload8mod1.so: $(objpfx)unload8mod2.so
|
|
Packit |
6c4009 |
$(objpfx)unload8mod2.so: $(objpfx)unload8mod3.so
|
|
Packit |
6c4009 |
$(objpfx)unload8mod3.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-initordera2.so: $(objpfx)tst-initordera1.so
|
|
Packit |
6c4009 |
$(objpfx)tst-initorderb2.so: $(objpfx)tst-initorderb1.so $(objpfx)tst-initordera2.so
|
|
Packit |
6c4009 |
$(objpfx)tst-initordera3.so: $(objpfx)tst-initorderb2.so $(objpfx)tst-initorderb1.so
|
|
Packit |
6c4009 |
$(objpfx)tst-initordera4.so: $(objpfx)tst-initordera3.so
|
|
Packit |
6c4009 |
$(objpfx)tst-initorder: $(objpfx)tst-initordera4.so $(objpfx)tst-initordera1.so $(objpfx)tst-initorderb2.so
|
|
Packit |
6c4009 |
$(objpfx)tst-null-argv: $(objpfx)tst-null-argv-lib.so
|
|
Packit |
6c4009 |
$(objpfx)tst-tlsalign: $(objpfx)tst-tlsalign-lib.so
|
|
Packit |
6c4009 |
$(objpfx)tst-nodelete-opened.out: $(objpfx)tst-nodelete-opened-lib.so
|
|
Packit |
6c4009 |
$(objpfx)tst-nodelete-opened: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-noload: $(libdl)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tlsalign-extern: $(objpfx)tst-tlsalign-vars.o
|
|
Packit |
6c4009 |
$(objpfx)tst-tlsalign-extern-static: $(objpfx)tst-tlsalign-vars.o
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tst-null-argv-ENV = LD_DEBUG=all LD_DEBUG_OUTPUT=$(objpfx)tst-null-argv.debug.out
|
|
Packit |
6c4009 |
LDFLAGS-nodel2mod3.so = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-reldepmod5.so = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-reldep6mod1.so = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-reldep6mod4.so = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-reldep8mod3.so = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-unload4mod1.so = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-unload4mod2.so = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-tst-initorder = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-tst-initordera2.so = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-tst-initordera3.so = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-tst-initordera4.so = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-tst-initorderb2.so = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-tst-tlsmod5.so = -nostdlib $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-tst-tlsmod6.so = -nostdlib $(no-as-needed)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
testobj1.so-no-z-defs = yes
|
|
Packit |
6c4009 |
testobj3.so-no-z-defs = yes
|
|
Packit |
6c4009 |
testobj4.so-no-z-defs = yes
|
|
Packit |
6c4009 |
testobj5.so-no-z-defs = yes
|
|
Packit |
6c4009 |
testobj6.so-no-z-defs = yes
|
|
Packit |
6c4009 |
failobj.so-no-z-defs = yes
|
|
Packit |
6c4009 |
constload2.so-no-z-defs = yes
|
|
Packit |
6c4009 |
constload3.so-no-z-defs = yes
|
|
Packit |
6c4009 |
nodelmod1.so-no-z-defs = yes
|
|
Packit |
6c4009 |
nodelmod2.so-no-z-defs = yes
|
|
Packit |
6c4009 |
nodelmod4.so-no-z-defs = yes
|
|
Packit |
6c4009 |
nodel2mod2.so-no-z-defs = yes
|
|
Packit |
6c4009 |
reldepmod2.so-no-z-defs = yes
|
|
Packit |
6c4009 |
reldepmod3.so-no-z-defs = yes
|
|
Packit |
6c4009 |
reldepmod4.so-no-z-defs = yes
|
|
Packit |
6c4009 |
reldep4mod4.so-no-z-defs = yes
|
|
Packit |
6c4009 |
reldep4mod2.so-no-z-defs = yes
|
|
Packit |
6c4009 |
ltglobmod2.so-no-z-defs = yes
|
|
Packit |
6c4009 |
dblloadmod3.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tlsmod1.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tlsmod2.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tlsmod3.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tlsmod4.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tlsmod7.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tlsmod8.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tlsmod9.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tlsmod10.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tlsmod12.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tlsmod14a.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tlsmod14b.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tlsmod15a.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-tlsmod16b.so-no-z-defs = yes
|
|
Packit |
6c4009 |
circlemod2.so-no-z-defs = yes
|
|
Packit |
6c4009 |
circlemod3.so-no-z-defs = yes
|
|
Packit |
6c4009 |
circlemod3a.so-no-z-defs = yes
|
|
Packit |
6c4009 |
reldep8mod2.so-no-z-defs = yes
|
|
Packit |
6c4009 |
reldep9mod1.so-no-z-defs = yes
|
|
Packit |
6c4009 |
unload3mod4.so-no-z-defs = yes
|
|
Packit |
6c4009 |
unload4mod1.so-no-z-defs = yes
|
|
Packit |
6c4009 |
ifuncmod1.so-no-z-defs = yes
|
|
Packit |
6c4009 |
ifuncmod5.so-no-z-defs = yes
|
|
Packit |
6c4009 |
ifuncmod6.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-auditmod9a.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-auditmod9b.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-nodelete-uniquemod.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-nodelete-rtldmod.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-nodelete-zmod.so-no-z-defs = yes
|
|
Packit |
6c4009 |
tst-nodelete2mod.so-no-z-defs = yes
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(build-shared),yes)
|
|
Packit |
6c4009 |
# Build all the modules even when not actually running test programs.
|
|
Packit |
6c4009 |
tests: $(test-modules)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)loadtest: $(libdl)
|
|
Packit |
6c4009 |
LDFLAGS-loadtest = -rdynamic
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)loadtest.out: $(test-modules)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)neededtest: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)neededtest.out: $(objpfx)neededobj1.so $(objpfx)neededobj2.so \
|
|
Packit |
6c4009 |
$(objpfx)neededobj3.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)neededtest2: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)neededtest2.out: $(objpfx)neededobj1.so $(objpfx)neededobj2.so \
|
|
Packit |
6c4009 |
$(objpfx)neededobj3.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)neededtest3: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)neededtest3.out: $(objpfx)neededobj1.so $(objpfx)neededobj2.so \
|
|
Packit |
6c4009 |
$(objpfx)neededobj3.so $(objpfx)neededobj4.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)neededtest4: $(libdl) $(objpfx)neededobj1.so
|
|
Packit |
6c4009 |
$(objpfx)neededtest4.out: $(objpfx)neededobj5.so $(objpfx)neededobj6.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)restest1: $(objpfx)testobj1.so $(objpfx)testobj1_1.so $(libdl)
|
|
Packit |
6c4009 |
LDFLAGS-restest1 = -rdynamic
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)restest2: $(libdl)
|
|
Packit |
6c4009 |
LDFLAGS-restest2 = -rdynamic
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)restest1.out: $(test-modules)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
preloadtest-preloads = testobj1 testobj2 testobj3 testobj4 testobj5
|
|
Packit |
6c4009 |
$(objpfx)preloadtest: $(objpfx)testobj6.so
|
|
Packit |
6c4009 |
LDFLAGS-preloadtest = -rdynamic
|
|
Packit |
6c4009 |
$(objpfx)preloadtest.out: $(preloadtest-preloads:%=$(objpfx)%.so)
|
|
Packit |
6c4009 |
preloadtest-ENV = \
|
|
Packit |
6c4009 |
LD_PRELOAD=$(subst $(empty) ,:,$(strip $(preloadtest-preloads:=.so)))
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)loadfail: $(libdl)
|
|
Packit |
6c4009 |
LDFLAGS-loadfail = -rdynamic
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)loadfail.out: $(objpfx)failobj.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)multiload: $(libdl)
|
|
Packit |
6c4009 |
LDFLAGS-multiload = -rdynamic
|
|
Packit |
6c4009 |
CFLAGS-multiload.c += -DOBJDIR=\"$(elf-objpfx)\"
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)multiload.out: $(objpfx)testobj1.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)origtest: $(libdl)
|
|
Packit |
6c4009 |
LDFLAGS-origtest = -rdynamic
|
|
Packit |
6c4009 |
$(objpfx)origtest.out: $(objpfx)testobj1.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(have-thread-library),yes)
|
|
Packit |
6c4009 |
$(objpfx)resolvfail: $(libdl) $(shared-thread-library)
|
|
Packit |
6c4009 |
else
|
|
Packit |
6c4009 |
$(objpfx)resolvfail: $(libdl)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)constload1: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)constload1.out: $(objpfx)constload2.so $(objpfx)constload3.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)circleload1: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)circleload1.out: $(objpfx)circlemod1.so \
|
|
Packit |
6c4009 |
$(objpfx)circlemod1a.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)circlemod1.so: $(objpfx)circlemod2.so
|
|
Packit |
6c4009 |
$(objpfx)circlemod2.so: $(objpfx)circlemod3.so
|
|
Packit |
6c4009 |
$(objpfx)circlemod1a.so: $(objpfx)circlemod2a.so
|
|
Packit |
6c4009 |
$(objpfx)circlemod2a.so: $(objpfx)circlemod3a.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)order: $(addprefix $(objpfx),dep4.so dep3.so dep2.so dep1.so)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)order-cmp.out: $(objpfx)order.out
|
|
Packit |
6c4009 |
(echo "0123456789" | cmp $< -) > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)vismain: $(addprefix $(objpfx),vismod1.so vismod2.so)
|
|
Packit |
6c4009 |
$(objpfx)vismain.out: $(addprefix $(objpfx),vismod3.so)
|
|
Packit |
6c4009 |
vismain-ENV = LD_PRELOAD=$(addprefix $(objpfx),vismod3.so)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)noload: $(objpfx)testobj1.so $(libdl)
|
|
Packit |
6c4009 |
LDFLAGS-noload = -rdynamic $(no-as-needed)
|
|
Packit |
6c4009 |
$(objpfx)noload.out: $(objpfx)testobj5.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)noload-mem.out: $(objpfx)noload.out
|
|
Packit |
6c4009 |
$(common-objpfx)malloc/mtrace $(objpfx)noload.mtrace > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
noload-ENV = MALLOC_TRACE=$(objpfx)noload.mtrace
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LDFLAGS-nodelete = -rdynamic
|
|
Packit |
6c4009 |
LDFLAGS-nodelmod1.so = -Wl,--enable-new-dtags,-z,nodelete
|
|
Packit |
6c4009 |
LDFLAGS-nodelmod4.so = -Wl,--enable-new-dtags,-z,nodelete
|
|
Packit |
6c4009 |
$(objpfx)nodelete: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)nodelete.out: $(objpfx)nodelmod1.so $(objpfx)nodelmod2.so \
|
|
Packit |
6c4009 |
$(objpfx)nodelmod3.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LDFLAGS-nodlopenmod.so = -Wl,--enable-new-dtags,-z,nodlopen
|
|
Packit |
6c4009 |
$(objpfx)nodlopen: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)nodlopen.out: $(objpfx)nodlopenmod.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)nodlopenmod2.so: $(objpfx)nodlopenmod.so
|
|
Packit |
6c4009 |
$(objpfx)nodlopen2: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)nodlopen2.out: $(objpfx)nodlopenmod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)filtmod1.so: $(objpfx)filtmod1.os $(objpfx)filtmod2.so
|
|
Packit |
6c4009 |
$(LINK.o) -shared -o $@ -B$(csu-objpfx) $(LDFLAGS.so) \
|
|
Packit |
6c4009 |
-L$(subst :, -L,$(rpath-link)) \
|
|
Packit |
6c4009 |
-Wl,-rpath-link=$(rpath-link) \
|
|
Packit |
6c4009 |
$< -Wl,-F,$(objpfx)filtmod2.so
|
|
Packit |
6c4009 |
$(objpfx)filter: $(objpfx)filtmod1.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# This does not link against libc.
|
|
Packit |
6c4009 |
CFLAGS-filtmod1.c += $(no-stack-protector)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)unload: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)unload.out: $(objpfx)unloadmod.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)reldep: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)reldep.out: $(objpfx)reldepmod1.so $(objpfx)reldepmod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)reldep2: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)reldep2.out: $(objpfx)reldepmod1.so $(objpfx)reldepmod3.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)reldep3: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)reldep3.out: $(objpfx)reldepmod1.so $(objpfx)reldepmod4.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)reldep4: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)reldep4.out: $(objpfx)reldep4mod1.so $(objpfx)reldep4mod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)next: $(objpfx)nextmod1.so $(objpfx)nextmod2.so $(libdl)
|
|
Packit |
6c4009 |
LDFLAGS-next = $(no-as-needed)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)unload2: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)unload2.out: $(objpfx)unload2mod.so $(objpfx)unload2dep.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)lateglobal: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)lateglobal.out: $(objpfx)ltglobmod1.so $(objpfx)ltglobmod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-pathopt: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-pathopt.out: tst-pathopt.sh $(objpfx)tst-pathopt \
|
|
Packit |
6c4009 |
$(objpfx)pathoptobj.so
|
|
Packit |
6c4009 |
$(SHELL) $< $(common-objpfx) '$(test-wrapper-env)' \
|
|
Packit |
6c4009 |
'$(run-program-env)' > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-rtld-load-self.out: tst-rtld-load-self.sh $(objpfx)ld.so
|
|
Packit |
6c4009 |
$(SHELL) $^ '$(test-wrapper)' '$(test-wrapper-env)' > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit Service |
95091f |
tst-rtld-preload-OBJS = $(subst $(empty) ,:,$(strip $(preloadtest-preloads:=.so)))
|
|
Packit Service |
95091f |
$(objpfx)tst-rtld-preload.out: tst-rtld-preload.sh $(objpfx)ld.so \
|
|
Packit Service |
95091f |
$(objpfx)preloadtest \
|
|
Packit Service |
95091f |
$(preloadtest-preloads:%=$(objpfx)%.so)
|
|
Packit Service |
95091f |
$(SHELL) $< $(objpfx)ld.so $(objpfx)preloadtest \
|
|
Packit Service |
95091f |
'$(test-wrapper)' '$(test-wrapper-env)' '$(run_program_env)' \
|
|
Packit Service |
95091f |
'$(rpath-link)' '$(tst-rtld-preload-OBJS)' > $@; \
|
|
Packit Service |
95091f |
$(evaluate-test)
|
|
Packit Service |
95091f |
|
|
Packit |
6c4009 |
$(objpfx)initfirst: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)initfirst.out: $(objpfx)firstobj.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)global: $(objpfx)globalmod1.so
|
|
Packit |
6c4009 |
$(objpfx)global.out: $(objpfx)reldepmod1.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)dblload: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)dblload.out: $(objpfx)dblloadmod1.so $(objpfx)dblloadmod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)dblunload: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)dblunload.out: $(objpfx)dblloadmod1.so $(objpfx)dblloadmod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)reldep5: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)reldep5.out: $(objpfx)reldepmod5.so $(objpfx)reldepmod6.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)reldep6: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)reldep6.out: $(objpfx)reldep6mod3.so $(objpfx)reldep6mod4.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)reldep7: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)reldep7.out: $(objpfx)reldep7mod1.so $(objpfx)reldep7mod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)reldep8: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)reldep8.out: $(objpfx)reldep8mod3.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LDFLAGS-nodel2mod2.so = -Wl,--enable-new-dtags,-z,nodelete
|
|
Packit |
6c4009 |
$(objpfx)nodelete2: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)nodelete2.out: $(objpfx)nodel2mod3.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)reldep9: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)reldep9.out: $(objpfx)reldep9mod3.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls3: $(objpfx)tst-tlsmod1.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls4: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls4.out: $(objpfx)tst-tlsmod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls5: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls5.out: $(objpfx)tst-tlsmod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls6: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls6.out: $(objpfx)tst-tlsmod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls7: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls7.out: $(objpfx)tst-tlsmod3.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls8: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls8.out: $(objpfx)tst-tlsmod3.so $(objpfx)tst-tlsmod4.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls9: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls9.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls10: $(objpfx)tst-tlsmod8.so $(objpfx)tst-tlsmod7.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls11: $(objpfx)tst-tlsmod10.so $(objpfx)tst-tlsmod9.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls12: $(objpfx)tst-tlsmod12.so $(objpfx)tst-tlsmod11.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls13: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls13.out: $(objpfx)tst-tlsmod13a.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls14: $(objpfx)tst-tlsmod14a.so $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls14.out: $(objpfx)tst-tlsmod14b.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls15: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls15.out: $(objpfx)tst-tlsmod15a.so $(objpfx)tst-tlsmod15b.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls-dlinfo: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls-dlinfo.out: $(objpfx)tst-tlsmod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls16: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls16.out: $(objpfx)tst-tlsmod16a.so $(objpfx)tst-tlsmod16b.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls17: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls17.out: $(objpfx)tst-tlsmod17b.so
|
|
Packit |
6c4009 |
$(patsubst %,$(objpfx)%.os,$(tlsmod17a-modules)): $(objpfx)tst-tlsmod17a%.os: tst-tlsmod17a.c
|
|
Packit |
6c4009 |
$(compile-command.c) -DN=$*
|
|
Packit |
6c4009 |
$(patsubst %,$(objpfx)%.so,$(tlsmod17a-modules)): $(objpfx)tst-tlsmod17a%.so: $(objpfx)ld.so
|
|
Packit |
6c4009 |
$(objpfx)tst-tlsmod17b.so: $(patsubst %,$(objpfx)%.so,$(tlsmod17a-modules))
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls18: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls18.out: $(patsubst %,$(objpfx)%.so,$(tlsmod18a-modules))
|
|
Packit |
6c4009 |
$(patsubst %,$(objpfx)%.os,$(tlsmod18a-modules)): $(objpfx)tst-tlsmod18a%.os : tst-tlsmod18a.c
|
|
Packit |
6c4009 |
$(compile-command.c) -DN=$*
|
|
Packit |
6c4009 |
$(patsubst %,$(objpfx)%.so,$(tlsmod18a-modules)): $(objpfx)tst-tlsmod18a%.so: $(objpfx)ld.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-tls19: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls19.out: $(objpfx)tst-tls19mod1.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
CFLAGS-tst-align.c += $(stack-align-test-flags)
|
|
Packit |
6c4009 |
CFLAGS-tst-align2.c += $(stack-align-test-flags)
|
|
Packit |
6c4009 |
CFLAGS-tst-alignmod.c += $(stack-align-test-flags)
|
|
Packit |
6c4009 |
CFLAGS-tst-alignmod2.c += $(stack-align-test-flags)
|
|
Packit |
6c4009 |
$(objpfx)tst-align: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-align.out: $(objpfx)tst-alignmod.so
|
|
Packit |
6c4009 |
$(objpfx)tst-align2: $(objpfx)tst-alignmod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)unload3: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)unload3.out: $(objpfx)unload3mod1.so $(objpfx)unload3mod2.so \
|
|
Packit |
6c4009 |
$(objpfx)unload3mod3.so $(objpfx)unload3mod4.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)unload4: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)unload4.out: $(objpfx)unload4mod1.so $(objpfx)unload4mod3.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)unload5: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)unload5.out: $(objpfx)unload3mod1.so $(objpfx)unload3mod2.so \
|
|
Packit |
6c4009 |
$(objpfx)unload3mod3.so $(objpfx)unload3mod4.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)unload6: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)unload6.out: $(objpfx)unload6mod1.so $(objpfx)unload6mod2.so \
|
|
Packit |
6c4009 |
$(objpfx)unload6mod3.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)unload7: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)unload7.out: $(objpfx)unload7mod1.so $(objpfx)unload7mod2.so
|
|
Packit |
6c4009 |
unload7-ENV = MALLOC_PERTURB_=85
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)unload8: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)unload8.out: $(objpfx)unload8mod1.so $(objpfx)unload8mod1x.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifdef libdl
|
|
Packit |
6c4009 |
$(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a
|
|
Packit |
6c4009 |
$(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(have-z-execstack),yes)
|
|
Packit |
6c4009 |
$(objpfx)tst-execstack: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so
|
|
Packit |
6c4009 |
CPPFLAGS-tst-execstack.c += -DUSE_PTHREADS=0
|
|
Packit |
6c4009 |
LDFLAGS-tst-execstack = -Wl,-z,noexecstack
|
|
Packit |
6c4009 |
LDFLAGS-tst-execstack-mod = -Wl,-z,execstack
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-execstack-needed: $(objpfx)tst-execstack-mod.so
|
|
Packit |
6c4009 |
LDFLAGS-tst-execstack-needed = -Wl,-z,noexecstack
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LDFLAGS-tst-execstack-prog = -Wl,-z,execstack
|
|
Packit |
6c4009 |
CFLAGS-tst-execstack-prog.c += -Wno-trampolines
|
|
Packit |
6c4009 |
CFLAGS-tst-execstack-mod.c += -Wno-trampolines
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LDFLAGS-tst-array2 = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-tst-array5 = $(no-as-needed)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-array1-cmp.out: tst-array1.exp $(objpfx)tst-array1.out
|
|
Packit |
6c4009 |
cmp $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-array1-static-cmp.out: tst-array1.exp \
|
|
Packit |
6c4009 |
$(objpfx)tst-array1-static.out
|
|
Packit |
6c4009 |
cmp $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-array2: $(objpfx)tst-array2dep.so
|
|
Packit |
6c4009 |
$(objpfx)tst-array2-cmp.out: tst-array2.exp $(objpfx)tst-array2.out
|
|
Packit |
6c4009 |
cmp $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-array3-cmp.out: tst-array1.exp $(objpfx)tst-array3.out
|
|
Packit |
6c4009 |
cmp $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-array4: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-array4.out: $(objpfx)tst-array2dep.so
|
|
Packit |
6c4009 |
$(objpfx)tst-array4-cmp.out: tst-array4.exp $(objpfx)tst-array4.out
|
|
Packit |
6c4009 |
cmp $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-array5: $(objpfx)tst-array5dep.so
|
|
Packit |
6c4009 |
$(objpfx)tst-array5-cmp.out: tst-array5.exp $(objpfx)tst-array5.out
|
|
Packit |
6c4009 |
cmp $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-array5-static-cmp.out: tst-array5-static.exp \
|
|
Packit |
6c4009 |
$(objpfx)tst-array5-static.out
|
|
Packit |
6c4009 |
cmp $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
CFLAGS-tst-pie1.c += $(pie-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-tst-pie2.c += $(pie-ccflag)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-piemod1.so: $(libsupport)
|
|
Packit |
6c4009 |
$(objpfx)tst-pie1: $(objpfx)tst-piemod1.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq (yes,$(build-shared))
|
|
Packit |
6c4009 |
# NB: Please keep cet-built-dso in sysdeps/x86/Makefile in sync with
|
|
Packit |
6c4009 |
# all-built-dso here.
|
|
Packit |
6c4009 |
all-built-dso := $(common-objpfx)elf/ld.so $(common-objpfx)libc.so \
|
|
Packit |
6c4009 |
$(filter-out $(common-objpfx)linkobj/libc.so, \
|
|
Packit |
6c4009 |
$(sort $(wildcard $(addprefix $(common-objpfx), \
|
|
Packit |
6c4009 |
*/lib*.so \
|
|
Packit |
6c4009 |
iconvdata/*.so))))
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(all-built-dso:=.dyn): %.dyn: %
|
|
Packit |
6c4009 |
@rm -f $@T
|
|
Packit |
6c4009 |
LC_ALL=C $(READELF) -W -d $< > $@T
|
|
Packit |
6c4009 |
test -s $@T
|
|
Packit |
6c4009 |
mv -f $@T $@
|
|
Packit |
6c4009 |
common-generated += $(all-built-dso:$(common-objpfx)%=%.dyn)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)check-textrel.out: $(..)scripts/check-textrel.awk \
|
|
Packit |
6c4009 |
$(all-built-dso:=.dyn)
|
|
Packit |
6c4009 |
LC_ALL=C $(AWK) -f $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
generated += check-textrel.out
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)execstack-default: $(first-word $(wildcard $(sysdirs:%=%/stackinfo.h)))
|
|
Packit |
6c4009 |
$(make-target-directory)
|
|
Packit |
6c4009 |
{ echo '#include <elf.h>'; \
|
|
Packit |
6c4009 |
echo '#include <stackinfo.h>'; \
|
|
Packit |
6c4009 |
echo '#if (DEFAULT_STACK_PERMS & PF_X) == 0'; \
|
|
Packit |
6c4009 |
echo '@@@execstack-no@@@'; \
|
|
Packit |
6c4009 |
echo '#else'; \
|
|
Packit |
6c4009 |
echo '@@@execstack-yes@@@'; \
|
|
Packit |
6c4009 |
echo '#endif'; } | \
|
|
Packit |
6c4009 |
$(CC) $(CFLAGS) $(CPPFLAGS) -E -x c-header - | \
|
|
Packit |
6c4009 |
sed -n -e 's/^@@@\(.*\)@@@/\1/p' > $@T
|
|
Packit |
6c4009 |
mv -f $@T $@
|
|
Packit |
6c4009 |
generated += execstack-default
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(all-built-dso:=.phdr): %.phdr: %
|
|
Packit |
6c4009 |
@rm -f $@T
|
|
Packit |
6c4009 |
LC_ALL=C $(READELF) -W -l $< > $@T
|
|
Packit |
6c4009 |
test -s $@T
|
|
Packit |
6c4009 |
mv -f $@T $@
|
|
Packit |
6c4009 |
common-generated += $(all-built-dso:$(common-objpfx)%=%.phdr)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)check-execstack.out: $(..)scripts/check-execstack.awk \
|
|
Packit |
6c4009 |
$(objpfx)execstack-default \
|
|
Packit |
6c4009 |
$(all-built-dso:=.phdr)
|
|
Packit |
6c4009 |
LC_ALL=C $(AWK) -v "xfail=$(check-execstack-xfail)" -f $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
generated += check-execstack.out
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-dlmodcount: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-dlmodcount.out: $(test-modules)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(all-built-dso:=.jmprel): %.jmprel: % Makefile
|
|
Packit |
6c4009 |
@rm -f $@T
|
|
Packit |
6c4009 |
LC_ALL=C $(READELF) -W -S -d -r $< > $@T
|
|
Packit |
6c4009 |
test -s $@T
|
|
Packit |
6c4009 |
mv -f $@T $@
|
|
Packit |
6c4009 |
common-generated += $(all-built-dso:$(common-objpfx)%=%.jmprel)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
localplt-built-dso := $(addprefix $(common-objpfx),\
|
|
Packit |
6c4009 |
libc.so \
|
|
Packit |
6c4009 |
elf/ld.so \
|
|
Packit |
6c4009 |
math/libm.so \
|
|
Packit |
6c4009 |
rt/librt.so \
|
|
Packit |
6c4009 |
dlfcn/libdl.so \
|
|
Packit |
6c4009 |
resolv/libresolv.so \
|
|
Packit |
6c4009 |
)
|
|
Packit |
6c4009 |
ifeq ($(build-mathvec),yes)
|
|
Packit |
6c4009 |
localplt-built-dso += $(addprefix $(common-objpfx), mathvec/libmvec.so)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
ifeq ($(have-thread-library),yes)
|
|
Packit |
6c4009 |
localplt-built-dso += $(filter-out %_nonshared.a, $(shared-thread-library))
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
ifeq ($(build-crypt),yes)
|
|
Packit |
6c4009 |
localplt-built-dso += $(addprefix $(common-objpfx), crypt/libcrypt.so)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
vpath localplt.data $(+sysdep_dirs)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)check-localplt.out: $(..)scripts/check-localplt.awk \
|
|
Packit |
6c4009 |
$(..)scripts/localplt.awk \
|
|
Packit |
6c4009 |
$(localplt-built-dso:=.jmprel) \
|
|
Packit |
6c4009 |
localplt.data
|
|
Packit |
6c4009 |
LC_ALL=C $(AWK) -f $(filter-out $< %localplt.data,$^) | \
|
|
Packit |
6c4009 |
LC_ALL=C $(AWK) -f $< $(filter %localplt.data,$^) - \
|
|
Packit |
6c4009 |
> $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(all-built-dso:=.dynsym): %.dynsym: %
|
|
Packit |
6c4009 |
@rm -f $@T
|
|
Packit |
6c4009 |
LC_ALL=C $(READELF) -W --dyn-syms $< > $@T
|
|
Packit |
6c4009 |
test -s $@T
|
|
Packit |
6c4009 |
mv -f $@T $@
|
|
Packit |
6c4009 |
common-generated += $(all-built-dso:$(common-objpfx)%=%.dynsym)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)check-initfini.out: $(..)scripts/check-initfini.awk \
|
|
Packit |
6c4009 |
$(all-built-dso:=.dynsym)
|
|
Packit |
6c4009 |
LC_ALL=C $(AWK) -f $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
generated += check-initfini.out
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-dlopenrpathmod.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-dlopenrpath: $(objpfx)tst-dlopenrpathmod.so $(libdl)
|
|
Packit |
6c4009 |
CFLAGS-tst-dlopenrpath.c += -DPFX=\"$(objpfx)\"
|
|
Packit |
6c4009 |
LDFLAGS-tst-dlopenrpathmod.so += -Wl,-rpath,\$$ORIGIN/test-subdir
|
|
Packit |
6c4009 |
$(objpfx)tst-dlopenrpath.out: $(objpfx)firstobj.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-deep1mod2.so: $(objpfx)tst-deep1mod3.so
|
|
Packit |
6c4009 |
$(objpfx)tst-deep1: $(libdl) $(objpfx)tst-deep1mod1.so
|
|
Packit |
6c4009 |
$(objpfx)tst-deep1.out: $(objpfx)tst-deep1mod2.so
|
|
Packit |
6c4009 |
LDFLAGS-tst-deep1 += -rdynamic
|
|
Packit |
6c4009 |
tst-deep1mod3.so-no-z-defs = yes
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-dlmopen1mod.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-dlmopen1: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-dlmopen1.out: $(objpfx)tst-dlmopen1mod.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-dlmopen2: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-dlmopen2.out: $(objpfx)tst-dlmopen1mod.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-dlmopen3: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-dlmopen3.out: $(objpfx)tst-dlmopen1mod.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-audit1.out: $(objpfx)tst-auditmod1.so
|
|
Packit |
6c4009 |
tst-audit1-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-audit2: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-audit2.out: $(objpfx)tst-auditmod1.so $(objpfx)tst-auditmod9b.so
|
|
Packit |
6c4009 |
# Prevent GCC-5 from translating a malloc/memset pair into calloc
|
|
Packit |
6c4009 |
CFLAGS-tst-audit2.c += -fno-builtin
|
|
Packit |
6c4009 |
tst-audit2-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-audit9: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-audit9.out: $(objpfx)tst-auditmod9a.so $(objpfx)tst-auditmod9b.so
|
|
Packit |
6c4009 |
tst-audit9-ENV = LD_AUDIT=$(objpfx)tst-auditmod9a.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-audit8: $(libm)
|
|
Packit |
6c4009 |
$(objpfx)tst-audit8.out: $(objpfx)tst-auditmod1.so
|
|
Packit |
6c4009 |
tst-audit8-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-global1: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-global1.out: $(objpfx)testobj6.so $(objpfx)testobj2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)order2: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)order2.out: $(objpfx)order2mod1.so $(objpfx)order2mod2.so
|
|
Packit |
6c4009 |
$(objpfx)order2-cmp.out: $(objpfx)order2.out
|
|
Packit |
6c4009 |
(echo "12345" | cmp $< -) > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
$(objpfx)order2mod1.so: $(objpfx)order2mod4.so
|
|
Packit |
6c4009 |
$(objpfx)order2mod4.so: $(objpfx)order2mod3.so
|
|
Packit |
6c4009 |
$(objpfx)order2mod2.so: $(objpfx)order2mod3.so
|
|
Packit |
6c4009 |
order2mod2.so-no-z-defs = yes
|
|
Packit |
6c4009 |
LDFLAGS-order2mod1.so = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-order2mod2.so = $(no-as-needed)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tst-stackguard1-ARGS = --command "$(host-test-program-cmd) --child"
|
|
Packit |
6c4009 |
tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tst-ptrguard1-ARGS = --command "$(host-test-program-cmd) --child"
|
|
Packit |
6c4009 |
# When built statically, the pointer guard interface uses
|
|
Packit |
6c4009 |
# __pointer_chk_guard_local.
|
|
Packit |
6c4009 |
CFLAGS-tst-ptrguard1-static.c += -DPTRGUARD_LOCAL
|
|
Packit |
6c4009 |
tst-ptrguard1-static-ARGS = --command "$(objpfx)tst-ptrguard1-static --child"
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-leaks1: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-leaks1-mem.out: $(objpfx)tst-leaks1.out
|
|
Packit |
6c4009 |
$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1.mtrace > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-leaks1-static: $(common-objpfx)dlfcn/libdl.a
|
|
Packit |
6c4009 |
$(objpfx)tst-leaks1-static-mem.out: $(objpfx)tst-leaks1-static.out
|
|
Packit |
6c4009 |
$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1-static.mtrace > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tst-leaks1-ENV = MALLOC_TRACE=$(objpfx)tst-leaks1.mtrace
|
|
Packit |
6c4009 |
tst-leaks1-static-ENV = MALLOC_TRACE=$(objpfx)tst-leaks1-static.mtrace
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-addr1: $(libdl)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-thrlock: $(libdl) $(shared-thread-library)
|
|
Packit |
6c4009 |
$(objpfx)tst-dlopen-aout: $(libdl) $(shared-thread-library)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain1pic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain1picstatic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain1staticpic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncdep1pic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain1vispic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain2pic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain2picstatic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncdep2pic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain4picstatic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain5pic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain5picstatic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain5staticpic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncdep5pic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain7pic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain7picstatic.c += $(pic-ccflag)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LDFLAGS-ifuncmain3 = -Wl,-export-dynamic
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain1pie.c += $(pie-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain1vispie.c += $(pie-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain1staticpie.c += $(pie-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain5pie.c += $(pie-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain6pie.c += $(pie-ccflag)
|
|
Packit |
6c4009 |
CFLAGS-ifuncmain7pie.c += $(pie-ccflag)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain1pie: $(objpfx)ifuncmod1.so
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain1staticpie: $(objpfx)ifuncdep1pic.o
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain1vispie: $(objpfx)ifuncmod1.so
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain5pie: $(objpfx)ifuncmod5.so
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain6pie: $(objpfx)ifuncmod6.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain1: $(addprefix $(objpfx),ifuncmod1.so)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain1pic: $(addprefix $(objpfx),ifuncmod1.so)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain1staticpic: $(addprefix $(objpfx),ifuncdep1pic.o)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain1static: $(addprefix $(objpfx),ifuncdep1.o)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain1picstatic: $(addprefix $(objpfx),ifuncdep1pic.o)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain1vis: $(addprefix $(objpfx),ifuncmod1.so)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain1vispic: $(addprefix $(objpfx),ifuncmod1.so)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain2: $(addprefix $(objpfx),ifuncdep2.o)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain2pic: $(addprefix $(objpfx),ifuncdep2pic.o)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain2static: $(addprefix $(objpfx),ifuncdep2.o)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain2picstatic: $(addprefix $(objpfx),ifuncdep2pic.o)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain3: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain3.out: $(objpfx)ifuncmod3.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain5: $(addprefix $(objpfx),ifuncmod5.so)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain5pic: $(addprefix $(objpfx),ifuncmod5.so)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain5static: $(addprefix $(objpfx),ifuncdep5.o)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain5staticpic: $(addprefix $(objpfx),ifuncdep5pic.o)
|
|
Packit |
6c4009 |
$(objpfx)ifuncmain5picstatic: $(addprefix $(objpfx),ifuncdep5pic.o)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-unique1: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-unique1.out: $(objpfx)tst-unique1mod1.so \
|
|
Packit |
6c4009 |
$(objpfx)tst-unique1mod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-unique2: $(libdl) $(objpfx)tst-unique2mod1.so
|
|
Packit |
6c4009 |
$(objpfx)tst-unique2.out: $(objpfx)tst-unique2mod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-unique3: $(libdl) $(objpfx)tst-unique3lib.so
|
|
Packit |
6c4009 |
$(objpfx)tst-unique3.out: $(objpfx)tst-unique3lib2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-unique4: $(objpfx)tst-unique4lib.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-nodelete: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-nodelete.out: $(objpfx)tst-nodelete-uniquemod.so \
|
|
Packit |
6c4009 |
$(objpfx)tst-nodelete-rtldmod.so \
|
|
Packit |
6c4009 |
$(objpfx)tst-nodelete-zmod.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LDFLAGS-tst-nodelete = -rdynamic
|
|
Packit |
6c4009 |
LDFLAGS-tst-nodelete-zmod.so = -Wl,--enable-new-dtags,-z,nodelete
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-nodelete2: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-nodelete2.out: $(objpfx)tst-nodelete2mod.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LDFLAGS-tst-nodelete2 = -rdynamic
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-initorder-cmp.out: tst-initorder.exp $(objpfx)tst-initorder.out
|
|
Packit |
6c4009 |
cmp $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-initorder2: $(objpfx)tst-initorder2a.so $(objpfx)tst-initorder2d.so $(objpfx)tst-initorder2c.so
|
|
Packit |
6c4009 |
$(objpfx)tst-initorder2a.so: $(objpfx)tst-initorder2b.so
|
|
Packit |
6c4009 |
$(objpfx)tst-initorder2b.so: $(objpfx)tst-initorder2c.so
|
|
Packit |
6c4009 |
$(objpfx)tst-initorder2c.so: $(objpfx)tst-initorder2d.so
|
|
Packit |
6c4009 |
LDFLAGS-tst-initorder2 = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-tst-initorder2a.so = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-tst-initorder2b.so = $(no-as-needed)
|
|
Packit |
6c4009 |
LDFLAGS-tst-initorder2c.so = $(no-as-needed)
|
|
Packit |
6c4009 |
define o-iterator-doit
|
|
Packit |
6c4009 |
$(objpfx)tst-initorder2$o.os: tst-initorder2.c; \
|
|
Packit |
6c4009 |
$$(compile-command.c) -DNAME=\"$o\"
|
|
Packit |
6c4009 |
endef
|
|
Packit |
6c4009 |
object-suffixes-left := a b c d
|
|
Packit |
6c4009 |
include $(o-iterator)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-initorder2-cmp.out: tst-initorder2.exp $(objpfx)tst-initorder2.out
|
|
Packit |
6c4009 |
cmp $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-relsort1: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so
|
|
Packit |
6c4009 |
$(objpfx)tst-relsort1mod2.so: $(libm)
|
|
Packit |
6c4009 |
$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
|
|
Packit |
6c4009 |
$(objpfx)tst-relsort1mod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-unused-dep.out: $(objpfx)testobj1.so
|
|
Packit |
6c4009 |
$(test-wrapper-env) \
|
|
Packit |
6c4009 |
LD_TRACE_LOADED_OBJECTS=1 \
|
|
Packit |
6c4009 |
LD_DEBUG=unused \
|
|
Packit |
6c4009 |
LD_PRELOAD= \
|
|
Packit |
6c4009 |
$(rtld-prefix) \
|
|
Packit |
6c4009 |
$< > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-unused-dep-cmp.out: $(objpfx)tst-unused-dep.out
|
|
Packit |
6c4009 |
cmp $< /dev/null > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-audit11.out: $(objpfx)tst-auditmod11.so $(objpfx)tst-audit11mod1.so
|
|
Packit |
6c4009 |
$(objpfx)tst-audit11: $(libdl)
|
|
Packit |
6c4009 |
tst-audit11-ENV = LD_AUDIT=$(objpfx)tst-auditmod11.so
|
|
Packit |
6c4009 |
$(objpfx)tst-audit11mod1.so: $(objpfx)tst-audit11mod2.so
|
|
Packit |
6c4009 |
LDFLAGS-tst-audit11mod2.so = -Wl,--version-script=tst-audit11mod2.map,-soname,tst-audit11mod2.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-audit12.out: $(objpfx)tst-auditmod12.so $(objpfx)tst-audit12mod1.so $(objpfx)tst-audit12mod3.so
|
|
Packit |
6c4009 |
$(objpfx)tst-audit12: $(libdl)
|
|
Packit |
6c4009 |
tst-audit12-ENV = LD_AUDIT=$(objpfx)tst-auditmod12.so
|
|
Packit |
6c4009 |
$(objpfx)tst-audit12mod1.so: $(objpfx)tst-audit12mod2.so
|
|
Packit |
6c4009 |
LDFLAGS-tst-audit12mod2.so = -Wl,--version-script=tst-audit12mod2.map
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Override -z defs, so that we can reference an undefined symbol.
|
|
Packit |
6c4009 |
# Force lazy binding for the same reason.
|
|
Packit |
6c4009 |
LDFLAGS-tst-latepthreadmod.so = \
|
|
Packit |
6c4009 |
-Wl,-z,lazy -Wl,--unresolved-symbols=ignore-all
|
|
Packit |
6c4009 |
# Do not optimize sibling calls as the test relies on a JMP_SLOT relocation for
|
|
Packit |
6c4009 |
# function this_function_is_not_defined.
|
|
Packit |
6c4009 |
CFLAGS-tst-latepthreadmod.c += -fno-optimize-sibling-calls
|
|
Packit |
6c4009 |
$(objpfx)tst-latepthreadmod.so: $(shared-thread-library)
|
|
Packit |
6c4009 |
$(objpfx)tst-latepthread: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-latepthread.out: $(objpfx)tst-latepthreadmod.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The test modules are parameterized by preprocessor macros.
|
|
Packit |
6c4009 |
$(patsubst %,$(objpfx)%.os,$(tst-tls-many-dynamic-modules)): \
|
|
Packit |
6c4009 |
$(objpfx)tst-tls-manydynamic%mod.os : tst-tls-manydynamicmod.c
|
|
Packit |
6c4009 |
$(compile-command.c) \
|
|
Packit |
6c4009 |
-DNAME=tls_global_$* -DSETTER=set_value_$* -DGETTER=get_value_$*
|
|
Packit |
6c4009 |
$(objpfx)tst-tls-manydynamic: $(libdl) $(shared-thread-library)
|
|
Packit |
6c4009 |
$(objpfx)tst-tls-manydynamic.out: \
|
|
Packit |
6c4009 |
$(patsubst %,$(objpfx)%.so,$(tst-tls-many-dynamic-modules))
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tst-prelink-ENV = LD_TRACE_PRELINKING=1
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-prelink-conflict.out: $(objpfx)tst-prelink.out
|
|
Packit |
6c4009 |
grep stdout $< | grep conflict | $(AWK) '{ print $$10, $$11 }' > $@
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-prelink-cmp.out: tst-prelink.exp \
|
|
Packit |
6c4009 |
$(objpfx)tst-prelink-conflict.out
|
|
Packit |
6c4009 |
cmp $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-ldconfig-X.out : tst-ldconfig-X.sh $(objpfx)ldconfig
|
|
Packit |
6c4009 |
$(SHELL) $< '$(common-objpfx)' '$(test-wrapper-env)' \
|
|
Packit |
6c4009 |
'$(run-program-env)' > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-dlsym-error: $(libdl)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Test static linking of all the libraries we can possibly link
|
|
Packit |
6c4009 |
# together. Note that in some configurations this may be less than the
|
|
Packit |
6c4009 |
# complete list of libraries we build but we try to maxmimize this list.
|
|
Packit |
6c4009 |
$(objpfx)tst-linkall-static: \
|
|
Packit |
6c4009 |
$(common-objpfx)math/libm.a \
|
|
Packit |
6c4009 |
$(common-objpfx)resolv/libresolv.a \
|
|
Packit |
6c4009 |
$(common-objpfx)dlfcn/libdl.a \
|
|
Packit |
6c4009 |
$(common-objpfx)login/libutil.a \
|
|
Packit |
6c4009 |
$(common-objpfx)rt/librt.a \
|
|
Packit |
6c4009 |
$(common-objpfx)resolv/libanl.a \
|
|
Packit |
6c4009 |
$(static-thread-library)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(build-crypt),yes)
|
|
Packit |
6c4009 |
# If we are using NSS crypto and we have the ability to link statically
|
|
Packit |
6c4009 |
# then we include libcrypt.a, otherwise we leave out libcrypt.a and
|
|
Packit |
6c4009 |
# link as much as we can into the tst-linkall-static test. This assumes
|
|
Packit |
6c4009 |
# that linking with libcrypt.a does everything required to include the
|
|
Packit |
6c4009 |
# static NSS crypto library.
|
|
Packit |
6c4009 |
ifeq (yesyes,$(nss-crypt)$(static-nss-crypt))
|
|
Packit |
6c4009 |
$(objpfx)tst-linkall-static: \
|
|
Packit |
6c4009 |
$(common-objpfx)crypt/libcrypt.a
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
# If we are not using NSS crypto then we always have the ability to link
|
|
Packit |
6c4009 |
# with libcrypt.a.
|
|
Packit |
6c4009 |
ifeq (no,$(nss-crypt))
|
|
Packit |
6c4009 |
$(objpfx)tst-linkall-static: \
|
|
Packit |
6c4009 |
$(common-objpfx)crypt/libcrypt.a
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The application depends on the DSO, and the DSO loads the plugin.
|
|
Packit |
6c4009 |
# The plugin also depends on the DSO. This creates the circular
|
|
Packit |
6c4009 |
# dependency via dlopen that we're testing to make sure works.
|
|
Packit |
6c4009 |
$(objpfx)tst-nodelete-dlclose-dso.so: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-nodelete-dlclose-plugin.so: $(objpfx)tst-nodelete-dlclose-dso.so
|
|
Packit |
6c4009 |
$(objpfx)tst-nodelete-dlclose: $(objpfx)tst-nodelete-dlclose-dso.so
|
|
Packit |
6c4009 |
$(objpfx)tst-nodelete-dlclose.out: $(objpfx)tst-nodelete-dlclose-dso.so \
|
|
Packit |
6c4009 |
$(objpfx)tst-nodelete-dlclose-plugin.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
tst-env-setuid-ENV = MALLOC_CHECK_=2 MALLOC_MMAP_THRESHOLD_=4096 \
|
|
Packit |
6c4009 |
LD_HWCAP_MASK=0x1
|
|
Packit |
6c4009 |
tst-env-setuid-tunables-ENV = \
|
|
Packit |
6c4009 |
GLIBC_TUNABLES=glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-debug1: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-debug1.out: $(objpfx)tst-debug1mod1.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-debug1mod1.so: $(objpfx)testobj1.so
|
|
Packit |
6c4009 |
$(OBJCOPY) --only-keep-debug $< $@
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-main1: $(objpfx)tst-main1mod.so
|
|
Packit |
6c4009 |
CRT-tst-main1 := $(csu-objpfx)crt1.o
|
|
Packit |
6c4009 |
tst-main1-no-pie = yes
|
|
Packit |
6c4009 |
LDLIBS-tst-main1 = $(libsupport)
|
|
Packit |
6c4009 |
tst-main1mod.so-no-z-defs = yes
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LDLIBS-tst-absolute-sym-lib.so = tst-absolute-sym-lib.lds
|
|
Packit |
6c4009 |
$(objpfx)tst-absolute-sym-lib.so: $(LDLIBS-tst-absolute-sym-lib.so)
|
|
Packit |
6c4009 |
$(objpfx)tst-absolute-sym: $(objpfx)tst-absolute-sym-lib.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LDLIBS-tst-absolute-zero-lib.so = tst-absolute-zero-lib.lds
|
|
Packit |
6c4009 |
$(objpfx)tst-absolute-zero-lib.so: $(LDLIBS-tst-absolute-zero-lib.so)
|
|
Packit |
6c4009 |
$(objpfx)tst-absolute-zero: $(objpfx)tst-absolute-zero-lib.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Both the main program and the DSO for tst-libc_dlvsym need to link
|
|
Packit |
6c4009 |
# against libdl.
|
|
Packit |
6c4009 |
$(objpfx)tst-libc_dlvsym: $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-libc_dlvsym-dso.so: $(libsupport) $(libdl)
|
|
Packit |
6c4009 |
$(objpfx)tst-libc_dlvsym.out: $(objpfx)tst-libc_dlvsym-dso.so
|
|
Packit |
6c4009 |
$(objpfx)tst-libc_dlvsym-static: $(common-objpfx)dlfcn/libdl.a
|
|
Packit |
6c4009 |
tst-libc_dlvsym-static-ENV = \
|
|
Packit |
6c4009 |
LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
|
|
Packit |
6c4009 |
$(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-big-note: $(objpfx)tst-big-note-lib.so
|