Code: Select all
nasm -f elf -o /boot/stub.o /boot/stub.asm
make: *** [boot/stub.o] Segmentation Fault
make: *** Deleting file 'boot/stub.o'
What would cause a segmentation fault and what is it?
If you need to see code, then just ask!
Code: Select all
nasm -f elf -o /boot/stub.o /boot/stub.asm
make: *** [boot/stub.o] Segmentation Fault
make: *** Deleting file 'boot/stub.o'
What would cause a segmentation fault and what is it?
If you need to see code, then just ask!
Tried it and didn't change a thing.(isn't it -felf rather than -f elf ?)
Code: Select all
# Basic Makefile for IBOX OS, Ver 0.01, Date: 04/22/03 1:14 PM
# Name of IBOX OS Kernel
KERNEL_NAME = ibox.img
# C compiler to use
CC = gcc # Changing this may cause problems
CFLAGS = -c -Wall -I./include/ # Arguments given to GCC
# Assembler to use
NASM = nasm # Assembler has to support Intel Syntax
NASMFLAGS = -f elf # Compile to elf
# Linker to use
LD = ld # We're using the GNU Linker
LDFLAGS = -T linker.d -o $(KERNEL_NAME)
# Add the rest of the C files to this list
OBJS = boot/stub.o kernel/kernel.o kernel/stdio.o /kernel/8259.o /kernel/timer.o /kernel/io.o /kernel/exceptions.o /boot/handlers.o
all: $(KERNEL_NAME)
install:
# This will install the kernel to a Floppy Disk
mount /floppy/
cp $(KERNEL_NAME) /floppy/
umount /floppy/
clean:
rm $(OBJS)
# Compile all assembler files
%.o : %.asm
$(NASM) $(NASMFLAGS) -o $@ $<
# Compile all C files
%.o : %.c
$(CC) $(CFLAGS) -o $@ $<
# Link them all together
$(KERNEL_NAME): $(OBJS)
$(LD) $(LDFLAGS) $(OBJS)
Code: Select all
%REP
...
%ENDREP ;; pype's internal assembler running on /dev/brain says "rep how many times ?"