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 at sourceware dot org
- Date: Thu, 26 Mar 2015 12:52:46 +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>
On Thu, Mar 19, 2015 at 06:02:44AM -0700, H.J. Lu wrote:
> When a padding in file is used to align PT_GNU_RELRO segment, the maximum
> padding size is maximum page size minus 1. This patch trades memory size
> for file size by increasing memory size to avoid padding if file size
> will be reduced by more than maximum page minus a page and memory size
> will be increased by less than a page.
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?
--
Alan Modra
Australia Development Lab, IBM