mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-27 08:10:07 +08:00
26 lines
535 B
NASM
26 lines
535 B
NASM
|
;Testname=noerr; Arguments=-felf64 -ogotoff64.o; Files=stdout stderr gotoff64.o
|
||
|
;Testname=err; Arguments=-DERROR -felf64 -ogotoff64.o; Files=stdout stderr gotoff64.o
|
||
|
|
||
|
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]
|