diff options
author | Alan Modra <amodra@gmail.com> | 2013-03-05 02:55:27 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-03-05 02:55:27 +0000 |
commit | 13762d2ee43b8b49d5d26a87c5496439d829bc6a (patch) | |
tree | c03c40bb14a66e3b1780ba4184d2ea82b6ad8c8b /ld/testsuite | |
parent | da797b631b318a4ecab6aac93315feb24553bfdf (diff) | |
download | gdb-13762d2ee43b8b49d5d26a87c5496439d829bc6a.zip gdb-13762d2ee43b8b49d5d26a87c5496439d829bc6a.tar.gz gdb-13762d2ee43b8b49d5d26a87c5496439d829bc6a.tar.bz2 |
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.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-at6.d | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-at6.s | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-at6.t | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-at7.d | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-at7.t | 12 |
6 files changed, 52 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 0db8fe7..dd4ded2 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-03-05 Alan Modra <amodra@gmail.com> + + * 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-28 Nathan Sidwell <nathan@codesourcery.com> * ld-arm/tls-local-static.s: New test. diff --git a/ld/testsuite/ld-scripts/rgn-at6.d b/ld/testsuite/ld-scripts/rgn-at6.d new file mode 100644 index 0000000..80f9b8a --- /dev/null +++ b/ld/testsuite/ld-scripts/rgn-at6.d @@ -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 .* diff --git a/ld/testsuite/ld-scripts/rgn-at6.s b/ld/testsuite/ld-scripts/rgn-at6.s new file mode 100644 index 0000000..20571bc --- /dev/null +++ b/ld/testsuite/ld-scripts/rgn-at6.s @@ -0,0 +1,6 @@ + .text + .long 0 + + .data + .p2align 8 + .long 0 diff --git a/ld/testsuite/ld-scripts/rgn-at6.t b/ld/testsuite/ld-scripts/rgn-at6.t new file mode 100644 index 0000000..0408dcd --- /dev/null +++ b/ld/testsuite/ld-scripts/rgn-at6.t @@ -0,0 +1,11 @@ +MEMORY +{ + ram : ORIGIN = 0x10000, LENGTH = 0x10000 +} + +SECTIONS +{ + .text : {*(.text)} > ram AT> ram + .data : ALIGN (16) {*(.data)} > ram AT> ram + /DISCARD/ : {*(*)} +} diff --git a/ld/testsuite/ld-scripts/rgn-at7.d b/ld/testsuite/ld-scripts/rgn-at7.d new file mode 100644 index 0000000..a12ca17 --- /dev/null +++ b/ld/testsuite/ld-scripts/rgn-at7.d @@ -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 .* diff --git a/ld/testsuite/ld-scripts/rgn-at7.t b/ld/testsuite/ld-scripts/rgn-at7.t new file mode 100644 index 0000000..c1f2789 --- /dev/null +++ b/ld/testsuite/ld-scripts/rgn-at7.t @@ -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/ : {*(*)} +} |