Add: userland hello world code

This commit is contained in:
brice.boisson
2023-10-11 09:38:29 +09:00
parent 917988e871
commit 37dbb99f50
3 changed files with 13 additions and 2 deletions

View File

@@ -11,8 +11,8 @@ install:
bin:
$(MAKE) -C $(LIB)
gcc -c test.c -Ilibk -Llibk -lk -m32
ld -m elf_i386 -Ttext=0x6000000 --entry=main test.o -L./libk/ -lk
gcc -c ./app/$(APP).c -Ilibk -Llibk -lk -m32
ld -m elf_i386 -Ttext=0x6000000 --entry=main ./$(APP).o -L./libk/ -lk
objcopy --input binary --output elf32-i386 --binary-architecture i386 --rename-section .data=.rodata,CONTENTS,ALLOC,LOAD,READONLY,DATA a.out myfile.o
cp myfile.o $(SOURCEDIR)/myfile.o