* write.c (write_object_file): Reset broken word state before
authorHans-Peter Nilsson <hp@axis.com>
Wed, 4 Apr 2001 03:05:47 +0000 (03:05 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Wed, 4 Apr 2001 03:05:47 +0000 (03:05 +0000)
calling relax_seg.

gas/ChangeLog
gas/write.c

index 4d20134f0d77c568d3ac93c68b6c7401ddb09d86..64816e37cca3d00cd73f49a259be22a6b13349d6 100644 (file)
@@ -1,3 +1,8 @@
+2001-04-04  Hans-Peter Nilsson  <hp@axis.com>
+
+       * write.c (write_object_file): Reset broken word state before
+       calling relax_seg.
+
 2001-03-31  Alan Modra  <alan@linuxcare.com.au>
 
        * listing.c (listing_listing): Enable listing on EDICT_NOLIST_NEXT
index ea4b0820f31e6a89223a0e0b1df977f0e8702609..1a2798be246eb943bea44c1a9258ab502f7532f7 100644 (file)
@@ -1544,6 +1544,26 @@ write_object_file ()
     {
       int changed;
 
+#ifndef WORKING_DOT_WORD
+      /* We need to reset the markers in the broken word list and
+        associated frags between calls to relax_segment (via
+        relax_seg).  Since the broken word list is global, we do it
+        once per round, rather than locally in relax_segment for each
+        segment.  */
+      struct broken_word *brokp;
+
+      for (brokp = broken_words;
+          brokp != (struct broken_word *) NULL;
+          brokp = brokp->next_broken_word)
+       {
+         brokp->added = 0;
+
+         if (brokp->dispfrag != (fragS *) NULL
+             && brokp->dispfrag->fr_type == rs_broken_word)
+           brokp->dispfrag->fr_subtype = 0;
+       }
+#endif
+
       changed = 0;
       bfd_map_over_sections (stdoutput, relax_seg, &changed);
       if (!changed)