libgloss: csky: use atexit to call fini-array functions.
__libc_fini_array should be called upon exit to call the global termination functions in fini-array, use atexit to register it at __start.
This commit is contained in:
parent
3ef006f056
commit
7f4c04755e
|
@ -150,6 +150,8 @@ __start:
|
|||
* Assember start up done, C codes start here.
|
||||
*/
|
||||
__goto_c:
|
||||
lrw r0, __libc_fini_array # Register global termination functions
|
||||
jbsr atexit # to be called upon exit
|
||||
/*jsri main*/
|
||||
lrw r5, __libc_init_array
|
||||
jsr r5
|
||||
|
|
Loading…
Reference in New Issue