mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 10:07:35 +00:00
Everywhere: Make some symbols __attribute__((used))
for LTO
With these changes, the userland builds correctly with Clang's ThinLTO enabled.
This commit is contained in:
parent
1faffc2192
commit
a8fefd89cd
5 changed files with 7 additions and 7 deletions
|
@ -19,8 +19,8 @@ extern size_t __stack_chk_guard;
|
|||
int main(int, char**, char**);
|
||||
|
||||
// Tell the compiler that this may be called from somewhere else.
|
||||
int _entry(int argc, char** argv, char** env);
|
||||
void _start(int, char**, char**);
|
||||
int _entry(int argc, char** argv, char** env) __attribute__((used));
|
||||
void _start(int, char**, char**) __attribute__((used));
|
||||
|
||||
NAKED void _start(int, char**, char**)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
extern "C" {
|
||||
|
||||
extern size_t __stack_chk_guard;
|
||||
size_t __stack_chk_guard = (size_t)0xc6c7c8c9;
|
||||
__attribute__((used)) size_t __stack_chk_guard = (size_t)0xc6c7c8c9;
|
||||
|
||||
__attribute__((noreturn)) void __stack_chk_fail()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue