about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/elf/Makefile b/elf/Makefile
index 1244e239b6..8d4a3daf8a 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -157,11 +157,18 @@ CPPFLAGS-dl-load.c = -I$(objpfx).
 
 ifeq (yes,$(build-shared))
 $(inst_slibdir)/$(rtld-version-installed-name): $(objpfx)ld.so $(+force)
-	$(do-install-program)
+	$(make-target-directory)
+	$(INSTALL_PROGRAM) $< $@.new
 
 $(inst_slibdir)/$(rtld-installed-name): \
-  $(inst_slibdir)/$(rtld-version-installed-name)
-	$(make-shlib-link)
+  $(inst_slibdir)/$(rtld-version-installed-name) \
+  $(inst_slibdir)/libc-$(version).so
+	rm -f $@ $<
+	$(symbolic-link-prog) $<.new $@
+	ln $<.new $<
+	rm -f $@
+	$(symbolic-link-prog) $(<F) $@
+	rm -f $<.new
 
 # Special target called by parent to install just the dynamic linker.
 .PHONY: ldso_install