Test for various ELF64 GOT references
Try to test for various GOT references in ELF64. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
a3e57106fa
commit
b048324b9e
1 changed files with 25 additions and 0 deletions
25
test/gotoff64.asm
Normal file
25
test/gotoff64.asm
Normal file
|
@ -0,0 +1,25 @@
|
|||
;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]
|
Loading…
Reference in a new issue