1
0
Fork 0
mirror of https://github.com/tailix/loadwarka.git synced 2024-12-09 14:08:20 -05:00

Add main module

This commit is contained in:
Alex Kotov 2022-01-28 00:49:04 +05:00
parent 08af13d2f7
commit f7de862e65
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
3 changed files with 11 additions and 1 deletions

View file

@ -10,13 +10,14 @@ STAGE1_LDFLAGS='--defsym=program_start=0x7c00'
STAGE2_LDFLAGS='--defsym=program_start=0x7e00'
STAGE1_OBJS="$SRC/common.o $SRC/stage1.o"
STAGE2_OBJS="$SRC/common.o $SRC/stage2.o"
STAGE2_OBJS="$SRC/common.o $SRC/stage2.o $SRC/main.o"
./clean.sh
${CROSS}gcc -c $SRC/common.S -o $SRC/common.o
${CROSS}gcc -c $SRC/stage1.S -o $SRC/stage1.o
${CROSS}gcc -c $SRC/stage2.S -o $SRC/stage2.o
${CROSS}gcc -c $SRC/main.c -o $SRC/main.o
${CROSS}ld -T$SRC/linker.ld -o $SRC/stage1.bin $STAGE1_LDFLAGS $STAGE1_OBJS
${CROSS}ld -T$SRC/linker.ld -o $SRC/stage2.bin $STAGE2_LDFLAGS $STAGE2_OBJS

7
src/x86/main.c Normal file
View file

@ -0,0 +1,7 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
int main()
{
}

View file

@ -21,4 +21,6 @@ _start:
mov $newline, %si
call print_str
call main
ljmp $0, $hang