This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "A pseudo Operating System for the Dreamcast.".
The branch, master has been updated
via ecbde5de56c6f7260afcaab0ad10b92295ba6bc7 (commit)
from 58f0f53e14c8df0c025385c49dd02ef63bd9bba6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ecbde5de56c6f7260afcaab0ad10b92295ba6bc7
Author: Falco Girgis <gyr...@gm...>
Date: Wed Jun 5 14:09:56 2024 -0500
Resolved symbols when using LTO w/o -fno-builtins (#560)
- LTO without -fno-builtins in the environ.sh has been broken for awhile
- A slew of unresolved symbol errors are reported at linker time
- Had to manually include them within libkallisti.a via adding the
__used pragma to their definitions.
- Confirmed to resolve the issue with GCC-14.1.0.
-----------------------------------------------------------------------
Summary of changes:
kernel/libc/koslib/assert.c | 4 ++--
kernel/libc/newlib/newlib_exit.c | 2 +-
kernel/libc/newlib/newlib_malloc.c | 13 ++++++++-----
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/kernel/libc/koslib/assert.c b/kernel/libc/koslib/assert.c
index 5bf4f618..f566e4be 100644
--- a/kernel/libc/koslib/assert.c
+++ b/kernel/libc/koslib/assert.c
@@ -45,11 +45,11 @@ assert_handler_t assert_set_handler(assert_handler_t hnd) {
return rv;
}
-void __assert(const char *file, int line, const char *expr, const char *msg, const char *func) {
+__used void __assert(const char *file, int line, const char *expr, const char *msg, const char *func) {
if(a_hnd != NULL)
a_hnd(file, line, expr, msg, func);
}
-void __assert_func(const char *file, int line, const char *func, const char *expr) {
+__used void __assert_func(const char *file, int line, const char *func, const char *expr) {
__assert(file, line, expr, NULL, func);
}
diff --git a/kernel/libc/newlib/newlib_exit.c b/kernel/libc/newlib/newlib_exit.c
index c8379532..a2d8a56c 100644
--- a/kernel/libc/newlib/newlib_exit.c
+++ b/kernel/libc/newlib/newlib_exit.c
@@ -21,7 +21,7 @@ static void kos_shutdown(void) {
KOS_INIT_FLAG_WEAK(kos_shutdown, true);
-void _exit(int code) {
+__used void _exit(int code) {
ret_code = code;
KOS_INIT_FLAG_CALL(kos_shutdown);
diff --git a/kernel/libc/newlib/newlib_malloc.c b/kernel/libc/newlib/newlib_malloc.c
index e97bc2a9..ec16315b 100644
--- a/kernel/libc/newlib/newlib_malloc.c
+++ b/kernel/libc/newlib/newlib_malloc.c
@@ -1,7 +1,7 @@
/* KallistiOS ##version##
newlib_malloc.c
- Copyright (C)2004 Megan Potter
+ Copyright (C) 2004 Megan Potter
*/
@@ -10,19 +10,22 @@
// We have to provide these for Newlib's reent pieces.
-void _free_r(struct _reent * re, void *ptr) {
+__used void _free_r(struct _reent *re, void *ptr) {
(void)re;
free(ptr);
}
-void * _malloc_r(struct _reent * re, size_t amt) {
+
+__used void *_malloc_r(struct _reent *re, size_t amt) {
(void)re;
return malloc(amt);
}
-void * _calloc_r(struct _reent * re, size_t nmemb, size_t size) {
+
+__used void *_calloc_r(struct _reent *re, size_t nmemb, size_t size) {
(void)re;
return calloc(nmemb, size);
}
-void * _realloc_r(struct _reent * re, void * ptr, size_t size) {
+
+__used void *_realloc_r(struct _reent *re, void *ptr, size_t size) {
(void)re;
return realloc(ptr, size);
}
hooks/post-receive
--
A pseudo Operating System for the Dreamcast.
|