From ac63a0783cdee8454c84fc45f37330d98b6039e7 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Fri, 5 Jun 2015 22:20:13 +0000 Subject: Prepare for restoration of .interp section in libpthread.so Make runtime-linker.h available outside $(elf-objpfx) by moving the file to $(common-objpfx) and the rules for it to Makerules. Tested for x86_64 and x86 (testsuite, and that no compiled code changed by the patch). * Makeconfig (+interp): Remove unused variable. * elf/Makefile ($(objpfx)interp.os): Define for [$(build-shared) = yes] only. Depend on $(common-objpfx)runtime-linker.h instead of $(elf-objpfx)runtime-linker.h. ($(elf-objpfx)runtime-linker.h): Rename to $(common-objpfx)runtime-linker.h and move ... * Makerules [$(build-shared) = yes]: ... here. * elf/interp.c: Include instead of . --- elf/Makefile | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'elf/Makefile') diff --git a/elf/Makefile b/elf/Makefile index f2a115a8c9..871cb4fd65 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -365,16 +365,10 @@ $(objpfx)ld.so: $(objpfx)librtld.os $(ld-map) | $(AWK) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }' mv -f $@.new $@ +ifeq (yes,$(build-shared)) # interp.c exists just to get the runtime linker path into libc.so. -$(objpfx)interp.os: $(elf-objpfx)runtime-linker.h - -$(elf-objpfx)runtime-linker.h: $(elf-objpfx)runtime-linker.st; @: -$(elf-objpfx)runtime-linker.st: $(common-objpfx)config.make - $(make-target-directory) - echo '#define RUNTIME_LINKER "$(rtlddir)/$(rtld-installed-name)"' \ - > ${@:st=T} - $(move-if-change) ${@:st=T} ${@:st=h} - touch $@ +$(objpfx)interp.os: $(common-objpfx)runtime-linker.h +endif ifneq (ld.so,$(rtld-installed-name)) # Make sure ld.so.1 exists in the build directory so we can link -- cgit 1.4.1