mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-25 18:10:23 +08:00
test: nasm-t -- Add gotoff64 test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
692ec9f8d2
commit
5eb6d35721
22
travis/test/gotoff64.asm
Normal file
22
travis/test/gotoff64.asm
Normal 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
20
travis/test/gotoff64.json
Normal 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
BIN
travis/test/gotoff64.o.t
Normal file
Binary file not shown.
2
travis/test/gotoff64.stderr
Normal file
2
travis/test/gotoff64.stderr
Normal file
@ -0,0 +1,2 @@
|
||||
nasm:fatal: no input file specified
|
||||
type `nasm -h' for help
|
Loading…
x
Reference in New Issue
Block a user