Problem with objcopy phdrs and patch

Bob Wilson bwilson@tensilica.com
Thu May 13 17:50:00 GMT 2004


I haven't seen any response to the patch David Heine proposed to fix this 
problem, so I thought I'd follow up to make sure it wasn't overlooked.  Judging 
from the "FIXME" comment, the current code is obviously broken, and David's 
patch seems like a reasonable solution.  I'd be happy to apply the patch if 
someone will approve it.

Thanks,
Bob

David Heine wrote:
> I've run into problems with objcopy mapping PHDRS into a segment from a file that did not originally map PHDRS into a segment. This only occurs when removing the last section from an object file on configurations with small MAXPAGESIZE.
> 
> I tracked the problem down to a FIXME in elf.c:5241
>         /* Only set up the segments if there are no more SEC_ALLOC
>            sections.  FIXME: This won't do the right thing if objcopy is
>            used to remove the last SEC_ALLOC section, since objcopy
>            won't call this routine in that case.  */




More information about the Binutils mailing list