exposes _exit() as an alias to _Exit() to support the libSSP with GGC 14.1

This commit is contained in:
Yann MAGNIN 2024-05-12 12:47:31 +02:00 committed by Lephenixnoir
parent 46c73cbc87
commit 1a87c1eae2
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495
3 changed files with 10 additions and 0 deletions

View file

@ -190,6 +190,8 @@ set(SOURCES
src/stdlib/strtoll.c
src/stdlib/strtoul.c
src/stdlib/strtoull.c
# unistd
src/unistd/_exit.c
# string
src/string/memchr.c
src/string/memcmp.c

View file

@ -45,6 +45,10 @@ extern char *getcwd(char *__buf, size_t __size);
extern int chdir(char const *__path);
/* Exit immediately, bypassing exit handlers or signal handlers. */
__attribute__((noreturn))
extern void _exit(int __status);
/* Kernel-style functions supported only by Vhex. */

4
src/unistd/_exit.c Normal file
View file

@ -0,0 +1,4 @@
#include <unistd.h>
/* Exit immediately, bypassing exit handlers or signal handlers. */
void _exit(int status) __attribute__((alias("_Exit")));