mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-20 11:41:42 +00:00
Update userspace
This commit is contained in:
@@ -27,10 +27,11 @@ else ifeq ($(OSARCH), i386)
|
||||
ASM_ARCH := elf32
|
||||
endif
|
||||
|
||||
CFLAGS := -fvisibility=hidden -fPIC -I../include -I../../libc/include
|
||||
CFLAGS := -fvisibility=hidden -fPIC -I../include -I../../out/include
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -DDEBUG -ggdb3 -O0 -fdiagnostics-color=always -fverbose-asm
|
||||
LDFLAGS += -ggdb3 -O0
|
||||
endif
|
||||
|
||||
build: $(OBJECT_NAME)
|
||||
|
@@ -6,7 +6,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef PUBLIC
|
||||
#define PUBLIC __attribute__((visibility("default")))
|
||||
#endif // !PUBLIC
|
||||
@@ -26,19 +25,13 @@ static void __attribute__((constructor, no_stack_protector)) __guard_setup(void)
|
||||
PUBLIC __attribute__((weak, noreturn, no_stack_protector)) void __stack_chk_fail(void)
|
||||
{
|
||||
const char *msg = "Stack smashing detected";
|
||||
__asm__ __volatile__("syscall"
|
||||
:
|
||||
: "a"(0), "D"(0x57AC)
|
||||
: "rcx", "r11", "memory");
|
||||
exit(0x57AC);
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
PUBLIC __attribute__((weak, noreturn, no_stack_protector)) void __chk_fail(void)
|
||||
{
|
||||
const char *msg = "Buffer overflow detected";
|
||||
__asm__ __volatile__("syscall"
|
||||
:
|
||||
: "a"(0), "D"(0xF700)
|
||||
: "rcx", "r11", "memory");
|
||||
exit(0xF700);
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
Reference in New Issue
Block a user