diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2018-11-20 10:43:33 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2018-11-20 10:43:33 -0500 |
commit | 22615096dee294f63c6940c17f2a448da51d9197 (patch) | |
tree | cf38db8d010344e445210c35348ec457f33b7a7e /initrd | |
parent | e88b4f9040b63d70563bee8553596f3c317022a5 (diff) |
fs work, initrd/stdio
Diffstat (limited to 'initrd')
-rw-r--r-- | initrd/Makefile | 6 | ||||
-rwxr-xr-x | initrd/test | bin | 8060 -> 37024 bytes | |||
-rw-r--r-- | initrd/test.c | 8 |
3 files changed, 12 insertions, 2 deletions
diff --git a/initrd/Makefile b/initrd/Makefile index b2ca46f..705ac6c 100644 --- a/initrd/Makefile +++ b/initrd/Makefile @@ -1,4 +1,6 @@ all: - @arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -fsigned-char -Os -nostdinc \ + @arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -fsigned-char -Os \ + -nostdinc -nostdlib \ + -fdata-sections -ffunction-sections -Wl,--gc-sections \ -I../src/pdclib/include -I../src/pdclib/platform/stmos/include \ - test.c ../src/pdclib/pdclib.a -s -o test -pie + test.c ../src/pdclib/pdclib.a -s -o test diff --git a/initrd/test b/initrd/test Binary files differindex 8b9d8a4..7bf8246 100755 --- a/initrd/test +++ b/initrd/test diff --git a/initrd/test.c b/initrd/test.c index f673ce0..b79f315 100644 --- a/initrd/test.c +++ b/initrd/test.c @@ -1,4 +1,12 @@ #include <stdio.h> +#include <stdlib.h> + +int main(void); + +void _start(void) +{ + exit(main()); +} int main(void) { |