From: Ben Pfaff Date: Mon, 20 Sep 2004 22:24:21 +0000 (+0000) Subject: Make page alignment optional. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=979d9e154fd0d644f65cac9cf20b379e107a8cee;hp=70902182c386c446255ba0bb84e08d0b53d541de;p=pintos-anon Make page alignment optional. --- diff --git a/src/tests/userprog/Makefile b/src/tests/userprog/Makefile index 6629386..c5e4855 100644 --- a/src/tests/userprog/Makefile +++ b/src/tests/userprog/Makefile @@ -2,9 +2,13 @@ include ../../Make.config SHELL = /bin/sh -LDFLAGS = -nostdlib -static -Wl,-T,elf.x +LDFLAGS = -nostdlib -static LDLIBS = $(shell $(CC) -print-libgcc-file-name) +# Uncomment the line below to round up segment sizes to full pages for +# testing purposes only. +LDFLAGS += -Wl,-T,fullpage.x + VPATH = ../.. DEFINES = -DUSER diff --git a/src/tests/userprog/elf.x b/src/tests/userprog/elf.x deleted file mode 100644 index 2fb94e1..0000000 --- a/src/tests/userprog/elf.x +++ /dev/null @@ -1,24 +0,0 @@ -/* Default linker script, for normal executables */ -OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") -OUTPUT_ARCH(i386) -ENTRY(_start) -SECTIONS -{ - . = 0x08048000 + SIZEOF_HEADERS; - .text : { - *(.text .text.*) - . = ALIGN(0x1000); - } =0x90909090 - .rodata : { - *(.rodata .rodata.*) - . = ALIGN(0x1000); - } - .data : { - *(.data .data.*) - . = ALIGN(0x1000); - } - .bss : { - *(.bss .bss.*) - . = ALIGN(0x1000); - } -} diff --git a/src/tests/userprog/fullpage.x b/src/tests/userprog/fullpage.x new file mode 100644 index 0000000..2fb94e1 --- /dev/null +++ b/src/tests/userprog/fullpage.x @@ -0,0 +1,24 @@ +/* Default linker script, for normal executables */ +OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") +OUTPUT_ARCH(i386) +ENTRY(_start) +SECTIONS +{ + . = 0x08048000 + SIZEOF_HEADERS; + .text : { + *(.text .text.*) + . = ALIGN(0x1000); + } =0x90909090 + .rodata : { + *(.rodata .rodata.*) + . = ALIGN(0x1000); + } + .data : { + *(.data .data.*) + . = ALIGN(0x1000); + } + .bss : { + *(.bss .bss.*) + . = ALIGN(0x1000); + } +}