[RFA:] gas/write.c: Fix recent breakage in broken-.word support
Hans-Peter Nilsson
hans-peter.nilsson@axis.com
Tue Apr 3 07:58:00 GMT 2001
The recent change to loop over relax_segment until nothing changes,
broke broken-.word support (yeah, I know it's deprecated). This
fix together with other corrections for
md_estimate_size_before_relax in tc-cris.c that I'm about to
commit, makes the GAS testsuite for CRIS (which includes tests
for this, hint, hint) pass again.
Ok to commit?
* write.c (write_object_file): Reset broken word state before
calling relax_seg.
Index: write.c
===================================================================
RCS file: /cvs/src/src/gas/write.c,v
retrieving revision 1.30
diff -c -p -r1.30 write.c
*** write.c 2001/03/30 02:19:36 1.30
--- write.c 2001/04/03 14:49:50
*************** write_object_file ()
*** 1544,1549 ****
--- 1544,1569 ----
{
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)
brgds, H-P
More information about the Binutils
mailing list