Fixed DDB_NOKLDSYM on amd64's:
machdep.c: Initialize the symbol table pointers, not quite like for other arches. db_elf.c: Don't claim to be an i486 in the fake ELF header.
This commit is contained in:
parent
4cec6f5d02
commit
130ff9c31a
@ -161,6 +161,10 @@ struct pcpu __pcpu[MAXCPU];
|
||||
|
||||
struct mtx icu_lock;
|
||||
|
||||
#ifdef DDB
|
||||
void *ksym_start, *ksym_end;
|
||||
#endif
|
||||
|
||||
static void
|
||||
cpu_startup(dummy)
|
||||
void *dummy;
|
||||
@ -1134,6 +1138,8 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
|
||||
kmdp = preload_search_by_type("elf64 kernel");
|
||||
boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
|
||||
kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *) + KERNBASE;
|
||||
ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, void *);
|
||||
ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, void *);
|
||||
|
||||
/* Init basic tunables, hz etc */
|
||||
init_param1();
|
||||
|
@ -402,7 +402,7 @@ kdb_init(void)
|
||||
elf.e_ident[EI_MAG1] = ELFMAG1;
|
||||
elf.e_ident[EI_MAG2] = ELFMAG2;
|
||||
elf.e_ident[EI_MAG3] = ELFMAG3;
|
||||
elf.e_machine = EM_486;
|
||||
elf.e_machine = ELF_ARCH;
|
||||
elf.e_shoff = (uintptr_t)(void *)&sh[0] - (uintptr_t)(void *)&elf;
|
||||
sh[0].sh_type = SHT_SYMTAB;
|
||||
sh[0].sh_offset = (uintptr_t)ksym_start + sizeof(long) -
|
||||
|
Loading…
Reference in New Issue
Block a user