aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 3d40982..8daf9c5 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -4235,7 +4235,11 @@ lang_reset_memory_regions (void)
}
for (o = output_bfd->sections; o != NULL; o = o->next)
- o->size = 0;
+ {
+ /* Save the last size for possible use by bfd_relax_section. */
+ o->rawsize = o->size;
+ o->size = 0;
+ }
}
/* Worker for lang_gc_sections_1. */