1
2
3
4
5
6
7
8
9
10
11 .text
12 .align 4
13
14 .globl _start
15_start:
16 subq $8, %rsp
17
18 pushq %rcx
19 pushq %rdx
20
21 lea image_base(%rip), %rcx
22 lea _DYNAMIC(%rip), %rdx
23
24 call _relocate
25
26 popq %rdx
27 popq %rcx
28
29 testq %rax, %rax
30 jnz .exit
31
32 call efi_main
33.exit:
34 addq $8, %rsp
35
36 ret
37
38
39
40
41
42 .data
43dummy: .long 0
44
45#define IMAGE_REL_ABSOLUTE 0
46 .section .reloc, "a"
47label1:
48 .long dummy-label1
49 .long 10
50 .word (IMAGE_REL_ABSOLUTE << 12) + 0
51