Add kernbase symbol and use it instead of magic numbers in the
linker script.
This commit is contained in:
parent
6d883b2fc2
commit
77ec54f945
@ -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 = .);
|
||||
|
@ -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
|
||||
|
@ -33,6 +33,9 @@
|
||||
|
||||
#include "assym.s"
|
||||
|
||||
.globl kernbase
|
||||
.set kernbase,KERNBASE
|
||||
|
||||
/*
|
||||
* void _start(struct bootinfo *bi, u_long ofw_vec)
|
||||
*/
|
||||
|
@ -33,6 +33,9 @@
|
||||
|
||||
#include "assym.s"
|
||||
|
||||
.globl kernbase
|
||||
.set kernbase,KERNBASE
|
||||
|
||||
/*
|
||||
* void _start(struct bootinfo *bi, u_long ofw_vec)
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user