From f5e48e94a2f4d4bbd6e5628c7f2afafc6dbcc459 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 7 Mar 2024 17:28:52 -0500 Subject: build: Build mlibc + add distclean target Signed-off-by: Ian Moffett --- lib/mlibc/sysdeps/linux/generic/entry.cpp | 38 ------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 lib/mlibc/sysdeps/linux/generic/entry.cpp (limited to 'lib/mlibc/sysdeps/linux/generic/entry.cpp') diff --git a/lib/mlibc/sysdeps/linux/generic/entry.cpp b/lib/mlibc/sysdeps/linux/generic/entry.cpp deleted file mode 100644 index aa049ce..0000000 --- a/lib/mlibc/sysdeps/linux/generic/entry.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -#include -#include -#include - -// defined by the POSIX library -void __mlibc_initLocale(); - -extern "C" uintptr_t *__dlapi_entrystack(); -extern "C" void __dlapi_enter(uintptr_t *); - -extern char **environ; -static mlibc::exec_stack_data __mlibc_stack_data; - -size_t __hwcap; - -struct LibraryGuard { - LibraryGuard(); -}; - -static LibraryGuard guard; - -LibraryGuard::LibraryGuard() { - __mlibc_initLocale(); - - // Parse the exec() stack. - mlibc::parse_exec_stack(__dlapi_entrystack(), &__mlibc_stack_data); - mlibc::set_startup_data(__mlibc_stack_data.argc, __mlibc_stack_data.argv, - __mlibc_stack_data.envp); -} - -extern "C" void __mlibc_entry(uintptr_t *entry_stack, int (*main_fn)(int argc, char *argv[], char *env[])) { - __dlapi_enter(entry_stack); - __hwcap = getauxval(AT_HWCAP); - auto result = main_fn(__mlibc_stack_data.argc, __mlibc_stack_data.argv, environ); - exit(result); -} -- cgit v1.2.3