summaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2011-05-16 00:22:36 +0000
committerAlan Modra <amodra@bigpond.net.au>2011-05-16 00:22:36 +0000
commitd0e3992ba30bc8f1e756895fc8cd37a105fff63b (patch)
tree701c39f7e220a914242d8e6ce2411ffd77ffd7ae /ld/ldlang.c
parentc9ff89bd86229b354a858d1bcb85eac4ce8c9188 (diff)
downloadbinutils-redhat-d0e3992ba30bc8f1e756895fc8cd37a105fff63b.tar.gz
* ldlang.c (lang_leave_output_section_statement): Don't copy
previous lma_region if given address.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index c291fd9347..b9f6dd87c3 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -6912,11 +6912,13 @@ lang_leave_output_section_statement (fill_type *fill, const char *memspec,
current_section->load_base != NULL,
current_section->addr_tree != NULL);
- /* If this section has no load region or base, but has the same
+ /* If this section has no load region or base, but uses the same
region as the previous section, then propagate the previous
section's load region. */
- if (!current_section->lma_region && !current_section->load_base
+ if (current_section->lma_region == NULL
+ && current_section->load_base == NULL
+ && current_section->addr_tree == NULL
&& current_section->region == current_section->prev->region)
current_section->lma_region = current_section->prev->lma_region;