From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2680 invoked by alias); 4 Sep 2006 21:28:20 -0000 Received: (qmail 2664 invoked by uid 22791); 4 Sep 2006 21:28:19 -0000 X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 04 Sep 2006 21:28:17 +0000 Received: from sunsite.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.1/8.13.1) with ESMTP id k84LSCsi028904; Mon, 4 Sep 2006 23:28:12 +0200 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.13.1/8.13.1/Submit) id k84LSC5q028902; Mon, 4 Sep 2006 23:28:12 +0200 Date: Mon, 04 Sep 2006 21:28:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Put .hash section at the end of RO segment if --hash-style=both Message-ID: <20060904212811.GR4556@sunsite.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00000.txt.bz2 Hi! %subj says it all, if we put in both hash tables, we indend to use .gnu.hash in 99.999% of cases. 2006-09-04 Jakub Jelinek * Makerules (shlib.lds): If have-hash-style, put .hash section at the end of the RO segment. --- libc/Makerules.jj 2006-08-21 23:00:58.000000000 +0200 +++ libc/Makerules 2006-09-04 23:20:24.000000000 +0200 @@ -487,7 +487,13 @@ $(common-objpfx)shlib.lds: $(common-objp -Wl,--verbose 2>&1 | \ sed > $@T \ -e '/^=========/,/^=========/!d;/^=========/d' \ - -e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \ + $(if $(filter yes,$(have-hash-style)), \ + -e 's/^.*\.gnu\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \ + -e '/^[ ]*\.hash[ ]*:.*$$/{h;d;}' \ + -e '/DATA_SEGMENT_ALIGN/{H;g}' \ + , \ + -e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \ + ) \ -e 's/^.*\*(\.dynbss).*$$/& \ PROVIDE(__start___libc_freeres_ptrs = .); \ *(__libc_freeres_ptrs) \ Jakub