This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] program header instability


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]