[v2,5/7] Add testsuite for ASCII command
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_binutils_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_binutils_check--master-arm |
success
|
Test passed
|
Commit Message
From: Ulf Samuelsson <ulf@emagii.com>
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
---
ld/testsuite/ld-scripts/ascii.d | 25 ++++++++++++++++++++
ld/testsuite/ld-scripts/ascii.s | 11 +++++++++
ld/testsuite/ld-scripts/ascii.t | 38 ++++++++++++++++++++++++++++++
ld/testsuite/ld-scripts/script.exp | 1 +
4 files changed, 75 insertions(+)
create mode 100644 ld/testsuite/ld-scripts/ascii.d
create mode 100644 ld/testsuite/ld-scripts/ascii.s
create mode 100644 ld/testsuite/ld-scripts/ascii.t
new file mode 100644
@@ -0,0 +1,25 @@
+#source: ascii.s
+#ld: -T ascii.t
+#objdump: -s -j .header
+#target: [is_elf_format] [is_coff_format]
+#notarget: tic4x-*-* tic54x-*-*
+
+.*: file format .*
+
+Contents of section .header:
+ .... 70726f67 72616d20 6e616d65 00000000 program name....
+ .... 656d7074 79000000 00000000 00000000 empty...........
+ .... 00000000 00000000 00000000 00000000 ................
+ .... 00000000 00000000 00000000 00000000 ................
+ .... 00000000 00000000 00000000 00000000 ................
+ .... 636f6d6d 656e7420 310a0000 00000000 comment 1.......
+ .... 00000000 00000000 00000000 00000000 ................
+ .... 636f6d6d 656e7420 320a0000 00000000 comment 2.......
+ .... 00000000 00000000 00000000 00000000 ................
+ .... 636f6d6d 656e7420 330a0000 00000000 comment 3.......
+ .... 00000000 00000000 00000000 00000000 ................
+ .... 636f6d6d 656e7420 340a0000 00000000 comment 4.......
+ .... 00000000 00000000 49206d65 616e7420 ........I meant
+ .... 746f2073 61793a20 54686973 20697320 to say: This is
+ .... 77617920 746f6f20 6c6f6e67 00000000 way too long....
+#pass
new file mode 100644
@@ -0,0 +1,11 @@
+ .extern ecc_start
+ .section .text
+main:
+ .long 0x45444F43
+ .long 0x12345678
+
+ .section .data
+ .long 0x9abcdef0
+
+ .section .bss
+ .long 0
new file mode 100644
@@ -0,0 +1,38 @@
+_start = 0x000000;
+
+SECTIONS
+{
+ . = 0x1000 + SIZEOF_HEADERS;
+
+ .header ALIGN (0x100) (READONLY) :
+ {
+ ASCII 16, "program name"
+ ASCII 64, "empty"
+ ASCII 4 * 8, "comment 1\n"
+ ASCII 32, "comment 2\n"
+ ASCII 32, "comment 3\n"
+ ASCII 24, "comment 4\n"
+ ASCII 64, "I meant to say: This is way too long"
+ }
+
+ .text ALIGN (0x100) :
+ {
+ entry = .;
+ *(.text)
+ }
+
+ .data : AT (0x400000)
+ {
+ *(.data)
+ }
+
+ . = ALIGN(0x20);
+
+ .bss :
+ {
+ *(.bss)
+ }
+
+ /DISCARD/ : { *(*) }
+}
+
@@ -228,6 +228,7 @@ foreach test_script $test_script_list {
}
run_dump_test "asciz"
+run_dump_test "ascii"
run_dump_test "align-with-input"
run_dump_test "pr20302"
run_dump_test "output-section-types"