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