Revert "decompressor: Use as instead of nasm"

This reverts commit 39559b39ff.
This commit is contained in:
mintsuki 2022-05-19 20:12:48 +02:00
parent 688c118caa
commit 1f1cad1a25
3 changed files with 22 additions and 18 deletions

View File

@ -52,8 +52,8 @@ override INTERNAL_LDFLAGS := \
-Tlinker.ld -Tlinker.ld
override C_FILES := $(shell find ./ -type f -name '*.c') override C_FILES := $(shell find ./ -type f -name '*.c')
override ASM_FILES := $(shell find ./ -type f -name '*.S') override ASM_FILES := $(shell find ./ -type f -name '*.asm')
override OBJ := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(ASM_FILES:.S=.o) $(C_FILES:.c=.o)) override OBJ := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(ASM_FILES:.asm=.o) $(C_FILES:.c=.o))
override HEADER_DEPS := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(C_FILES:.c=.d)) override HEADER_DEPS := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(C_FILES:.c=.d))
.PHONY: all .PHONY: all
@ -83,9 +83,9 @@ $(call MKESCAPE,$(BUILDDIR))/%.o: %.c $(call MKESCAPE,$(BUILDDIR))/tinf-copied
mkdir -p "$$(dirname '$(call SHESCAPE,$@)')" mkdir -p "$$(dirname '$(call SHESCAPE,$@)')"
$(LIMINE_CC) $(LIMINE_CFLAGS) -Os $(INTERNAL_CFLAGS) -c '$(call SHESCAPE,$<)' -o '$(call SHESCAPE,$@)' $(LIMINE_CC) $(LIMINE_CFLAGS) -Os $(INTERNAL_CFLAGS) -c '$(call SHESCAPE,$<)' -o '$(call SHESCAPE,$@)'
$(call MKESCAPE,$(BUILDDIR))/%.o: %.S $(call MKESCAPE,$(BUILDDIR))/%.o: %.asm
mkdir -p "$$(dirname '$(call SHESCAPE,$@)')" mkdir -p "$$(dirname '$(call SHESCAPE,$@)')"
$(LIMINE_CC) $(LIMINE_CFLAGS) -Os $(INTERNAL_CFLAGS) -c '$(call SHESCAPE,$<)' -o '$(call SHESCAPE,$@)' nasm '$(call SHESCAPE,$<)' -f elf32 -o '$(call SHESCAPE,$@)'
.PHONY: clean .PHONY: clean
clean: clean:

View File

@ -1,14 +0,0 @@
.section .entry
.globl _start
_start:
cld
// Zero out .bss
xor %al, %al
mov $bss_begin, %edi
mov $bss_end, %ecx
sub $bss_begin, %ecx
rep stosb
jmp entry

18
decompressor/entry.asm Normal file
View File

@ -0,0 +1,18 @@
extern bss_begin
extern bss_end
extern entry
section .entry
global _start
_start:
cld
; Zero out .bss
xor al, al
mov edi, bss_begin
mov ecx, bss_end
sub ecx, bss_begin
rep stosb
jmp entry