From: Alan Modra Date: Tue, 5 Mar 2013 03:11:31 +0000 (+0000) Subject: PR ld/15222 X-Git-Tag: binutils-2_23_2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4e4d1ce5696c46e49deab792552b588d8cf46594;p=thirdparty%2Fbinutils-gdb.git PR ld/15222 ld/ * ldlang.c (lang_size_sections_1): When given an lma_region align LMA as per VMA only if lma_region is the same as region. ld/testsuite/ * ld-scripts/rgn-at6.s, * ld-scripts/rgn-at6.t, * ld-scripts/rgn-at6.d, * ld-scripts/rgn-at7.t, * ld-scripts/rgn-at7.d: New tests. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 670b51e7fe6..20c59c77ca6 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2013-03-05 Alan Modra + + PR ld/15222 + * ldlang.c (lang_size_sections_1): When given an lma_region align + LMA as per VMA only if lma_region is the same as region. + 2013-01-22 Alan Modra Apply mainline patches diff --git a/ld/ldlang.c b/ld/ldlang.c index 01c12df2c52..459f277a3ea 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -4961,6 +4961,13 @@ lang_size_sections_1 { bfd_vma lma = os->lma_region->current; + /* When LMA_REGION is the same as REGION, align the LMA + as we did for the VMA, possibly including alignment + from the bfd section. If a different region, then + only align according to the value in the output + statement. */ + if (os->lma_region != os->region) + section_alignment = os->section_alignment; if (section_alignment > 0) lma = align_power (lma, section_alignment); os->bfd_section->lma = lma; diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 2d963681789..6d516e08a42 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-03-05 Alan Modra + + * ld-scripts/rgn-at6.s, * ld-scripts/rgn-at6.t, * ld-scripts/rgn-at6.d, + * ld-scripts/rgn-at7.t, * ld-scripts/rgn-at7.d: New tests. + 2013-02-12 Yufeng Zhang * ld-aarch64/emit-relocs-264.d: Append the '-Mno-aliases' option to