Add kernbase symbol and use it instead of magic numbers in the

linker script.
This commit is contained in:
jake 2001-09-21 05:43:38 +00:00
parent 6d883b2fc2
commit 77ec54f945
4 changed files with 12 additions and 4 deletions

View File

@ -9,7 +9,7 @@ ENTRY(_start)
SECTIONS
{
/* Read-only sections, merged into text segment: */
. = 0x400000 + SIZEOF_HEADERS;
. = kernbase + SIZEOF_HEADERS;
.interp : { *(.interp) }
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
@ -128,7 +128,7 @@ SECTIONS
.init :
{
KEEP (*(.init))
} = 0x400000
} =0x1000000
.text :
{
*(.trap)
@ -138,11 +138,11 @@ SECTIONS
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.gnu.linkonce.t.*)
} = 0x400000
} =0x1000000
.fini :
{
KEEP (*(.fini))
} = 0x400000
} =0x1000000
PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);

View File

@ -58,6 +58,8 @@
#include <machine/tsb.h>
#include <machine/tstate.h>
ASSYM(KERNBASE, KERNBASE);
/*
* XXX: gas, as of version 2.11.2, does not know this ASI (and some other
* UltraSparc specific ones). This definition will probably get us into trouble

View File

@ -33,6 +33,9 @@
#include "assym.s"
.globl kernbase
.set kernbase,KERNBASE
/*
* void _start(struct bootinfo *bi, u_long ofw_vec)
*/

View File

@ -33,6 +33,9 @@
#include "assym.s"
.globl kernbase
.set kernbase,KERNBASE
/*
* void _start(struct bootinfo *bi, u_long ofw_vec)
*/