aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-06-24 01:49:36 +0000
committerAlan Modra <amodra@gmail.com>2008-06-24 01:49:36 +0000
commit6afe8e98a664d4a54e613ad9f4d28c426e50db96 (patch)
treed2654de1938a27a13176824eae8fe7d10d024af6
parentcd2582e1a12352f1221d586a63fa148c7514db13 (diff)
downloadgdb-6afe8e98a664d4a54e613ad9f4d28c426e50db96.zip
gdb-6afe8e98a664d4a54e613ad9f4d28c426e50db96.tar.gz
gdb-6afe8e98a664d4a54e613ad9f4d28c426e50db96.tar.bz2
* write.c (relax_segment <rs_org>): Include current stretch
value when calculating whether .org is backwards.
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/write.c10
2 files changed, 9 insertions, 7 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index b4e0e98..ef7819d 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2008-06-24 Bob Wilson <bob.wilson@acm.org>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * write.c (relax_segment <rs_org>): Include current stretch
+ value when calculating whether .org is backwards.
+
2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
diff --git a/gas/write.c b/gas/write.c
index 9875f7f..2ba44b9 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;