* General practices
@ 2019-09-16 16:14 Steven Abner
0 siblings, 0 replies; only message in thread
From: Steven Abner @ 2019-09-16 16:14 UTC (permalink / raw)
To: newlib
Need some help:
I've gone through several of libgloss crt0 files, normally create code
on the mac, love the editor!
Seen that Newlib has switched to 'FreeBSD' style FILE unit.
With the basic intro out of the way... the question is: from _start to
main(), the normal 'return' from
main() dumps you back to _start from which I assume Newlib has a
standard expected termination
of the process. Correct assumption? And is this expectation that of
calling the 'exit' function?
The reason for this question is that the APPLE FreeBSD style does call
'exit' which allows for clean
up, such as flushing files, calling atexit(), etc. and lunix does not
allow for such a clean up using
'return' from main(). Maybe I just misunderstand the 'C' process?
Thanks in advance, and hopefully down the road I can offer up a
smaller, embedded type FILE unit,
if I can work out the return vs. exit clean up. Not sure people want to
stop using return for exit just
to flush stdout.
Steve
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-16 16:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-16 16:14 General practices Steven Abner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).