about summary refs log tree commit diff
path: root/elf/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'elf/Makefile')
-rw-r--r--elf/Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/elf/Makefile b/elf/Makefile
index ead48f5850..3771ffb685 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -164,9 +164,11 @@ $(inst_slibdir)/$(rtld-installed-name): \
 	$(make-shlib-link)
 
 
-sh-ldd-rewrite = -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
-		 -e 's%@VERSION@%$(version)%g'
-bash-ldd-rewrite = $(sh-ldd-rewrite) -e 's%@BASH@%$(BASH)%g' \
+common-ldd-rewrite = -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
+		     -e 's%@VERSION@%$(version)%g'
+sh-ldd-rewrite = $(common-ldd-rewrite) -e 's%@BASH@%/bin/sh%g' \
+		 -e 's/\$$"/"/g;/^\#\#\#BASH-ONLY/,/\#\#\#END-BASH-ONLY/d'
+bash-ldd-rewrite = $(common-ldd-rewrite) -e 's%@BASH@%$(BASH)%g' \
 		   -e 's%@TEXTDOMAINDIR@%$(localedir)%g'
 
 ifneq ($(have-bash2),yes)
@@ -185,7 +187,7 @@ sed $($(ldd-shell)-ldd-rewrite) < $< | sed -f $(ldd-rewrite-script) > $@.new
 endef
 endif
 
-$(objpfx)ldd: ldd.$(ldd-shell).in $(common-objpfx)soversions.mk \
+$(objpfx)ldd: ldd.bash.in $(common-objpfx)soversions.mk \
 	      $(common-objpfx)config.make
 	$(gen-ldd)
 	chmod 555 $@.new