test: nasm-t -- Add gotoff64 test

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2018-11-04 11:38:03 +03:00
parent 692ec9f8d2
commit 5eb6d35721
4 changed files with 44 additions and 0 deletions

22
travis/test/gotoff64.asm Normal file
View file

@ -0,0 +1,22 @@
bits 64
default rel
extern foo
mov r15,[foo wrt ..got]
lea r12,[foo wrt ..got]
%ifdef ERROR
lea rax,[foo wrt ..gotoff]
mov rax,[foo wrt ..gotoff]
%endif
default abs
mov r15,[foo wrt ..got]
lea r12,[foo wrt ..got]
mov rax,[qword foo wrt ..got]
%ifdef ERROR
lea rax,[foo wrt ..gotoff]
mov rax,[foo wrt ..gotoff]
%endif
mov rax,[qword foo wrt ..gotoff]

20
travis/test/gotoff64.json Normal file
View file

@ -0,0 +1,20 @@
[
{
"description": "Test .got offsets",
"id": "gotoff64",
"format": "elf64",
"source": "gotoff64.asm",
"target": [
{ "output": "gotoff64.o" }
]
},
{
"description": "Test errors in .got offsets",
"ref": "gotodd64",
"option": "-DERROR",
"target": [
{ "stderr": "gotoff64.stderr" }
],
"error": "expected"
}
]

BIN
travis/test/gotoff64.o.t Normal file

Binary file not shown.

View file

@ -0,0 +1,2 @@
nasm:fatal: no input file specified
type `nasm -h' for help