From patchwork Fri Jan 16 22:20:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 430018 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2D3911401EF for ; Sat, 17 Jan 2015 09:21:02 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:subject:message-id:date; q= dns; s=default; b=waiG7w8DyypwzyOuw9gYWdTzQXAiJpfTwyEO5JnCYfaBTr nLPsDthW55q/rk6U1IygXvW80lIDcVxGlS/HTumFdXhvU0gEj5yOf7YHhx04lPZc /JNSPIWGKohYv6a5xsMm31db81NUgR2ATWqFAD6XdPQ6OEKdSLHhEBZ0Q1w1Q= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:subject:message-id:date; s= default; bh=s4Ke7QpC8mAP1Dyp+as8LO2EWRY=; b=xZwxg6gMl7dK5+wz/Yk4 yBfRvCwXlVdUmqSeMLMSqSPLCEwUoVADRwMP3cu/yMcrlx8VSSTcx8EBWfdqpc2o ArWsGbucAJJ01XNs+LxIxYvmwTQ3wKBzI7nYcTRwRDUW6+APQNGzLCTG/aEfw2mw yJ56ll6NT1mm3NMLBjyfAgM= Received: (qmail 5600 invoked by alias); 16 Jan 2015 22:20:55 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 5589 invoked by uid 89); 16 Jan 2015 22:20:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: topped-with-meat.com MIME-Version: 1.0 From: Roland McGrath To: "GNU C. Library" Subject: [PATCH roland/dl-routines] Clean up sysdep-dl-routines variable. Message-Id: <20150116222047.050AF2C39DF@topped-with-meat.com> Date: Fri, 16 Jan 2015 14:20:46 -0800 (PST) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=SvUDtp+0 c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=Q6A0Vna4sg2oXNXIWDQA:9 a=CjuIK1q_8ugA:10 There is a lot of useless duplication of work done in sysdeps Makefiles because sysdep-dl-routines doesn't feed into all the places that dl-routines does. This cleans things up so that listing something in sysdep-dl-routines is enough to get it into both ld.so and libc.a (just like the main dl-routines), which makes more sense than the status quo. Tested x86_64-linux-gnu. This should not change anything material in any build, but in mine it did change the order in which things got linked into the shared objects, so they don't come out identical. The other machines affected should all be fine too unless I made a stupid typo or something. If nobody objects, I'll commit this on Tuesday. Thanks, Roland 2015-01-16 Roland McGrath * elf/Makefile (routines): Include $(all-dl-routines), not just $(dl-routines). (rtld-routines): Likewise. Use = rather than :=. * sysdeps/aarch64/Makefile [$(subdir) = elf] (sysdep_routines, sysdep-rtld-routines): Don't add tlsdesc and dl-tlsdesc to these; sysdep-dl-routines alone is enough. * sysdeps/arm/Makefile: Likewise. * sysdeps/i386/Makefile: Likewise. * sysdeps/x86_64/Makefile: Likewise. * sysdeps/hppa/Makefile [$(subdir) = elf] (sysdep_routines, sysdep-rtld-routines): Don't add $(sysdep-dl-routines) to these. * sysdeps/ia64/Makefile: Likewise. * sysdeps/unix/sysv/linux/ia64/Makefile: Likewise. * sysdeps/unix/sysv/linux/aarch64/Makefile [$(subdir) = elf] [$(build-shared) = yes] (sysdep_routines, sysdep-rtld-routines): Don't add dl-static to these; sysdep-dl-routines alone is enough. * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise. * sysdeps/unix/sysv/linux/mips/Makefile: Likewise. * sysdeps/unix/sysv/linux/powerpc/Makefile: Likewise. * sysdeps/unix/sysv/linux/tile/Makefile: Likewise. * sysdeps/powerpc/Makefile [$(subdir) = elf] (sysdep_routines, sysdep-rtld-routines): Don't add dl-machine to these; sysdep-dl-routines alone is enough. --- a/elf/Makefile +++ b/elf/Makefile @@ -22,7 +22,7 @@ subdir := elf include ../Makeconfig headers = elf.h bits/elfclass.h link.h bits/link.h -routines = $(dl-routines) dl-support dl-iteratephdr \ +routines = $(all-dl-routines) dl-support dl-iteratephdr \ dl-addr enbl-secure dl-profstub \ dl-origin dl-libc dl-sym dl-tsd dl-sysdep @@ -43,7 +43,7 @@ shared-only-routines += dl-caller # ld.so uses those routines, plus some special stuff for being the program # interpreter and operating independent of libc. -rtld-routines := rtld $(dl-routines) dl-sysdep dl-environ dl-minimal +rtld-routines = rtld $(all-dl-routines) dl-sysdep dl-environ dl-minimal all-rtld-routines = $(rtld-routines) $(sysdep-rtld-routines) CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables --- a/sysdeps/aarch64/Makefile +++ b/sysdeps/aarch64/Makefile @@ -6,8 +6,6 @@ endif ifeq ($(subdir),elf) sysdep-dl-routines += tlsdesc dl-tlsdesc -sysdep_routines += tlsdesc dl-tlsdesc -sysdep-rtld-routines += tlsdesc dl-tlsdesc gen-as-const-headers += dl-link.sym endif --- a/sysdeps/arm/Makefile +++ b/sysdeps/arm/Makefile @@ -3,8 +3,8 @@ static-gnulib-arch = $(elf-objpfx)libgcc-stubs.a ifeq ($(subdir),elf) sysdep-dl-routines += tlsdesc dl-tlsdesc -sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx tlsdesc dl-tlsdesc -sysdep-rtld-routines += aeabi_unwind_cpp_pr1 tlsdesc dl-tlsdesc +sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx +sysdep-rtld-routines += aeabi_unwind_cpp_pr1 shared-only-routines += aeabi_unwind_cpp_pr1 $(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os --- a/sysdeps/hppa/Makefile +++ b/sysdeps/hppa/Makefile @@ -24,8 +24,6 @@ LDFLAGS-c_pic.os += -Wl,--unique=.text* ifeq ($(subdir),elf) CFLAGS-rtld.c += -mdisable-fpregs sysdep-dl-routines += dl-symaddr dl-fptr -sysdep_routines += $(sysdep-dl-routines) -sysdep-rtld-routines += $(sysdep-dl-routines) endif ifeq ($(subdir),csu) --- a/sysdeps/i386/Makefile +++ b/sysdeps/i386/Makefile @@ -66,8 +66,6 @@ endif ifeq ($(subdir),elf) sysdep-dl-routines += tlsdesc dl-tlsdesc -sysdep_routines += tlsdesc dl-tlsdesc -sysdep-rtld-routines += tlsdesc dl-tlsdesc endif ifeq ($(subdir),csu) --- a/sysdeps/ia64/Makefile +++ b/sysdeps/ia64/Makefile @@ -17,6 +17,4 @@ endif ifeq ($(subdir),elf) sysdep-dl-routines += dl-symaddr dl-fptr -sysdep_routines += $(sysdep-dl-routines) -sysdep-rtld-routines += $(sysdep-dl-routines) endif --- a/sysdeps/unix/sysv/linux/aarch64/Makefile +++ b/sysdeps/unix/sysv/linux/aarch64/Makefile @@ -10,8 +10,6 @@ sysdep-rtld-routines += __read_tp ifeq ($(build-shared),yes) # This is needed for DSO loading from static binaries. sysdep-dl-routines += dl-static -sysdep_routines += dl-static -sysdep-rtld-routines += dl-static endif endif --- a/sysdeps/unix/sysv/linux/ia64/Makefile +++ b/sysdeps/unix/sysv/linux/ia64/Makefile @@ -15,8 +15,6 @@ endif ifeq ($(subdir),elf) sysdep-dl-routines += dl-static -sysdep_routines += $(sysdep-dl-routines) -sysdep-rtld-routines += $(sysdep-dl-routines) endif ifeq ($(subdir),rt) --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -13,8 +13,8 @@ endif ifeq ($(subdir),elf) sysdep-dl-routines += dl-static -sysdep_routines += dl-vdso libc-m68k-vdso dl-static -sysdep-rtld-routines += m68k-vdso dl-static +sysdep_routines += dl-vdso libc-m68k-vdso +sysdep-rtld-routines += m68k-vdso sysdep-others += lddlibc4 install-bin += lddlibc4 endif --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -96,8 +96,6 @@ ifeq ($(subdir),elf) ifeq ($(build-shared),yes) # This is needed for DSO loading from static binaries. sysdep-dl-routines += dl-static -sysdep_routines += dl-static -sysdep-rtld-routines += dl-static endif endif --- a/sysdeps/unix/sysv/linux/powerpc/Makefile +++ b/sysdeps/unix/sysv/linux/powerpc/Makefile @@ -19,8 +19,6 @@ sysdep_routines += dl-vdso ifeq ($(build-shared),yes) # This is needed for DSO loading from static binaries. sysdep-dl-routines += dl-static -sysdep_routines += dl-static -sysdep-rtld-routines += dl-static endif endif --- a/sysdeps/unix/sysv/linux/tile/Makefile +++ b/sysdeps/unix/sysv/linux/tile/Makefile @@ -19,8 +19,6 @@ sysdep_routines += dl-vdso ifeq ($(build-shared),yes) # This is needed for DSO loading from static binaries. sysdep-dl-routines += dl-static -sysdep_routines += dl-static -sysdep-rtld-routines += dl-static endif endif --- a/sysdeps/x86_64/Makefile +++ b/sysdeps/x86_64/Makefile @@ -20,8 +20,6 @@ endif ifeq ($(subdir),elf) sysdep-dl-routines += tlsdesc dl-tlsdesc -sysdep_routines += tlsdesc dl-tlsdesc -sysdep-rtld-routines += tlsdesc dl-tlsdesc tests += tst-quad1 tst-quad2 modules-names += tst-quadmod1 tst-quadmod2