added no_stack_protector attribute to functions

This commit is contained in:
Alex 2022-10-16 21:25:11 +03:00
parent 5f03d287d3
commit d35b4de246
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
3 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,7 @@ namespace GlobalDescriptorTable
0, 0,
}; };
void Init(int Core) __attribute__((no_stack_protector)) void Init(int Core)
{ {
CPU::x64::lgdt(&gdt); CPU::x64::lgdt(&gdt);

View File

@ -53,13 +53,13 @@ void UserModeExceptionHandler(CPU::x64::TrapFrame *Frame);
namespace CrashHandler namespace CrashHandler
{ {
void printfWrapper(char c, void *unused) __attribute__((no_stack_protector)) void printfWrapper(char c, void *unused)
{ {
Display->Print(c, 255, true); Display->Print(c, 255, true);
UNUSED(unused); UNUSED(unused);
} }
void EHPrint(const char *Format, ...) __attribute__((no_stack_protector)) void EHPrint(const char *Format, ...)
{ {
va_list args; va_list args;
va_start(args, Format); va_start(args, Format);
@ -67,7 +67,7 @@ namespace CrashHandler
va_end(args); va_end(args);
} }
void Handle(void *Data) __attribute__((no_stack_protector)) void Handle(void *Data)
{ {
CPU::Interrupts(CPU::Disable); CPU::Interrupts(CPU::Disable);

View File

@ -16,7 +16,7 @@
#include "../crashhandler.hpp" #include "../crashhandler.hpp"
#include "../kernel.h" #include "../kernel.h"
extern "C" void ExceptionHandler(void *Data) { CrashHandler::Handle(Data); } extern "C" __attribute__((no_stack_protector)) void ExceptionHandler(void *Data) { CrashHandler::Handle(Data); }
namespace Interrupts namespace Interrupts
{ {