1
2
3
4
5
6
7
8
9
10
11 .text
12 .align 4
13
14 .globl _start
15_start:
16 pushl %ebp
17 movl %esp,%ebp
18
19 pushl 12(%ebp)
20 pushl 8(%ebp)
21
22 call 0f
230: popl %eax
24 movl %eax,%ebx
25
26 addl $image_base-0b,%eax
27 addl $_DYNAMIC-0b,%ebx
28
29 pushl %ebx
30 pushl %eax
31 call _relocate
32 popl %ebx
33 popl %ebx
34 testl %eax,%eax
35 jne .exit
36 call efi_main
37
38.exit: leave
39 ret
40
41
42
43
44
45 .data
46dummy: .long 0
47
48#define IMAGE_REL_ABSOLUTE 0
49 .section .reloc
50 .long dummy
51 .long 10
52 .word (IMAGE_REL_ABSOLUTE << 12) + 0
53