* write.c (relax_segment): Correct address on frag added to stop
leb128/align frags bouncing.
This commit is contained in:
parent
e35a414d3c
commit
20f5cfbdea
|
@ -1,3 +1,8 @@
|
||||||
|
2010-10-19 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* write.c (relax_segment): Correct address on frag added to stop
|
||||||
|
leb128/align frags bouncing.
|
||||||
|
|
||||||
2010-10-19 Alan Modra <amodra@gmail.com>
|
2010-10-19 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR gas/12049
|
PR gas/12049
|
||||||
|
|
11
gas/write.c
11
gas/write.c
|
@ -2525,6 +2525,7 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
|
||||||
fragP->fr_literal + fragP->fr_fix,
|
fragP->fr_literal + fragP->fr_fix,
|
||||||
fragP->fr_var);
|
fragP->fr_var);
|
||||||
newf->fr_type = rs_fill;
|
newf->fr_type = rs_fill;
|
||||||
|
newf->fr_address = address + fragP->fr_fix + newoff;
|
||||||
newf->fr_fix = 0;
|
newf->fr_fix = 0;
|
||||||
newf->fr_offset = (((offsetT) 1 << fragP->fr_offset)
|
newf->fr_offset = (((offsetT) 1 << fragP->fr_offset)
|
||||||
/ fragP->fr_var);
|
/ fragP->fr_var);
|
||||||
|
@ -2534,13 +2535,11 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
|
||||||
newf->fr_offset = (offsetT) 1 << fragP->fr_offset;
|
newf->fr_offset = (offsetT) 1 << fragP->fr_offset;
|
||||||
newf->fr_var = 1;
|
newf->fr_var = 1;
|
||||||
}
|
}
|
||||||
/* Include growth of new frag, because rs_fill
|
/* Include size of new frag in GROWTH. */
|
||||||
frags don't normally grow. */
|
|
||||||
growth += newf->fr_offset * newf->fr_var;
|
growth += newf->fr_offset * newf->fr_var;
|
||||||
/* The new frag address is newoff. Adjust this
|
/* Adjust the new frag address for the amount
|
||||||
for the amount we'll add when we process the
|
we'll add when we process the new frag. */
|
||||||
new frag. */
|
newf->fr_address -= stretch + growth;
|
||||||
newf->fr_address = newoff - stretch - growth;
|
|
||||||
newf->relax_marker ^= 1;
|
newf->relax_marker ^= 1;
|
||||||
fragP->fr_next = newf;
|
fragP->fr_next = newf;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
Loading…
Reference in New Issue