Skip to content

Commit dee779f

Browse files
[libc][uefi] drop mingw compat in crt0
1 parent b12c594 commit dee779f

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

libc/startup/uefi/crt1.cpp

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,6 @@
1212
#include "include/llvm-libc-types/EFI_SYSTEM_TABLE.h"
1313
#include "src/__support/macros/config.h"
1414

15-
namespace LIBC_NAMESPACE_DECL {
16-
17-
using InitCallback = void(void);
18-
using FiniCallback = void(void);
19-
extern "C" InitCallback *__CTOR_LIST__[];
20-
extern "C" FiniCallback *__DTOR_LIST__[];
21-
22-
static void call_init_array_callbacks() {
23-
unsigned long nptrs = (unsigned long)__CTOR_LIST__[0];
24-
unsigned long i;
25-
26-
if (nptrs == ~0ul) {
27-
for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++)
28-
;
29-
}
30-
31-
for (i = nptrs; i >= 1; i--) {
32-
__CTOR_LIST__[i]();
33-
}
34-
}
35-
36-
static void call_fini_array_callbacks() {
37-
unsigned long nptrs = 0;
38-
39-
for (nptrs = 0; __DTOR_LIST__[nptrs + 1] != 0; nptrs++)
40-
;
41-
42-
for (unsigned long i = nptrs; i >= 1; i--) {
43-
__DTOR_LIST__[i]();
44-
}
45-
}
46-
} // namespace LIBC_NAMESPACE_DECL
47-
4815
EFI_HANDLE efi_image_handle;
4916
EFI_SYSTEM_TABLE *efi_system_table;
5017

@@ -55,11 +22,8 @@ extern "C" EFI_STATUS EfiMain(EFI_HANDLE ImageHandle,
5522
efi_image_handle = ImageHandle;
5623
efi_system_table = SystemTable;
5724

58-
LIBC_NAMESPACE::call_init_array_callbacks();
59-
6025
main(0, NULL, NULL);
6126

62-
LIBC_NAMESPACE::call_fini_array_callbacks();
6327
// TODO: convert the return value of main to EFI_STATUS
6428
return 0; // TODO: EFI_SUCCESS
6529
}

0 commit comments

Comments
 (0)