Make ddb symbol loading work for ELF as well a.out.
This commit is contained in:
parent
2374dc24ce
commit
015bf59476
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: srt0.S,v 1.1 2002/02/24 01:04:25 matt Exp $ */
|
||||
/* $NetBSD: srt0.S,v 1.2 2002/03/31 00:11:14 matt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -73,7 +73,7 @@ ENTRY(machdep_start, 0)
|
|||
movl 4(%ap), %r6
|
||||
movl 20(%ap), %r9 # end of symbol table
|
||||
pushl 8(%ap) # number of symbols
|
||||
pushl 12(%ap) # start of symbols
|
||||
pushl 16(%ap) # start of symbols
|
||||
movab _C_LABEL(bootrpb),%r10 # get RPB address
|
||||
pushl %r10 # argument for new boot
|
||||
ashl $9,76(%r10),%r8 # memory size (COMPAT)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: loadfile_machdep.h,v 1.3 2001/10/31 17:20:49 thorpej Exp $ */
|
||||
/* $NetBSD: loadfile_machdep.h,v 1.4 2002/03/31 00:11:13 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -42,8 +42,8 @@
|
|||
#define BOOT_AOUT
|
||||
#define BOOT_ELF32
|
||||
|
||||
#define LOAD_KERNEL (LOAD_ALL & ~(LOAD_HDR|LOAD_TEXTA))
|
||||
#define COUNT_KERNEL (COUNT_ALL & ~(COUNT_HDR|COUNT_TEXTA))
|
||||
#define LOAD_KERNEL LOAD_ALL
|
||||
#define COUNT_KERNEL COUNT_ALL
|
||||
|
||||
#define LOADADDR(a) (((u_long)(a)) + offset)
|
||||
#define ALIGNENTRY(a) ((u_long)(a) & ~0xffffff)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.122 2002/03/06 13:10:25 tsutsui Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.123 2002/03/31 00:11:13 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
|
||||
|
@ -300,18 +300,14 @@ consinit()
|
|||
iospace_inited = 1;
|
||||
#endif
|
||||
cninit();
|
||||
#if defined(DDB) && !defined(__ELF__)
|
||||
{
|
||||
#if defined(DDB)
|
||||
if (symtab_start != NULL && symtab_nsyms != 0 && symtab_end != NULL) {
|
||||
ddb_init(symtab_nsyms, symtab_start, symtab_end);
|
||||
#ifndef __ELF__
|
||||
} else {
|
||||
extern int end; /* Contains pointer to symsize also */
|
||||
#endif
|
||||
if (symtab_start != NULL)
|
||||
ddb_init(symtab_nsyms, symtab_start, symtab_end);
|
||||
#ifndef __ELF__
|
||||
else {
|
||||
extern paddr_t esym;
|
||||
ddb_init(*(int *)&end, ((int *)&end) + 1, (void *)esym);
|
||||
}
|
||||
extern paddr_t esym;
|
||||
ddb_init(*(int *)&end, ((int *)&end) + 1, (void *)esym);
|
||||
#endif
|
||||
}
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: subr.S,v 1.2 2002/02/24 01:04:27 matt Exp $ */
|
||||
/* $NetBSD: subr.S,v 1.3 2002/03/31 00:11:13 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
|
||||
|
@ -109,12 +109,12 @@ ASENTRY(start, 0)
|
|||
pushl $to # Address to jump to
|
||||
rei # change to kernel stack
|
||||
to: movw $0xfff,_C_LABEL(panic) # Save all regs in panic
|
||||
cmpb (%ap),$4 # symbols info present?
|
||||
cmpb (%ap),$3 # symbols info present?
|
||||
blssu 3f # nope, skip
|
||||
bisl3 $0x80000000,8(%ap),_C_LABEL(symtab_start)
|
||||
# save start of symtab
|
||||
movl 12(%ap),_C_LABEL(symtab_nsyms) # save number of symtab
|
||||
bisl3 $0x80000000,16(%ap),_C_LABEL(symtab_end)
|
||||
bisl3 $0x80000000,%r9,_C_LABEL(symtab_end)
|
||||
# save end of symtab
|
||||
3: addl3 _C_LABEL(esym),$0x3ff,%r0 # Round symbol table end
|
||||
bicl3 $0x3ff,%r0,_C_LABEL(proc0paddr) # save proc0 uarea pointer
|
||||
|
|
Loading…
Reference in New Issue