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

linker script.
This commit is contained in:
Jake Burkholder 2001-09-21 05:43:38 +00:00
parent 3c293725e1
commit 53beacfa00
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83756
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)
*/