diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-04-20 20:23:25 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-04-20 20:23:25 +0000 |
commit | 78877247803610ed83706b0926c30a7790104cae (patch) | |
tree | 47200342a7c77176a76cb9f8211fee77399f51a5 /sys/arch/hppa/dev | |
parent | 62eb2d42aeddee5bc67b3e81fb297c0d8b73395d (diff) |
move rd_root_{size,image} definitions to the end of the file to workaround linkr overflow bug
Diffstat (limited to 'sys/arch/hppa/dev')
-rw-r--r-- | sys/arch/hppa/dev/rd_root.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/sys/arch/hppa/dev/rd_root.c b/sys/arch/hppa/dev/rd_root.c index b26a3d8ccf4..1eedba849ea 100644 --- a/sys/arch/hppa/dev/rd_root.c +++ b/sys/arch/hppa/dev/rd_root.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rd_root.c,v 1.1 1998/09/12 03:11:18 mickey Exp $ */ +/* $OpenBSD: rd_root.c,v 1.2 1999/04/20 20:23:24 mickey Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -35,6 +35,8 @@ #include <dev/ramdisk.h> extern int boothowto; +extern u_int32_t rd_root_size; +extern char rd_root_image[]; #ifndef MINIROOTSIZE #define MINIROOTSIZE 512 @@ -43,12 +45,6 @@ extern int boothowto; #define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT) /* - * This array will be patched to contain a file-system image. - */ -u_int32_t rd_root_size = ROOTBYTES; -char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n"; - -/* * This is called during autoconfig. */ void @@ -56,14 +52,13 @@ rd_attach_hook(unit, rd) int unit; struct rd_conf *rd; { - if (unit == 0) { /* Setup root ramdisk */ - rd->rd_addr = (caddr_t)rd_root_image; - rd->rd_size = (size_t)rd_root_size; + rd->rd_addr = rd_root_image; + rd->rd_size = rd_root_size; rd->rd_type = RD_KMEM_FIXED; printf("rd%d: internal %dK image area\n", unit, - ROOTBYTES / 1024); + rd_root_size / 1024); } } @@ -81,3 +76,11 @@ rd_open_hook(unit, rd) boothowto |= RB_SINGLE; } } + +/* + * This array will be patched to contain a file-system image. + * XXX there is an overflow bug in gnu ld-hppa, so keep this down + * the of .data segment (see ld.script) to avoid. will fix this later + */ +u_int32_t rd_root_size = ROOTBYTES; +char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n"; |