mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-03 03:19:16 +00:00
feat(userspace/libc): support for linux target
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -1,18 +1,18 @@
|
||||
/*
|
||||
This file is part of Fennix Userspace.
|
||||
This file is part of Fennix C Library.
|
||||
|
||||
Fennix Userspace is free software: you can redistribute it and/or
|
||||
Fennix C Library is free software: you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
Fennix Userspace is distributed in the hope that it will be useful,
|
||||
Fennix C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Fennix Userspace. If not, see <https://www.gnu.org/licenses/>.
|
||||
along with Fennix C Library. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
typedef void (*fct)(void);
|
||||
@ -39,7 +39,6 @@ void __crt_fini_array(void)
|
||||
|
||||
__attribute__((naked, used, no_stack_protector, section(".text"))) void _start()
|
||||
{
|
||||
#if defined(__amd64__)
|
||||
asm("xor %rbp, %rbp\n"
|
||||
"andq $-16, %rsp\n"
|
||||
"movq %rsp, %rbp\n"
|
||||
@ -67,15 +66,6 @@ __attribute__((naked, used, no_stack_protector, section(".text"))) void _start()
|
||||
|
||||
"movl %eax, %edi\n"
|
||||
"call _exit\n");
|
||||
#elif defined(__i386__)
|
||||
#warning "i386 _start not implemented"
|
||||
#elif defined(__arm__)
|
||||
#warning "arm _start not implemented"
|
||||
#elif defined(__aarch64__)
|
||||
#warning "aarch64 _start not implemented"
|
||||
#else
|
||||
#error "Unsupported architecture"
|
||||
#endif
|
||||
}
|
||||
|
||||
/* These are declared in GNU ld */
|
||||
|
Reference in New Issue
Block a user