summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2018-08-30 14:09:03 -0400
committerFrans Kaashoek <[email protected]>2018-08-30 14:10:27 -0400
commit76d4005f9e36fcb3b62b607353fd9baeae51232b (patch)
tree29d6fc8f092274818825fdff8ea77c0e22132cfe
parent6710e5589d192789fe1e4b5ad7598309d88ebd79 (diff)
downloadxv6-labs-76d4005f9e36fcb3b62b607353fd9baeae51232b.tar.gz
xv6-labs-76d4005f9e36fcb3b62b607353fd9baeae51232b.tar.bz2
xv6-labs-76d4005f9e36fcb3b62b607353fd9baeae51232b.zip
thanks mtasm
-rw-r--r--Makefile7
-rw-r--r--mmu.h2
-rw-r--r--runoff.list3
3 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d17f1fa..09d790c 100644
--- a/Makefile
+++ b/Makefile
@@ -82,6 +82,13 @@ ASFLAGS = -m32 -gdwarf-2 -Wa,-divide
# FreeBSD ld wants ``elf_i386_fbsd''
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
dd if=/dev/zero of=xv6.img count=10000
diff --git a/mmu.h b/mmu.h
index 9d6673c..d009d97 100644
--- a/mmu.h
+++ b/mmu.h
@@ -181,5 +181,3 @@ struct gatedesc {
#endif
-//PAGEBREAK!
-// Blank page.
diff --git a/runoff.list b/runoff.list
index 02d1b65..2df9b81 100644
--- a/runoff.list
+++ b/runoff.list
@@ -7,6 +7,7 @@ x86.h
asm.h
mmu.h
elf.h
+date.h
# entering xv6
entry.S
@@ -75,3 +76,5 @@ sh.c
bootasm.S
bootmain.c
+# link
+kernel.ld