newlib: No use crt0

Since crt0 cannot be separated from newlib,
there is no point in having it separately.

Signed-off-by: Max Logaev <maxlogaev@proton.me>
This commit is contained in:
2026-01-16 18:45:02 +03:00
parent e2729157e4
commit 419c67b51a
4 changed files with 19 additions and 6 deletions

View File

@@ -431,7 +431,7 @@ fi
case "${host}" in
i[3-7]86-*-kolibrios*)
sys_dir=kolibrios
have_crt0="yes"
have_crt0="no"
;;
*-*-cygwin*)
posix_dir=posix

View File

@@ -37,7 +37,7 @@ struct menuet02_header
/**
* Symbol exported by the linker script for quick access
*/
__attribute__ ((noreturn)) void ___kosapp_entry (void);
__attribute__ ((noreturn)) void __kosapp_entry (void);
extern char __kosapp_image_end[];
extern char __kosapp_memsize[];
extern char __kosapp_stack_low[];

View File

@@ -3,10 +3,25 @@
* Copyright (C) 2026 KolibriOS team
*/
extern int __init_reent (void);
#include <kolibrios/app.h>
#include <stdlib.h>
extern void __init_reent (void);
extern int main (int argc, char *argv[], char *envp[]);
void
__libc_init (void)
__kosapp_entry (void)
{
int rc = 0;
int argc = 0;
char **argv = NULL;
char **envp = NULL;
__init_reent ();
rc = main (argc, argv, envp);
exit (rc);
__builtin_unreachable ();
}

View File

@@ -1,7 +1,5 @@
ENTRY(___kosapp_entry)
STARTUP(crt0.o)
SECTIONS
{
.text 0x0: