This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Reduce file size for PT_GNU_RELRO segment
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Sat, 28 Mar 2015 14:45:40 +1030
- Subject: Re: [PATCH] Reduce file size for PT_GNU_RELRO segment
- Authentication-results: sourceware.org; auth=none
- References: <20150319130244 dot GA22592 at intel dot com> <20150326022246 dot GU26234 at bubble dot grove dot modra dot org> <CAMe9rOrVpthhMfZEXcMkKzmHcxymfQHKuTuZPi_y36=s6KJ9iA at mail dot gmail dot com>
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 <amodra@gmail.com> 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.
--
Alan Modra
Australia Development Lab, IBM