NetBSD/sys/arch/amd64/conf/kern.ldscript.Xen
maxv f1985d170d Xen therefore uses x86/db_memrw.c, as I suspected. Define __rodata_start
in the Xen ld scripts, so that it can compile. We put the __rodata_start
definition right before __data_start, for it to appear as dead code, since
the rodata segment is not yet mapped independently on Xen.
2016-05-13 05:45:13 +00:00

73 lines
1.0 KiB
Plaintext

/* $NetBSD: kern.ldscript.Xen,v 1.12 2016/05/13 05:45:13 maxv Exp $ */
#include "assym.h"
__PAGE_SIZE = 0x1000 ;
ENTRY(_start)
SECTIONS
{
/* Read-only sections, merged into text segment: */
.text :
{
*(.text)
*(.text.*)
*(.stub)
*(.rodata)
}
_etext = . ;
PROVIDE (etext = .) ;
/*
* Adjust the address for the data segment. We want to adjust up to
* the same address within the page on the next page up.
*/
. = ALIGN(0x100000) + (. & (0x100000 - 1));
__rodata_start = . ;
__data_start = . ;
.data :
{
*(.data)
}
. = ALIGN(COHERENCY_UNIT);
.data.cacheline_aligned :
{
*(.data.cacheline_aligned)
}
. = ALIGN(COHERENCY_UNIT);
.data.read_mostly :
{
*(.data.read_mostly)
}
. = ALIGN(COHERENCY_UNIT);
_edata = . ;
PROVIDE (edata = .) ;
__bss_start = . ;
.bss :
{
*(.bss)
*(.bss.*)
*(COMMON)
. = ALIGN(64 / 8);
}
. = ALIGN(64 / 8);
_end = . ;
PROVIDE (end = .) ;
.note.netbsd.ident :
{
KEEP(*(.note.netbsd.ident));
}
}
SECTIONS
{
.text :
AT (ADDR(.text))
{
*(.text)
} = 0
}