i386-pe partial links

Philip Blundell philb@gnu.org
Sat Nov 4 03:22:00 GMT 2000


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.




More information about the Binutils mailing list