]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Prepare for restoration of .interp section in libpthread.so
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 5 Jun 2015 22:20:13 +0000 (22:20 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 10 Jun 2015 10:14:45 +0000 (10:14 +0000)
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 <runtime-linker.h> instead of
<elf/runtime-linker.h>.

ChangeLog
Makeconfig
Makerules
elf/Makefile
elf/interp.c

index 5f745e72b42c774a3efda9adfc26ba957ea8324c..ca22729f747d3529158fe87ad6a79896c0cf4486 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2015-06-10  Dmitry V. Levin  <ldv@altlinux.org>
+
+       * 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 <runtime-linker.h> instead of
+       <elf/runtime-linker.h>.
+
 2015-06-09  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
        * sysdeps/unix/sysv/linux/i386/gettimeofday.c
index d32a0fdc6540894650874b1d872110506e563f01..0f4b5497c1bdc823cece944c01d6d5f3bb399d41 100644 (file)
@@ -596,7 +596,6 @@ endif
 # Variants of the two previous definitions for statically linking programs.
 +prectorT = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginT.o`
 +postctorT = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtend.o`
-+interp = $(addprefix $(elf-objpfx),interp.os)
 csu-objpfx = $(common-objpfx)csu/
 elf-objpfx = $(common-objpfx)elf/
 
index c79915f07b47d9703d055d2ed49c5ee63e321056..ad9d74f66021a378096ec4962e3aa53118f50be5 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -123,6 +123,16 @@ $(common-objpfx)libc-abis.stamp: $(..)scripts/gen-libc-abis \
 common-generated += $(common-objpfx)libc-abis.h
 endif # avoid-generated
 
+ifeq (yes,$(build-shared))
+$(common-objpfx)runtime-linker.h: $(common-objpfx)runtime-linker.stamp; @:
+$(common-objpfx)runtime-linker.stamp: $(common-objpfx)config.make
+       $(make-target-directory)
+       echo '#define RUNTIME_LINKER "$(rtlddir)/$(rtld-installed-name)"' \
+               > ${@:stamp=T}
+       $(move-if-change) ${@:stamp=T} ${@:stamp=h}
+       touch $@
+endif
+
 # Make sure the subdirectory for object files gets created.
 ifdef objpfx
 ifeq (,$(wildcard $(objpfx).))
index f2a115a8c96d1a94346ed0c74207d13f4b3414a8..871cb4fd65b1611ed4833182c8525916e6da5f67 100644 (file)
@@ -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
index 5d4246a439705c3b6b41ee0cc96f5cea055e6378..422ea95e9d9cd5570403afdb45863a1751dbb82d 100644 (file)
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <elf/runtime-linker.h>
+#include <runtime-linker.h>
 
 const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp")))
   = RUNTIME_LINKER;