diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2009-04-03 07:45:28 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2009-04-03 07:45:28 +0000 |
commit | 113e68452ed03bd9f48a31036ece530685751112 (patch) | |
tree | 12447d582791dafd93f0dd90779c035fdc29e687 /ld/ldlang.c | |
parent | 4cebb668fe6ee94269a0d7eff61ff7a81a8dfa64 (diff) | |
download | gdb-113e68452ed03bd9f48a31036ece530685751112.zip gdb-113e68452ed03bd9f48a31036ece530685751112.tar.gz gdb-113e68452ed03bd9f48a31036ece530685751112.tar.bz2 |
* ldlang.c (lang_leave_output_section_statement): Set lma_region
if it is not overridden and section is for the same vma region as
the previous section.
* ld-scripts/rgn-at.exp: New.
* ld-scripts/rgn-at.s: New.
* ld-scripts/rgn-at1.d: New.
* ld-scripts/rgn-at1.t: New.
* ld-scripts/rgn-at2.d: New.
* ld-scripts/rgn-at2.t: New.
* ld-scripts/rgn-at3.d: New.
* ld-scripts/rgn-at3.t: New.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index 55d1043..a32dd51 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -6543,6 +6543,15 @@ lang_leave_output_section_statement (fill_type *fill, const char *memspec, memspec, lma_memspec, current_section->load_base != NULL, current_section->addr_tree != NULL); + + /* If this section has no load region or base, but has the same + region as the previous section, then propagate the previous + section's load region. */ + + if (!current_section->lma_region && !current_section->load_base + && current_section->region == current_section->prev->region) + current_section->lma_region = current_section->prev->lma_region; + current_section->fill = fill; current_section->phdrs = phdrs; pop_stat_ptr (); |