diff options
| author | Tianhao Wang <shrik3@mailbox.org> | 2024-04-18 03:58:03 +0200 |
|---|---|---|
| committer | Tianhao Wang <shrik3@mailbox.org> | 2024-06-11 15:16:34 +0200 |
| commit | 0de4e7d36430ea52b21e7b12d69605569bc986e7 (patch) | |
| tree | 4bef59d52b058b25e89ab401b60c1170d1459d46 | |
| parent | 0614eb0a414311e652391d1eb08b97e1129871c2 (diff) | |
nasm: ignore zeroing warning
When using `resb` outside of a BSS section, nasm will yell at you. But
we know what we are doing! We never expect zero-init for such reserved
spaces!
| -rw-r--r-- | Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -18,9 +18,10 @@ BUILD = build ARCH = x86_64 ASM = nasm ASMOBJFORMAT = elf64 +ASMFLAGS = -w-zeroing LINKER_SCRIPT = ./defs/$(ARCH)-linker.ld CARGO_XBUILD_TARGET = ./defs/$(ARCH)-rustubs.json -CARGO_XBUILD_FLAGS = +CARGO_XBUILD_FLAGS = --release # ---------- No need to edit below this line -------------- # ---------- If you have to, something is wrong ----------- ASM_SOURCES = $(shell find ./src -name "*.s") @@ -53,7 +54,7 @@ $(BUILD)/kernel : rust_kernel startup.o $(ASMOBJ_PREFIXED) $(BUILD)/_%.o : %.s | $(BUILD) @echo "ASM $@" @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi - $(VERBOSE) $(ASM) -f $(ASMOBJFORMAT) -o $@ $< + $(VERBOSE) $(ASM) -f $(ASMOBJFORMAT) $(ASMFLAGS) -o $@ $< # install xbuild first. (cargo install xbuild) @@ -66,7 +67,7 @@ rust_kernel: check # TODO make this arch dependent startup.o: boot/startup-$(ARCH).s | $(BUILD) @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi - nasm -f elf64 -o $(BUILD)/startup.o boot/startup-$(ARCH).s + $(VERBOSE) $(ASM) -f $(ASMOBJFORMAT) $(ASMFLAGS) -o $(BUILD)/startup.o boot/startup-$(ARCH).s .PHONY: $(BUILD) $(BUILD): |
