aboutsummaryrefslogtreecommitdiffstats
path: root/travis/test
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2018-11-11 16:11:57 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2018-11-11 21:43:46 +0300
commit7af13e04663c53d946889c619f33201f960b69fd (patch)
tree0ba38697e51f43374f5b3a10460a16103ac9c9f9 /travis/test
parent7fd2389637f7eaa5894259f4466e932f66ef50cf (diff)
downloadnasm-7af13e04663c53d946889c619f33201f960b69fd.tar.gz
nasm-7af13e04663c53d946889c619f33201f960b69fd.tar.xz
nasm-7af13e04663c53d946889c619f33201f960b69fd.zip
test: nasm-t -- Add multisection
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'travis/test')
-rw-r--r--travis/test/multisection-elf32.o.tbin0 -> 1680 bytes
-rw-r--r--travis/test/multisection-elf32.stderr1
-rw-r--r--travis/test/multisection-elf64.o.tbin0 -> 2320 bytes
-rw-r--r--travis/test/multisection-elf64.stderr1
-rw-r--r--travis/test/multisection.asm96
-rw-r--r--travis/test/multisection.bin.tbin0 -> 205 bytes
-rw-r--r--travis/test/multisection.json31
-rw-r--r--travis/test/multisection.stderr1
8 files changed, 130 insertions, 0 deletions
diff --git a/travis/test/multisection-elf32.o.t b/travis/test/multisection-elf32.o.t
new file mode 100644
index 00000000..0568615b
--- /dev/null
+++ b/travis/test/multisection-elf32.o.t
Binary files differ
diff --git a/travis/test/multisection-elf32.stderr b/travis/test/multisection-elf32.stderr
new file mode 100644
index 00000000..8a6df4b5
--- /dev/null
+++ b/travis/test/multisection-elf32.stderr
@@ -0,0 +1 @@
+./travis/test/multisection.asm:84: warning: uninitialized space declared in non-BSS section `.hmm': zeroing \ No newline at end of file
diff --git a/travis/test/multisection-elf64.o.t b/travis/test/multisection-elf64.o.t
new file mode 100644
index 00000000..64f250a5
--- /dev/null
+++ b/travis/test/multisection-elf64.o.t
Binary files differ
diff --git a/travis/test/multisection-elf64.stderr b/travis/test/multisection-elf64.stderr
new file mode 100644
index 00000000..8a6df4b5
--- /dev/null
+++ b/travis/test/multisection-elf64.stderr
@@ -0,0 +1 @@
+./travis/test/multisection.asm:84: warning: uninitialized space declared in non-BSS section `.hmm': zeroing \ No newline at end of file
diff --git a/travis/test/multisection.asm b/travis/test/multisection.asm
new file mode 100644
index 00000000..08b73199
--- /dev/null
+++ b/travis/test/multisection.asm
@@ -0,0 +1,96 @@
+;Testname=aout; Arguments=-faout -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
+;Testname=aoutb; Arguments=-faoutb -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
+;Testname=as86; Arguments=-fas86 -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
+;Testname=elf32; Arguments=-felf32 -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
+;Testname=elf64; Arguments=-felf64 -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
+;Testname=obj; Arguments=-fobj -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
+;Testname=rdf; Arguments=-frdf -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
+;Testname=win32; Arguments=-fwin32 -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
+;Testname=win64; Arguments=-fwin64 -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
+
+; To test where code that is placed before any explicit SECTION
+; gets placed, and what happens if a .text section has an ORG
+;statement, uncomment the following lines.
+;
+; times 10h nop
+;
+;section .text
+;org 0x300
+; times 20h inc ax
+
+; let's see which of these sections can be placed in the specified order.
+
+section .appspecific
+section .data
+section .stringdata
+section .mytext
+section .code
+section .extra_code
+
+
+section .stringdata
+mystr1: db "Hello, this is string 1", 13, 10, '$'
+
+section .extra_code
+;org 0x200
+bits 16
+more:
+ mov si, asciz1
+ mov ah, 0x0E
+ xor bx, bx
+.print:
+ lodsb
+ test al, al
+ jz .end
+ int 0x10
+ jmp short .print
+.end:
+
+ xor ax, ax
+ int 0x16
+
+ mov ax, 0x4c00
+ int 0x21
+
+section .appspecific
+asciz1: db "This is string 2", 0
+
+section .code
+;org 0x100
+bits 16
+
+start:
+ mov dx, mystr1
+ mov ah, 9
+ int 0x21
+
+ xor ax, ax
+ int 0x16
+
+ jmp more
+
+section .text
+ xor eax,eax
+ times 50h nop
+
+section .mytext
+
+ xor ebx,ebx
+
+section .data
+ db 95h,95h,95h,95h,95h,95h,95h,95h
+
+section .hmm
+ resd 2
+
+section .bss
+ resd 8
+
+section .final1
+ inc ax
+
+section .final2
+ inc bx
+
+section .final3
+ inc cx
diff --git a/travis/test/multisection.bin.t b/travis/test/multisection.bin.t
new file mode 100644
index 00000000..47933b3f
--- /dev/null
+++ b/travis/test/multisection.bin.t
Binary files differ
diff --git a/travis/test/multisection.json b/travis/test/multisection.json
new file mode 100644
index 00000000..61a04491
--- /dev/null
+++ b/travis/test/multisection.json
@@ -0,0 +1,31 @@
+[
+ {
+ "description": "Test mutlisecions (bin)",
+ "id": "multisection",
+ "format": "bin",
+ "source": "multisection.asm",
+ "option": "-Ox",
+ "target": [
+ { "output": "multisection.bin" },
+ { "stderr": "multisection.stderr" }
+ ]
+ },
+ {
+ "description": "Test mutlisecions (elf32)",
+ "ref": "multisection",
+ "format": "elf32",
+ "target": [
+ { "output": "multisection-elf32.o" },
+ { "stderr": "multisection-elf32.stderr" }
+ ]
+ },
+ {
+ "description": "Test mutlisecions (elf64)",
+ "ref": "multisection",
+ "format": "elf64",
+ "target": [
+ { "output": "multisection-elf64.o" },
+ { "stderr": "multisection-elf64.stderr" }
+ ]
+ }
+]
diff --git a/travis/test/multisection.stderr b/travis/test/multisection.stderr
new file mode 100644
index 00000000..56290201
--- /dev/null
+++ b/travis/test/multisection.stderr
@@ -0,0 +1 @@
+./travis/test/multisection.asm:84: warning: uninitialized space declared in .hmm section: zeroing \ No newline at end of file