summaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2008-06-24 01:49:36 +0000
committerAlan Modra <amodra@bigpond.net.au>2008-06-24 01:49:36 +0000
commit8b951ac3ef2d0b7c9d27988f147df45fd3a6a3f6 (patch)
tree84a63f2408c074b8974a566afcb61321a9a27fd8 /gas/write.c
parentc6475567f895c8874315e8ca2a7169c980c1b4bb (diff)
downloadbinutils-redhat-8b951ac3ef2d0b7c9d27988f147df45fd3a6a3f6.tar.gz
* write.c (relax_segment <rs_org>): Include current stretch
value when calculating whether .org is backwards.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gas/write.c b/gas/write.c
index 9875f7f687..2ba44b9173 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -2305,7 +2305,7 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
}
know (fragP->fr_next);
- after = fragP->fr_next->fr_address;
+ after = fragP->fr_next->fr_address + stretch;
growth = target - after;
if (growth < 0)
{
@@ -2340,14 +2340,10 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
fragP->fr_type = rs_align;
fragP->fr_subtype = 0;
fragP->fr_offset = 0;
- fragP->fr_fix = after - was_address;
- break;
+ fragP->fr_fix = after - address;
}
-
- /* This is an absolute growth factor */
- growth -= stretch;
- break;
}
+ break;
case rs_space:
growth = 0;