mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +00:00
Kernel: Enable building the kernel with -flto
GCC with -flto is more aggressive when it comes to inlining and discarding functions which is why we must mark some of the functions as NEVER_INLINE (because they contain asm labels which would be duplicated in the object files if the compiler decides to inline the function elsewhere) and __attribute__((used)) for others so that GCC doesn't discard them.
This commit is contained in:
parent
b861259098
commit
55ae52fdf8
9 changed files with 57 additions and 57 deletions
|
@ -256,7 +256,7 @@ Process::~Process()
|
|||
}
|
||||
|
||||
// Make sure the compiler doesn't "optimize away" this function:
|
||||
extern void signal_trampoline_dummy();
|
||||
extern void signal_trampoline_dummy() __attribute__((used));
|
||||
void signal_trampoline_dummy()
|
||||
{
|
||||
#if ARCH(I386)
|
||||
|
@ -287,7 +287,7 @@ void signal_trampoline_dummy()
|
|||
#endif
|
||||
}
|
||||
|
||||
extern "C" void asm_signal_trampoline(void);
|
||||
extern "C" void asm_signal_trampoline(void) __attribute__((used));
|
||||
extern "C" void asm_signal_trampoline_end(void);
|
||||
|
||||
void create_signal_trampoline()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue