]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - elf/Makefile
nptl: Move stack list variables into _rtld_global
[thirdparty/glibc.git] / elf / Makefile
index c587e9f06edaaa5b0b75da96fca831be83d5ff21..2015383eb2207c60edffbe2c6d84b38fb0119ca2 100644 (file)
@@ -29,12 +29,13 @@ routines    = $(all-dl-routines) dl-support dl-iteratephdr \
 
 # The core dynamic linking functions are in libc for the static and
 # profiled libraries.
-dl-routines    = $(addprefix dl-,load lookup object reloc deps hwcaps \
+dl-routines    = $(addprefix dl-,load lookup object reloc deps \
                                  runtime init fini debug misc \
                                  version profile tls origin scope \
                                  execstack open close trampoline \
                                  exception sort-maps lookup-direct \
-                                 call-libc-early-init)
+                                 call-libc-early-init write \
+                                 thread_gscope_wait)
 ifeq (yes,$(use-ldconfig))
 dl-routines += dl-cache
 endif
@@ -54,12 +55,13 @@ endif
 all-dl-routines = $(dl-routines) $(sysdep-dl-routines)
 # But they are absent from the shared libc, because that code is in ld.so.
 elide-routines.os = $(all-dl-routines) dl-support enbl-secure dl-origin \
-                   dl-sysdep dl-exception dl-reloc-static-pie
+                   dl-sysdep dl-exception dl-reloc-static-pie \
+                   thread_gscope_wait
 
 # ld.so uses those routines, plus some special stuff for being the program
 # interpreter and operating independent of libc.
 rtld-routines  = rtld $(all-dl-routines) dl-sysdep dl-environ dl-minimal \
-  dl-error-minimal dl-conflict
+  dl-error-minimal dl-conflict dl-hwcaps dl-usage
 all-rtld-routines = $(rtld-routines) $(sysdep-rtld-routines)
 
 CFLAGS-dl-runtime.c += -fexceptions -fasynchronous-unwind-tables
@@ -618,6 +620,12 @@ ldso_install: $(inst_rtlddir)/$(rtld-installed-name)
 endif
 
 
+# Workarounds for ${exec_prefix} expansion in configure variables.
+# config.status cannot be used directly for processing ldd.bash.in or
+# expanding variables such as sysconfdir because the expansion
+# contains the literal string ${exec_prefix}, which is not valid in C
+# headers or installed shell scripts.
+
 ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \
              -e 's%@VERSION@%$(version)%g' \
              -e 's|@PKGVERSION@|$(PKGVERSION)|g' \
@@ -655,6 +663,8 @@ libof-ldconfig = ldconfig
 CFLAGS-dl-cache.c += $(SYSCONF-FLAGS)
 CFLAGS-cache.c += $(SYSCONF-FLAGS)
 CFLAGS-rtld.c += $(SYSCONF-FLAGS)
+CFLAGS-dl-usage.c += $(SYSCONF-FLAGS) \
+  -D'RTLD="$(rtlddir)/$(rtld-installed-name)"'
 
 cpp-srcs-left := $(all-rtld-routines:=.os)
 lib := rtld
@@ -947,7 +957,7 @@ $(objpfx)tst-pathopt: $(libdl)
 $(objpfx)tst-pathopt.out: tst-pathopt.sh $(objpfx)tst-pathopt \
                          $(objpfx)pathoptobj.so
        $(SHELL) $< $(common-objpfx) '$(test-wrapper-env)' \
-                '$(run-program-env)' > $@; \
+                '$(run-program-env)'; \
        $(evaluate-test)
 
 $(objpfx)tst-rtld-load-self.out: tst-rtld-load-self.sh $(objpfx)ld.so