Factor common userland and baremetal C functions

This allows add.c to run unmodified on both!

For that to work, use int main on baremetal, and pass the return value to
the final exit.
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-11-15 00:00:00 +00:00
parent ecc2a21b57
commit 26b890f42f
26 changed files with 87 additions and 52 deletions

View File

@@ -1,6 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
void main(void) {
int main(void) {
exit(1);
}