diff options
author | jake <jake@FreeBSD.org> | 2001-08-06 02:18:39 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2001-08-06 02:18:39 +0000 |
commit | 1aa8581a5f961b6a6d50c2d5180d22ab4d810a3a (patch) | |
tree | 15f8b1c9d57af499e35e01db56b85e65d8d5dbaa /sys | |
parent | 15636652cf3ce7d9f5cc04e3f0be1103efb4a070 (diff) | |
download | FreeBSD-src-1aa8581a5f961b6a6d50c2d5180d22ab4d810a3a.zip FreeBSD-src-1aa8581a5f961b6a6d50c2d5180d22ab4d810a3a.tar.gz |
Add code model medlow to cflags and move the kernel load address from
just before the memory hole to 4 megs. Special case building exception.s
like locore.s, it needs to at the beginning so the branches out from the
trap table don't overflow.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/conf/Makefile.sparc64 | 9 | ||||
-rw-r--r-- | sys/conf/files.sparc64 | 6 | ||||
-rw-r--r-- | sys/conf/ldscript.sparc64 | 8 |
3 files changed, 13 insertions, 10 deletions
diff --git a/sys/conf/Makefile.sparc64 b/sys/conf/Makefile.sparc64 index 94b7769..84ffd5f 100644 --- a/sys/conf/Makefile.sparc64 +++ b/sys/conf/Makefile.sparc64 @@ -65,7 +65,7 @@ INCLUDES+= -I/usr/include .endif COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -include opt_global.h -CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} +CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -mcmodel=medlow # XXX LOCORE means "don't declare C stuff" not "for locore.s". ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} @@ -99,9 +99,9 @@ NORMAL_M= perl5 $S/kern/makeobjops.pl -c $<; \ GEN_CFILES= $S/$M/$M/genassym.c SYSTEM_CFILES= vnode_if.c hints.c config.c -SYSTEM_SFILES= $S/$M/$M/locore.s +SYSTEM_SFILES= $S/$M/$M/locore.s $S/$M/$M/exception.s SYSTEM_DEP= Makefile ${SYSTEM_OBJS} -SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} hints.o config.o hack.So +SYSTEM_OBJS= locore.o exception.o vnode_if.o ${OBJS} hints.o config.o hack.So SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \ -export-dynamic -dynamic-linker /red/herring \ -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o @@ -178,6 +178,9 @@ kernel-clobber: locore.o: $S/$M/$M/locore.s assym.s ${NORMAL_S} +exception.o: $S/$M/$M/exception.s assym.s + ${NORMAL_S} + # This is a hack. BFD "optimizes" away dynamic mode if there are no # dynamic references. We could probably do a '-Bforcedynamic' mode like # in the a.out ld. For now, this works. diff --git a/sys/conf/files.sparc64 b/sys/conf/files.sparc64 index 3938690..594f4d7 100644 --- a/sys/conf/files.sparc64 +++ b/sys/conf/files.sparc64 @@ -16,10 +16,10 @@ sparc64/sparc64/db_disasm.c optional ddb sparc64/sparc64/db_interface.c optional ddb sparc64/sparc64/db_trace.c optional ddb sparc64/sparc64/elf_machdep.c standard -# locore.s needs to be handled in Makefile to put it first. Otherwise it's -# now normal. +# locore.s and exception.s need to be handled in Makefile to put them first. +# Otherwise it's they're normal. # sparc64/sparc64/locore.s standard -sparc64/sparc64/exception.s standard +# sparc64/sparc64/exception.s standard sparc64/sparc64/fp.c standard sparc64/sparc64/machdep.c standard sparc64/sparc64/pmap.c standard diff --git a/sys/conf/ldscript.sparc64 b/sys/conf/ldscript.sparc64 index cc65cd4..8afcbeb 100644 --- a/sys/conf/ldscript.sparc64 +++ b/sys/conf/ldscript.sparc64 @@ -9,7 +9,7 @@ ENTRY(_start) SECTIONS { /* Read-only sections, merged into text segment: */ - . = 0x60000000000 + SIZEOF_HEADERS; + . = 0x400000 + SIZEOF_HEADERS; .interp : { *(.interp) } .hash : { *(.hash) } .dynsym : { *(.dynsym) } @@ -128,7 +128,7 @@ SECTIONS .init : { KEEP (*(.init)) - } = 0x60000000000 + } = 0x400000 .text : { *(.trap) @@ -138,11 +138,11 @@ SECTIONS /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.gnu.linkonce.t.*) - } = 0x60000000000 + } = 0x400000 .fini : { KEEP (*(.fini)) - } = 0x60000000000 + } = 0x400000 PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); |