minor update

This commit is contained in:
Blaise Tine 2024-08-03 18:25:24 -07:00
parent cb1e49d3f6
commit 668b590876
2 changed files with 5 additions and 1 deletions

View file

@ -51,8 +51,10 @@ _start:
# la t0, trap_entry
# csrw mtvec, t0
#ifdef HAVE_INITFINI_ARRAY
# run global initialization functions
call __libc_init_array
#endif
# call main program routine
call main

View file

@ -122,8 +122,10 @@ void __libc_fini_array (void) {
// This function will be called by LIBC at program exit.
// Since this platform only support statically linked programs,
// it is not required to support LIBC's exit functions registration via atexit().
void __funcs_on_exit() {
void __funcs_on_exit (void) {
#ifdef HAVE_INITFINI_ARRAY
__libc_fini_array();
#endif
}
#ifdef __cplusplus