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: 2.15 problem building GCC arm-elf cross-compiler on Solaris/HP-UX


On Thu, Sep 30, 2004 at 06:51:27PM +0100, Nick Clifton wrote:
> >In _bfd_compute_and_write_armap(), we fall into (line 1797):
> >  /* Map over each element.  */
> >  for (current = arch->archive_head;
> >       current != NULL;
> >       current = current->next, elt_no++)
> >    {
> >
> >At this point, the arch->where member is 8. After this loop completes,
> >the arch->where member is 0, forcing new data written to the output
> >file to be written at offset 0, not 8, thereby overwriting
> >"!<arch>\012". I traced through the loop and, at the final iteration
> >of the loop, before current != NULL, a call is made to (line 1802):
> >      if (bfd_check_format (current, bfd_object)
> >          && (bfd_get_file_flags (current) & HAS_SYMS) != 0)
> >        {
> >
> >The call to bfd_check_format (current, bfd_object) resets arch->member
> >to 0. I don't know why yet. Does this help anyone?
> 
> Hmm, I wonder if this is to do with this patch:
> 
>   2004-05-19  Mikulas Patocka  <mikulas@artax.karlin.mff.cuni.cz>
> 	* archive.c (_bfd_get_elt_at_filepos): Cope with a nested
>           archives.
> 	  (bfd_generic_openr_next_archived_file): Likewise.
> 
> If, for some reason, the bfd_check_format() thought that it was dealing 
> with a nested archive it might reset the arch->where field of the outer, 
> parent archive.  Just a guess mind you.

This patch wasn't included in the 2.15 release.

-- 
albert chin (china@thewrittenword.com)


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