From 2613e647fe30536936b947d1e2b671b35f9c64df Mon Sep 17 00:00:00 2001 From: MikeCAT Date: Mon, 29 Aug 2022 12:37:51 +0000 Subject: [PATCH] make onlyhlt be compiled to ELF --- apps/onlyhlt/.gitignore | 1 + apps/onlyhlt/Makefile | 9 +++------ apps/onlyhlt/onlyhlt.asm | 2 ++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/onlyhlt/.gitignore b/apps/onlyhlt/.gitignore index cddb46364..31d3ebc4f 100644 --- a/apps/onlyhlt/.gitignore +++ b/apps/onlyhlt/.gitignore @@ -1 +1,2 @@ /onlyhlt +/onlyhlt.o diff --git a/apps/onlyhlt/Makefile b/apps/onlyhlt/Makefile index 0942c6bdd..3cb72e68e 100644 --- a/apps/onlyhlt/Makefile +++ b/apps/onlyhlt/Makefile @@ -1,7 +1,4 @@ TARGET = onlyhlt - -.PHONY: all -all: $(TARGET) - -onlyhlt: onlyhlt.asm Makefile - nasm -f bin -o $@ $< +OBJS = onlyhlt.o +include ../Makefile.elfapp +OBJS = onlyhlt.o diff --git a/apps/onlyhlt/onlyhlt.asm b/apps/onlyhlt/onlyhlt.asm index f3b34cbc1..396e15f59 100644 --- a/apps/onlyhlt/onlyhlt.asm +++ b/apps/onlyhlt/onlyhlt.asm @@ -1,6 +1,8 @@ bits 64 section .text +global _start +_start: loop: hlt jmp loop