setos

拙OS
Log | Files | Refs

commit d296bb5d11fa659ab4fa095e898d70e404bc22f6
parent 51f91c33f06f65e4bb43b4bb406b6cae61679dbb
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Fri, 15 Mar 2024 13:04:31 +0900

add ___chkstk_ms

Diffstat:
MMakefile | 2+-
Mhello.c | 2--
Mutils.c | 10++++++----
Mutils.h | 5+++--
4 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,5 +1,5 @@ CC = x86_64-w64-mingw32-gcc -CFLAGS = -shared -nostdlib -mno-red-zone -fno-stack-protector -Wall -e EfiMain +CFLAGS = -shared -nostdinc -nostdlib -mno-red-zone -fno-stack-protector -Wall -e EfiMain OBJCOPY = objcopy SRC = hello.c utils.c HDR = uefi.h diff --git a/hello.c b/hello.c @@ -1,8 +1,6 @@ #include "uefi.h" #include "utils.h" -#include <stddef.h> - EFI_STATUS EfiMain(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) { diff --git a/utils.c b/utils.c @@ -1,8 +1,6 @@ #include "uefi.h" #include "utils.h" -#include <stdio.h> - CHAR16 * sprinth(UINT64 n, CHAR16 s[19]) { @@ -19,4 +17,8 @@ sprinth(UINT64 n, CHAR16 s[19]) } s[19] = L'\0'; return s; -} -\ No newline at end of file +} + +void +___chkstk_ms(void) +{} +\ No newline at end of file diff --git a/utils.h b/utils.h @@ -3,4 +3,5 @@ // Printh converts the integer into a string of hex representation. // It returns the second argument. // The second argument should have length of 19 ("0x" + "0123456789abcdef" + "\0"). -CHAR16 *sprinth(UINT64, CHAR16[19]); -\ No newline at end of file +CHAR16 *sprinth(UINT64, CHAR16[19]); +void ___chkstk_ms(void); +\ No newline at end of file