mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
29 lines
398 B
ArmAsm
29 lines
398 B
ArmAsm
|
.text
|
||
|
.type selector, %function
|
||
|
foo:
|
||
|
movl $0, %eax
|
||
|
ret
|
||
|
selector:
|
||
|
.ifdef __x86_64__
|
||
|
leaq foo(%rip), %rax
|
||
|
.else
|
||
|
leal foo@GOTOFF(%eax), %eax
|
||
|
.endif
|
||
|
ret
|
||
|
.type selector, %gnu_indirect_function
|
||
|
.globl _start
|
||
|
_start:
|
||
|
.ifdef __x86_64__
|
||
|
movabs ptr, %rax
|
||
|
call *%rax
|
||
|
.else
|
||
|
mov ptr, %eax
|
||
|
call *%eax
|
||
|
.endif
|
||
|
ret
|
||
|
.data
|
||
|
.type ptr, @object
|
||
|
ptr:
|
||
|
.dc.a foo
|
||
|
.section .note.GNU-stack,"",@progbits
|