diff --git a/Kernel/_fs_contents b/Kernel/_fs_contents index 2d8bec64f7..fb6d9448f3 100644 Binary files a/Kernel/_fs_contents and b/Kernel/_fs_contents differ diff --git a/Kernel/init.cpp b/Kernel/init.cpp index 844a7107f8..238f6d4253 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -150,14 +150,14 @@ static void init_stage2() #ifdef TEST_ELF_LOADER { - auto testExecutable = vfs->open("/_test.o"); + auto testExecutable = vfs->open("/bin/id"); ASSERT(testExecutable); auto testExecutableData = testExecutable->readEntireFile(); ASSERT(testExecutableData); ExecSpace space; space.loadELF(move(testExecutableData)); - auto* elf_entry = space.symbolPtr("elf_entry"); + auto* elf_entry = space.symbolPtr("_start"); ASSERT(elf_entry); typedef int (*MainFunctionPtr)(void); diff --git a/LibC/stdio.cpp b/LibC/stdio.cpp index c8b03a9f9e..dd5b26f9a5 100644 --- a/LibC/stdio.cpp +++ b/LibC/stdio.cpp @@ -3,14 +3,13 @@ #include "types.h" #include -template -int printHex(PutChFunc putch, char*& bufptr, dword number, byte fields) -{ - static const char h[] = { - '0','1','2','3','4','5','6','7', - '8','9','a','b','c','d','e','f' - }; +#define ALWAYS_INLINE __attribute__ ((always_inline)) +static const char h[] = { '0','1','2','3','4','5','6','7', '8','9','a','b','c','d','e','f' }; + +template +ALWAYS_INLINE int printHex(PutChFunc putch, char*& bufptr, dword number, byte fields) +{ int ret = 0; byte shr_count = fields * 4; while (shr_count) { @@ -22,7 +21,7 @@ int printHex(PutChFunc putch, char*& bufptr, dword number, byte fields) } template -int printNumber(PutChFunc putch, char*& bufptr, dword number) +ALWAYS_INLINE int printNumber(PutChFunc putch, char*& bufptr, dword number) { dword divisor = 1000000000; char ch; @@ -49,7 +48,7 @@ int printNumber(PutChFunc putch, char*& bufptr, dword number) } template -static int printSignedNumber(PutChFunc putch, char*& bufptr, int number) +ALWAYS_INLINE int printSignedNumber(PutChFunc putch, char*& bufptr, int number) { if (number < 0) { putch(bufptr, '-'); diff --git a/Userland/Makefile b/Userland/Makefile index 89aaa30237..a3506661b3 100644 --- a/Userland/Makefile +++ b/Userland/Makefile @@ -18,7 +18,7 @@ CXXFLAGS = $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(USERLAND_FLAGS) $(FLAVOR_FLA CXX = g++ LD = ld AR = ar -LDFLAGS = --strip-debug -melf_i386 --gc-sections --build-id=none -z norelro -z now +LDFLAGS = -r -static --strip-debug -melf_i386 --build-id=none -z norelro -z now -e _start all: $(OBJS) $(APPS)