summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-01-31 23:42:29 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-01-31 23:42:29 +0000
commit609ea2af724e48e613d45d154b62231036f7a139 (patch)
tree12b6b3fd5dfcb4f247adc96cb536dc6df9e333ad /sys
parent02914384c4f5bcb9b5f7e472db395995fd42e851 (diff)
do not merge the rodata sections into the .text . they could be moved above 4m later should there be too much code
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hppa/conf/ld.script21
-rw-r--r--sys/arch/hppa/hppa/pmap.c16
2 files changed, 19 insertions, 18 deletions
diff --git a/sys/arch/hppa/conf/ld.script b/sys/arch/hppa/conf/ld.script
index 910abc38084..a55a65386b7 100644
--- a/sys/arch/hppa/conf/ld.script
+++ b/sys/arch/hppa/conf/ld.script
@@ -1,38 +1,40 @@
-/* $OpenBSD: ld.script,v 1.10 2002/03/19 23:08:55 mickey Exp $ */
+/* $OpenBSD: ld.script,v 1.11 2003/01/31 23:42:28 mickey Exp $ */
OUTPUT_FORMAT("elf32-hppa")
OUTPUT_ARCH(hppa)
ENTRY($start)
SECTIONS
{
- /* Read-only sections, merged into text segment: */
. = + SIZEOF_HEADERS;
.text :
{
kernel_text = . ;
*(.text) *(.text.*)
- *(.rodata) *(.rodata1)
*(.reginfo)
*(.init)
*(.stub)
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
+ . = ALIGN(4096);
+ etext = ABSOLUTE(.);
+ } = 0x08000240 /* nop filled */
+ .rodata :
+ {
+ __rodata_start = .;
+ *(.rodata) *(.rodata1)
__unwind_start = .;
*(.PARISC.unwind)
__unwind_end = .;
- . = ALIGN(4096);
- etext = ABSOLUTE(.);
- } = 0 /* 0x08000240 nop filled, does not work cause of rodata */
+ __rodata_end = .;
+ } = 0
. = 0x400000;
- etext1 = ABSOLUTE(.);
+ __data_start = ABSOLUTE(.);
.data :
{
$global$ = . ;
. += 4;
*(.data)
- /* [a-ps-z]*(.data) r[a-ce-z]*(.data) *libkern.o(.data) */
- /* rd_root.o(.data) * there is an overflow bug in ld */
CONSTRUCTORS
. = ALIGN(4096);
edata = ABSOLUTE(.);
@@ -50,4 +52,3 @@ SECTIONS
}
end = ABSOLUTE(.);
}
-
diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c
index a9e73a05c68..75fd696accb 100644
--- a/sys/arch/hppa/hppa/pmap.c
+++ b/sys/arch/hppa/hppa/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.96 2003/01/29 17:06:05 mickey Exp $ */
+/* $OpenBSD: pmap.c,v 1.97 2003/01/31 23:42:28 mickey Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
@@ -435,7 +435,7 @@ void
pmap_bootstrap(vstart)
vaddr_t vstart;
{
- extern char etext, etext1;
+ extern int etext, __rodata_end, __data_start;
extern u_int totalphysmem, *ie_mem;
extern paddr_t hppa_vtop;
vaddr_t va, addr = hppa_round_page(vstart), t;
@@ -526,7 +526,7 @@ pmap_bootstrap(vstart)
/* XXX PCXS needs this inserted into an IBTLB */
/* and can block-map the whole phys w/ another */
- t = (vaddr_t)&etext1;
+ t = (vaddr_t)&etext;
if (btlb_insert(HPPA_SID_KERNEL, 0, 0, &t,
pmap_sid2pid(HPPA_SID_KERNEL) |
pmap_prot(pmap_kernel(), UVM_PROT_RX)) < 0)
@@ -534,9 +534,9 @@ pmap_bootstrap(vstart)
kpm->pm_stats.wired_count = kpm->pm_stats.resident_count =
physmem = atop(t);
- if (&etext < &etext1) {
- physical_steal = (vaddr_t)&etext;
- physical_end = (vaddr_t)&etext1;
+ if (&__rodata_end < &__data_start) {
+ physical_steal = (vaddr_t)&__rodata_end;
+ physical_end = (vaddr_t)&__data_start;
DPRINTF(PDB_INIT, ("physpool: 0x%x @ 0x%x\n",
physical_end - physical_steal, physical_steal));
}
@@ -569,7 +569,7 @@ pmap_bootstrap(vstart)
extern struct user *proc0paddr;
vm_prot_t prot = UVM_PROT_RW;
- if (va < (vaddr_t)&etext1)
+ if (va < (vaddr_t)&etext)
prot = UVM_PROT_RX;
else if (va == (vaddr_t)proc0paddr + USPACE)
prot = UVM_PROT_NONE;
@@ -577,7 +577,7 @@ pmap_bootstrap(vstart)
pmap_kenter_pa(va, va, prot);
}
- DPRINTF(PDB_INIT, ("bootstrap: mapped %p - 0x%x\n", &etext1, va));
+ DPRINTF(PDB_INIT, ("bootstrap: mapped %p - 0x%x\n", &etext, va));
}
void