This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] program header instability
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Sun, 24 Dec 2006 00:13:46 +1030
- Subject: Re: [PATCH] program header instability
- References: <45880944.5070704@codesourcery.com>
On Tue, Dec 19, 2006 at 03:46:12PM +0000, Nathan Sidwell wrote:
> This patch fixes a problem with instability in calculating program headers.
I was worried this might happen. :-(
> furthermore we never reduce the size of the program headers, to avoid the
> above instability.
I'm not so keen on never reducing the size. The thing is that we have
two ways we set the size. The first is the guess we make in
get_program_header_size (triggerred by SIZEOF_HEADERS in a link
script), the second is the value calculated from a previous iteration
of the segment layout code. get_program_header_size can make quite a
poor guess. So I reckon we ought to allow shrinkage on the first
iteration (or maybe first few iterations) of the gld*_map_segments
loop. Would you mind making that change?
--
Alan Modra
IBM OzLabs - Linux Technology Centre