This is the mail archive of the binutils@sources.redhat.com 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: RFC: Remove empty output sections


On Mon, Mar 14, 2005 at 07:05:15PM +1030, Alan Modra wrote:
> On Sun, Mar 13, 2005 at 10:31:41PM -0800, H. J. Lu wrote:
> > @@ -4883,7 +4893,7 @@ lang_process (void)
> >      lang_check_section_addresses ();
> >  
> >    /* Final stuffs.  */
> > -
> > +  lang_mark_used_section ();
> >    ldemul_finish ();
> >    lang_finish ();
> >  }
> 
> Isn't this too late to strip sections?  What happens if one of the
> sections stripped has a dynamic section symbol?

I wish I'd trusted my instincts here, and not believed your report that
dynamic section syms look OK.  They aren't OK at all.  .dynsym section
contents are left uninitialised, and you've just been lucky that all
your bfd_alloc's happened to return zeroed memory.  I'm seeing this:

    10: 00011a38     0 SECTION LOCAL  DEFAULT   19
    11: 00011a3c     0 SECTION LOCAL  DEFAULT   20
    12: 00000034   143 FUNC    GLOBAL DEFAULT  UND

Please fix.

-- 
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]