mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-15 15:06:42 +00:00
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.
This commit is contained in:
parent
b2c98acc5e
commit
a03f751e5a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=81173
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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 = .);
|
||||
|
Loading…
Reference in New Issue
Block a user