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]

Delay saetting finalize_syms until after segments are sized


Hi Guys,

  I am checking in the patch below to delay setting finalize_syms
  until after size_segs has been called.  Some ports delay sizing all
  of their frags until this step, and they need the symbol frag
  infomation that is destroyed by setting finalize_syms.

Cheers
        Nick

2001-06-27  Nick Clifton  <nickc@cambridge.redhat.com>

	* write.c (write_object_file): Do not set finalize_syms until
	after the segments have been sized.  Some backends may still
	need to access the syms's frags in order to adjust relaxed
	frags.

Index: write.c
===================================================================
RCS file: /cvs/src/src/gas/write.c,v
retrieving revision 1.39
diff -p -r1.39 write.c
*** write.c	2001/06/27 07:02:24	1.39
--- write.c	2001/06/27 08:46:54
*************** write_object_file ()
*** 1574,1587 ****
        if (!changed)
  	break;
      }
-   /* Relaxation has completed.  Freeze all syms.  */
-   finalize_syms = 1;
  
    bfd_map_over_sections (stdoutput, size_seg, (char *) 0);
  #else
    relax_and_size_all_segments ();
-   finalize_syms = 1;
  #endif /* BFD_ASSEMBLER  */
  
  #if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32)
    /* Now that the segments have their final sizes, run through the
--- 1574,1590 ----
        if (!changed)
  	break;
      }
  
+   /* Note - we do not set finalize_syms here because some targets
+      do not finish sizing all of their frags until after size_seg
+      has completed.  */
    bfd_map_over_sections (stdoutput, size_seg, (char *) 0);
  #else
    relax_and_size_all_segments ();
  #endif /* BFD_ASSEMBLER  */
+ 
+   /* Relaxation has completed.  Freeze all syms.  */
+   finalize_syms = 1;
  
  #if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32)
    /* Now that the segments have their final sizes, run through the


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