1 /* SPDX-License-Identifier: BSD-3-Clause */
3 * crt0-efi-ia32.S - x86 EFI startup code.
5 * Copyright (C) 1999 Hewlett-Packard Co.
6 * Contributed by David Mosberger <davidm@hpl.hp.com>.
18 pushl 12(%ebp) # copy "image" argument
19 pushl 8(%ebp) # copy "systab" argument
25 addl $image_base-0b,%eax # %eax = ldbase
26 addl $_DYNAMIC-0b,%ebx # %ebx = _DYNAMIC
28 pushl %ebx # pass _DYNAMIC as second argument
29 pushl %eax # pass ldbase as first argument
35 call efi_main # call app with "image" and "systab" argument
41 * hand-craft a dummy .reloc section so EFI knows it's a relocatable
47 #define IMAGE_REL_ABSOLUTE 0
49 .long dummy /* Page RVA */
50 .long 10 /* Block Size (2*4+2) */
51 .word (IMAGE_REL_ABSOLUTE << 12) + 0 /* reloc for dummy */