From 08d66341b68d75788ea9c715935b50ebfb36c8e2 Mon Sep 17 00:00:00 2001 From: ashmew2 Date: Sun, 21 May 2017 10:01:10 +0000 Subject: [PATCH] Tell the user via BOARD if load_libc() failed git-svn-id: svn://kolibrios.org@6902 a494cfbc-eb01-0410-851d-a64ba20cac60 --- contrib/toolchain/gcc/5x/libgcc/config/i386/kos32-app.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/toolchain/gcc/5x/libgcc/config/i386/kos32-app.c b/contrib/toolchain/gcc/5x/libgcc/config/i386/kos32-app.c index 94b5c0dde5..de291bb681 100644 --- a/contrib/toolchain/gcc/5x/libgcc/config/i386/kos32-app.c +++ b/contrib/toolchain/gcc/5x/libgcc/config/i386/kos32-app.c @@ -21,6 +21,14 @@ __crt_startup (void) if(!img) { + // Inform the user via BOARD that libc could not be loaded. + char *errormsg = "[ERROR] libc.dll failed to load. is /kolibrios folder configured?\n"; + while (*errormsg) { + __asm__ __volatile__("int $0x40"::"a"(63), "b"(1), "c"(*errormsg)); + ++errormsg; + } + + // Exit asm ("int $0x40" ::"a"(-1)); };