Use KERNBASE for the load address of the kernel rather than magic constants

as it seems to work..  (at least on i386/elf).
This commit is contained in:
peter 1999-05-08 13:03:49 +00:00
parent e1866010a1
commit dda5cbbda4
3 changed files with 7 additions and 20 deletions

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: link_aout.c,v 1.18 1999/01/25 08:42:24 dfr Exp $
* $Id: link_aout.c,v 1.19 1999/01/28 00:57:47 dillon Exp $
*/
#ifndef __alpha__
@ -109,11 +109,8 @@ link_aout_init(void* arg)
linker_make_file(kernelname, af, &link_aout_file_ops);
if (linker_kernel_file == NULL)
panic("link_aout_init: Can't create linker structures for kernel");
/*
* XXX there must be a better way of getting these constants.
*/
linker_kernel_file->address = (caddr_t) 0xf0100000;
linker_kernel_file->size = -0xf0100000;
linker_kernel_file->address = (caddr_t) KERNBASE;
linker_kernel_file->size = -(long)linker_kernel_file->address;
linker_current_file = linker_kernel_file;
linker_kernel_file->flags |= LINKER_FILE_LINKED;
}

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: link_elf.c,v 1.15 1999/01/28 00:57:47 dillon Exp $
* $Id: link_elf.c,v 1.16 1999/01/29 09:04:27 bde Exp $
*/
#include <sys/param.h>
@ -156,12 +156,7 @@ link_elf_init(void* arg)
if (linker_kernel_file == NULL)
panic("link_elf_init: Can't create linker structures for kernel");
parse_dynamic(linker_kernel_file);
/* Sigh, magic constants. */
#ifdef __alpha__
linker_kernel_file->address = (caddr_t) 0xfffffc0000300000;
#else
linker_kernel_file->address = (caddr_t) 0xf0100000;
#endif
linker_kernel_file->address = (caddr_t) KERNBASE;
linker_kernel_file->size = -(long)linker_kernel_file->address;
if (modptr) {

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: link_elf.c,v 1.15 1999/01/28 00:57:47 dillon Exp $
* $Id: link_elf.c,v 1.16 1999/01/29 09:04:27 bde Exp $
*/
#include <sys/param.h>
@ -156,12 +156,7 @@ link_elf_init(void* arg)
if (linker_kernel_file == NULL)
panic("link_elf_init: Can't create linker structures for kernel");
parse_dynamic(linker_kernel_file);
/* Sigh, magic constants. */
#ifdef __alpha__
linker_kernel_file->address = (caddr_t) 0xfffffc0000300000;
#else
linker_kernel_file->address = (caddr_t) 0xf0100000;
#endif
linker_kernel_file->address = (caddr_t) KERNBASE;
linker_kernel_file->size = -(long)linker_kernel_file->address;
if (modptr) {