1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 19:27:45 +00:00

Kernel: Fix building the kernel with LTO

Fixes #8383.
This commit is contained in:
Gunnar Beutner 2021-07-02 15:48:22 +02:00 committed by Andreas Kling
parent 311b2c0720
commit 5666809889
2 changed files with 62 additions and 62 deletions

View file

@ -34,7 +34,7 @@ struct TrapFrame {
static_assert(TRAP_FRAME_SIZE == sizeof(TrapFrame)); static_assert(TRAP_FRAME_SIZE == sizeof(TrapFrame));
extern "C" void enter_trap_no_irq(TrapFrame* trap); extern "C" void enter_trap_no_irq(TrapFrame* trap) __attribute__((used));
extern "C" void enter_trap(TrapFrame*) __attribute__((used)); extern "C" void enter_trap(TrapFrame*) __attribute__((used));
extern "C" void exit_trap(TrapFrame*) __attribute__((used)); extern "C" void exit_trap(TrapFrame*) __attribute__((used));

View file

@ -96,7 +96,7 @@ static EntropySource s_entropy_source_interrupts { EntropySource::Static::Interr
#elif ARCH(X86_64) #elif ARCH(X86_64)
#define EH_ENTRY(ec, title) \ #define EH_ENTRY(ec, title) \
extern "C" void title##_asm_entry(); \ extern "C" void title##_asm_entry(); \
extern "C" void title##_handler(TrapFrame*); \ extern "C" void title##_handler(TrapFrame*) __attribute__((used)); \
asm( \ asm( \
".globl " #title "_asm_entry\n" \ ".globl " #title "_asm_entry\n" \
"" #title "_asm_entry: \n" \ "" #title "_asm_entry: \n" \
@ -128,7 +128,7 @@ static EntropySource s_entropy_source_interrupts { EntropySource::Static::Interr
" jmp common_trap_exit \n"); " jmp common_trap_exit \n");
#define EH_ENTRY_NO_CODE(ec, title) \ #define EH_ENTRY_NO_CODE(ec, title) \
extern "C" void title##_handler(TrapFrame*); \ extern "C" void title##_handler(TrapFrame*) __attribute__((used)); \
extern "C" void title##_asm_entry(); \ extern "C" void title##_asm_entry(); \
asm( \ asm( \
".globl " #title "_asm_entry\n" \ ".globl " #title "_asm_entry\n" \