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]

Re: i386-pe partial links


Ian Lance Taylor wrote:

>_bfd_coff_final_link should also write out the string table (it's the
>last thing it does).  Why does coff_write_object_contents think that
>it still needs to be written out?

Well, coff_write_object_contents is writing out the section headers.  In PE, 
long section names go into the string table, so this code forces the symbol 
and string tables out:

#ifdef COFF_LONG_SECTION_NAMES
  else if (long_section_names)
    {
      /* If we have long section names we have to write out the string
         table even if there are no symbols.  */
      if (! coff_write_symbols (abfd))
	return false;
    }
#endif

I don't know how coff_write_object_contents could tell that the string table 
has already been written.  (You're correct that _bfd_coff_final_link does 
write it.)

p.



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