From 4199abedf1dbf20ebd5abe9cebca55d40e9103f0 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 31 Aug 2004 03:23:39 +0000 Subject: [PATCH] Use Linux kernel trick of giving an .lds file a .S extension to get it preprocessed. --- src/Makefile.inc | 11 +++++------ src/threads/{kernel.lds.in => kernel.lds.S} | 2 -- src/userprog/build/.cvsignore | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) rename src/threads/{kernel.lds.in => kernel.lds.S} (99%) diff --git a/src/Makefile.inc b/src/Makefile.inc index 7561dff..c4027b5 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -3,7 +3,6 @@ SHELL = /bin/sh CC = gcc -CPP = $(CC) -E VPATH := $(TOP_SRCDIR)/threads VPATH := $(VPATH):$(TOP_SRCDIR)/devices @@ -12,7 +11,7 @@ VPATH := $(VPATH):$(TOP_SRCDIR)/filesys VPATH := $(VPATH):$(TOP_SRCDIR)/userprog WARNINGS = -Wall -W -Wstrict-prototypes -Wmissing-prototypes -CFLAGS = -g -O3 -MMD $(WARNINGS) $(INCLUDES) $(DEFINES) +CFLAGS = -g -O3 -MMD -msoft-float $(WARNINGS) $(INCLUDES) $(DEFINES) ASFLAGS = -Wa,--gstabs+ $(INCLUDES) $(DEFINES) # Core kernel. @@ -58,11 +57,11 @@ all: diskimage.bin intr-stubs.S: $(TOP_SRCDIR)/threads/intr-stubs.pl $< > $@ -kernel.lds: $(TOP_SRCDIR)/threads/kernel.lds.in $(TOP_SRCDIR)/threads/loader.h +kernel.lds.s: $(TOP_SRCDIR)/threads/kernel.lds.S $(TOP_SRCDIR)/threads/loader.h $(CPP) -x assembler-with-cpp -P $< -o $@ -kernel.o: $(OBJECTS) kernel.lds - ld -T kernel.lds -o $@ $(OBJECTS) `$(CC) -print-libgcc-file-name` +kernel.o: $(OBJECTS) kernel.lds.s + ld -T kernel.lds.s -o $@ $(OBJECTS) `$(CC) -print-libgcc-file-name` kernel.bin: kernel.o objcopy -O binary -R .note -R .comment -S $< $@.tmp @@ -77,6 +76,6 @@ diskimage.bin: loader.bin kernel.bin clean: rm -f *.o *.d *.bin - rm -f kernel.bin.data kernel.bin.pad intr-stubs.S kernel.lds + rm -f kernel.bin.data kernel.bin.pad intr-stubs.S kernel.lds.s -include *.d diff --git a/src/threads/kernel.lds.in b/src/threads/kernel.lds.S similarity index 99% rename from src/threads/kernel.lds.in rename to src/threads/kernel.lds.S index fb76cac..b5426e0 100644 --- a/src/threads/kernel.lds.in +++ b/src/threads/kernel.lds.S @@ -10,9 +10,7 @@ SECTIONS _start = .; .text : { *(.text) } = 0x9090 - .rodata : { *(.rodata) *(.rodata.*) } - .data : { *(.data) } _start_bss = .; diff --git a/src/userprog/build/.cvsignore b/src/userprog/build/.cvsignore index b64d546..c3a246a 100644 --- a/src/userprog/build/.cvsignore +++ b/src/userprog/build/.cvsignore @@ -2,6 +2,6 @@ diskimage.bin loader.bin kernel.bin -kernel.bin.data -kernel.bin.pad +kernel.bin.tmp intr-stubs.S +kernel.lds.s -- 2.30.2