thanks mtasm

This commit is contained in:
Frans Kaashoek 2018-08-30 14:09:03 -04:00
parent 6710e5589d
commit 76d4005f9e
3 changed files with 10 additions and 2 deletions

View file

@ -82,6 +82,13 @@ ASFLAGS = -m32 -gdwarf-2 -Wa,-divide
# FreeBSD ld wants ``elf_i386_fbsd'' # FreeBSD ld wants ``elf_i386_fbsd''
LDFLAGS += -m $(shell $(LD) -V | grep elf_i386 2>/dev/null | head -n 1) LDFLAGS += -m $(shell $(LD) -V | grep elf_i386 2>/dev/null | head -n 1)
# Disable PIE when possible (for Ubuntu 16.10 toolchain)
ifneq ($(shell $(CC) -dumpspecs 2>/dev/null | grep -e '[^f]no-pie'),)
CFLAGS += -fno-pie -no-pie
endif
ifneq ($(shell $(CC) -dumpspecs 2>/dev/null | grep -e '[^f]nopie'),)
CFLAGS += -fno-pie -nopie
endif
xv6.img: bootblock kernel xv6.img: bootblock kernel
dd if=/dev/zero of=xv6.img count=10000 dd if=/dev/zero of=xv6.img count=10000

2
mmu.h
View file

@ -181,5 +181,3 @@ struct gatedesc {
#endif #endif
//PAGEBREAK!
// Blank page.

View file

@ -7,6 +7,7 @@ x86.h
asm.h asm.h
mmu.h mmu.h
elf.h elf.h
date.h
# entering xv6 # entering xv6
entry.S entry.S
@ -75,3 +76,5 @@ sh.c
bootasm.S bootasm.S
bootmain.c bootmain.c
# link
kernel.ld