Browse Source
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.gdb_7_6-branch
8 changed files with 65 additions and 0 deletions
@ -0,0 +1,9 @@ |
|||
#source: rgn-at6.s |
|||
#ld: -T rgn-at6.t |
|||
#objdump: -h --wide |
|||
#xfail: rx-*-* |
|||
# Test that lma is aligned as for vma when lma_region==region. |
|||
|
|||
#... |
|||
.* 0+10000 +0+10000 .* |
|||
.* 0+10100 +0+10100 .* |
|||
@ -0,0 +1,6 @@ |
|||
.text |
|||
.long 0 |
|||
|
|||
.data |
|||
.p2align 8 |
|||
.long 0 |
|||
@ -0,0 +1,11 @@ |
|||
MEMORY |
|||
{ |
|||
ram : ORIGIN = 0x10000, LENGTH = 0x10000 |
|||
} |
|||
|
|||
SECTIONS |
|||
{ |
|||
.text : {*(.text)} > ram AT> ram |
|||
.data : ALIGN (16) {*(.data)} > ram AT> ram |
|||
/DISCARD/ : {*(*)} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
#source: rgn-at6.s |
|||
#ld: -T rgn-at7.t |
|||
#objdump: -h --wide |
|||
#xfail: rx-*-* |
|||
# Test that lma is only aligned by script when lma_region!=region. |
|||
|
|||
#... |
|||
.* 0+10000 +0+20000 .* |
|||
.* 0+10100 +0+20010 .* |
|||
@ -0,0 +1,12 @@ |
|||
MEMORY |
|||
{ |
|||
ram : ORIGIN = 0x10000, LENGTH = 0x10000 |
|||
rom : ORIGIN = 0x20000, LENGTH = 0x10000 |
|||
} |
|||
|
|||
SECTIONS |
|||
{ |
|||
.text : {*(.text)} > ram AT> rom |
|||
.data : ALIGN (16) {*(.data)} > ram AT> rom |
|||
/DISCARD/ : {*(*)} |
|||
} |
|||
Loading…
Reference in new issue