.long   __pecoff_code_size              @ SizeOfCode
                .long   __pecoff_data_size              @ SizeOfInitializedData
                .long   0                               @ SizeOfUninitializedData
-               .long   efi_entry - start               @ AddressOfEntryPoint
+               .long   efi_pe_entry - start            @ AddressOfEntryPoint
                .long   start_offset                    @ BaseOfCode
                .long   __pecoff_data_start - start     @ BaseOfData
 
 
 
 SYM_CODE_START(efi_enter_kernel)
        /*
-        * efi_entry() will have copied the kernel image if necessary and we
+        * efi_pe_entry() will have copied the kernel image if necessary and we
         * end up here with device tree address in x1 and the kernel entry
         * point stored in x0. Save those values in registers which are
         * callee preserved.
 
        .long   __initdata_begin - efi_header_end       // SizeOfCode
        .long   __pecoff_data_size                      // SizeOfInitializedData
        .long   0                                       // SizeOfUninitializedData
-       .long   __efistub_efi_entry - _head             // AddressOfEntryPoint
+       .long   __efistub_efi_pe_entry - _head          // AddressOfEntryPoint
        .long   efi_header_end - _head                  // BaseOfCode
 
 extra_header_fields:
 
  * for both archictectures, with the arch-specific code provided in the
  * handle_kernel_image() function.
  */
-efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg)
+efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
+                                  efi_system_table_t *sys_table_arg)
 {
        efi_loaded_image_t *image;
        efi_status_t status;
 
 
 extern const efi_system_table_t *efi_system_table;
 
+efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
+                                  efi_system_table_t *sys_table_arg);
+
 #ifndef ARCH_HAS_EFISTUB_WRAPPERS
 
 #define efi_is_native()                (true)