diff options
author | Alan Modra <amodra@bigpond.net.au> | 2011-05-16 00:53:45 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2011-05-16 00:53:45 +0000 |
commit | 17ad9e80cb1d8e5c41c5a19b0e58472a7db79ba7 (patch) | |
tree | 66a8b7e26346be99365203e2c2ce921cb50e60d3 | |
parent | 115dc485595b96ddcb3252b420cfb6bc895766d5 (diff) | |
download | binutils-redhat-17ad9e80cb1d8e5c41c5a19b0e58472a7db79ba7.tar.gz |
* ldlang.c (lang_leave_output_section_statement): Don't copy
previous lma_region if given address.
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/ldlang.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 1452b79912..09788f840a 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2011-05-16 Alan Modra <amodra@gmail.com> + + * ldlang.c (lang_leave_output_section_statement): Don't copy + previous lma_region if given address. + 2011-05-04 Alan Modra <amodra@gmail.com> PR ld/12726 diff --git a/ld/ldlang.c b/ld/ldlang.c index 2f1842ead6..cba509b84e 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -6861,11 +6861,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; |