aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2003-10-17 23:05:50 +0000
committerHans-Peter Nilsson <hp@axis.com>2003-10-17 23:05:50 +0000
commit86d3c9a824dc25160c3201b7ab6f14fbe1682df3 (patch)
tree9cc7d6b00f147dc6cad3c538842ac1180fbe4a42 /ld
parent4e2147ff812032547eb25f3183a229373a4a3951 (diff)
downloadgdb-86d3c9a824dc25160c3201b7ab6f14fbe1682df3.zip
gdb-86d3c9a824dc25160c3201b7ab6f14fbe1682df3.tar.gz
gdb-86d3c9a824dc25160c3201b7ab6f14fbe1682df3.tar.bz2
* ldlang.c (lang_size_sections): Last, set _cooked_size for output
sections.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/ldlang.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 03f47d6..be94011 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * ldlang.c (lang_size_sections): Last, set _cooked_size for output
+ sections.
+
2003-10-16 Alan Modra <amodra@bigpond.net.au>
* Makefile.am (GENSCRIPTS_EXTRA, GEN_EXTRA_DEPENDS): Remove. Use
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 039c7cb..a6ceef0 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -3227,6 +3227,7 @@ lang_size_sections
bfd_boolean check_regions)
{
bfd_vma result;
+ asection *o;
/* Callers of exp_fold_tree need to increment this. */
lang_statement_iteration++;
@@ -3253,6 +3254,14 @@ lang_size_sections
}
}
+ /* Some backend relaxers want to refer to the output section size. Give
+ them a section size that does not change on the next call while they
+ relax. We can't set this at top because lang_reset_memory_regions
+ which is called before we get here, sets _raw_size to 0 on relaxing
+ rounds. */
+ for (o = output_bfd->sections; o != NULL; o = o->next)
+ o->_cooked_size = o->_raw_size;
+
return result;
}