Stop using linker scripts on all sh3 ports.

The only information to be compensated is text section start address.
The default value is set arch-wise as DEFTEXTADDR.  Each kernel config
can override the default value by setting TEXTADDR.

Tested on COMPUTEXEVB (evbsh3).

Reviewed By:	uwe
This commit is contained in:
uebayasi 2006-03-17 16:06:51 +00:00
parent e948e1b17f
commit 8572d2c144
8 changed files with 21 additions and 23 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: std.dreamcast,v 1.7 2005/12/11 12:17:06 christos Exp $
# $NetBSD: std.dreamcast,v 1.8 2006/03/17 16:06:51 uebayasi Exp $
#
# standard, required NetBSD/dreamcast 'options'
@ -18,4 +18,4 @@ options IOM_RAM_BEGIN=0x0c000000
options IOM_RAM_SIZE=0x01000000 # 16MB
makeoptions ENDIAN="-EL"
makeoptions LDSCRIPTBASE="shl.x" # for little endian
makeoptions DEFTEXTADDR="0x8c001000"

View File

@ -1,4 +1,4 @@
# $NetBSD: std.evbsh3.eb,v 1.5 2005/12/11 12:17:13 christos Exp $
# $NetBSD: std.evbsh3.eb,v 1.6 2006/03/17 16:06:51 uebayasi Exp $
#
# standard, required NetBSD/evbsh3 'options'
@ -8,5 +8,5 @@ include "conf/std" # MI standard options
options EXEC_SCRIPT # exec #! scripts
makeoptions ENDIAN="-EB"
makeoptions LDSCRIPTBASE="sh.x" # for big endian
makeoptions DEFTEXTADDR="0x8c010000"
makeoptions MACHINE_ARCH=sh3eb

View File

@ -1,4 +1,4 @@
# $NetBSD: std.evbsh3.el,v 1.5 2005/12/11 12:17:13 christos Exp $
# $NetBSD: std.evbsh3.el,v 1.6 2006/03/17 16:06:51 uebayasi Exp $
#
# standard, required NetBSD/evbsh3 'options'
@ -8,5 +8,5 @@ include "conf/std" # MI standard options
options EXEC_SCRIPT # exec #! scripts
makeoptions ENDIAN="-EL"
makeoptions LDSCRIPTBASE="shl.x" # for little endian
makeoptions DEFTEXTADDR="0x8c010000"
makeoptions MACHINE_ARCH=sh3el

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.S,v 1.9 2005/12/11 12:17:13 christos Exp $ */
/* $NetBSD: locore.S,v 1.10 2006/03/17 16:06:51 uebayasi Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -218,8 +218,8 @@ main_label:
XLInitializeBsc:.long _C_LABEL(InitializeBsc)
#endif /* DONT_INIT_BSC */
___start: .long start
___etext: .long _etext
___end: .long _end
___etext: .long _C_LABEL(etext)
___end: .long _C_LABEL(end)
XLtmpstk: .long INIT_STACK
_KERNBASE: .long 0x8c000000
_ROM_START: .long IOM_ROM_BEGIN

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.56 2005/12/24 20:07:03 perry Exp $ */
/* $NetBSD: machdep.c,v 1.57 2006/03/17 16:06:51 uebayasi Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.56 2005/12/24 20:07:03 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.57 2006/03/17 16:06:51 uebayasi Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@ -223,11 +223,11 @@ haltsys:
void
initSH3(void *pc) /* XXX return address */
{
extern char _edata[], _end[];
extern char edata[], end[];
vaddr_t kernend;
/* Clear bss */
memset(_edata, 0, _end - _edata);
memset(edata, 0, end - edata);
/* Initilize CPU ops. */
#if defined(SH3) && defined(SH4)
@ -261,7 +261,7 @@ initSH3(void *pc) /* XXX return address */
consinit();
/* Load memory to UVM */
kernend = atop(round_page(SH3_P1SEG_TO_PHYS(_end)));
kernend = atop(round_page(SH3_P1SEG_TO_PHYS(end)));
physmem = atop(IOM_RAM_SIZE);
uvm_page_physload(
kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE),

View File

@ -1,4 +1,4 @@
# $NetBSD: std.hpcsh,v 1.7 2005/12/11 12:17:36 christos Exp $
# $NetBSD: std.hpcsh,v 1.8 2006/03/17 16:06:51 uebayasi Exp $
#
# standard, required NetBSD/hpcsh 'options'
@ -9,6 +9,5 @@ options EXEC_SCRIPT # exec #! scripts
options IOM_RAM_BEGIN=0x0c000000
makeoptions ENDIAN="-EL"
#makeoptions LDSCRIPTBASE="shl-coff.x" # for COFF kernel
makeoptions LDSCRIPTBASE="shl-elf.x" # for ELF kernel
makeoptions DEFTEXTADDR="0x8c001000"
makeoptions MACHINE_ARCH=sh3el

View File

@ -1,4 +1,4 @@
# $NetBSD: std.mmeye,v 1.10 2005/12/11 12:18:16 christos Exp $
# $NetBSD: std.mmeye,v 1.11 2006/03/17 16:06:52 uebayasi Exp $
#
# standard, required NetBSD/mmeye 'options'
@ -13,4 +13,4 @@ options IOM_ROM_SIZE=0x00200000 # 2MB
options EXEC_SCRIPT # exec #! scripts
makeoptions ENDIAN="-EB"
makeoptions LDSCRIPTBASE="sh.x" # for big endian
makeoptions DEFTEXTADDR="0x8c010000"

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.sh3,v 1.21 2005/12/11 12:18:58 christos Exp $
# $NetBSD: Makefile.sh3,v 1.22 2006/03/17 16:06:52 uebayasi Exp $
# Makefile for NetBSD
#
@ -59,9 +59,8 @@ locore.o: ${THISSH3}/${MACHINE}/locore.S assym.h
##
## (5) link settings
##
# LINKFORMAT possibly set by individual sh3 port
# LDSCRIPTBASE comes from the kernel's config
LINKFORMAT?= -T ${THISSH3}/conf/${LDSCRIPTBASE}
TEXTADDR?= ${DEFTEXTADDR}
LINKFLAGS_NORMAL= -X
##
## (6) port specific target dependencies