From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100489 invoked by alias); 29 Mar 2015 03:19:12 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 100463 invoked by uid 89); 29 Mar 2015 03:19:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ob0-f173.google.com Received: from mail-ob0-f173.google.com (HELO mail-ob0-f173.google.com) (209.85.214.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 29 Mar 2015 03:19:09 +0000 Received: by obvd1 with SMTP id d1so33551500obv.0 for ; Sat, 28 Mar 2015 20:19:07 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.161.36 with SMTP id xp4mr12843268oeb.61.1427599147239; Sat, 28 Mar 2015 20:19:07 -0700 (PDT) Received: by 10.76.134.102 with HTTP; Sat, 28 Mar 2015 20:19:07 -0700 (PDT) In-Reply-To: <20150328041540.GE26234@bubble.grove.modra.org> References: <20150319130244.GA22592@intel.com> <20150326022246.GU26234@bubble.grove.modra.org> <20150328041540.GE26234@bubble.grove.modra.org> Date: Sun, 29 Mar 2015 03:19:00 -0000 Message-ID: Subject: Re: [PATCH] Reduce file size for PT_GNU_RELRO segment From: "H.J. Lu" To: Binutils Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00428.txt.bz2 On Fri, Mar 27, 2015 at 9:15 PM, Alan Modra wrote: > On Fri, Mar 27, 2015 at 01:00:20PM -0700, H.J. Lu wrote: >> On Wed, Mar 25, 2015 at 7:22 PM, Alan Modra wrote: >> > Isn't this just re-inventing the commonpage adjustment done for >> > DATA_SEGMENT_ALIGN? Why didn't the existing code in ldexp.c work for >> > you? >> >> segment. In order to properly align PT_GNU_RELRO segment, we pad the first >> section of PT_GNU_RELRO segment by > > Adjusting the start of the first section of the PT_GNU_RELRO segment > is exactly what DATA_SEGMENT_ALIGN is supposed to do. You are > patching the wrong place. Any adjustment to the start of the relro > segment belongs in ldexp.c code evaluating DATA_SEGMENT_ALIGN. > I opened a bug: https://sourceware.org/bugzilla/show_bug.cgi?id=18176 -- H.J.