From ef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 16 Jul 2006 15:41:47 +0000 Subject: standardize on not using foo_ prefix in struct foo --- bootmain.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bootmain.c') diff --git a/bootmain.c b/bootmain.c index 4a70652..8985776 100644 --- a/bootmain.c +++ b/bootmain.c @@ -45,18 +45,18 @@ cmain(void) readseg((uint32_t) ELFHDR, SECTSIZE*8, 0); // is this a valid ELF? - if (ELFHDR->e_magic != ELF_MAGIC) + if (ELFHDR->magic != ELF_MAGIC) goto bad; // load each program segment (ignores ph flags) - ph = (struct Proghdr *) ((uint8_t *) ELFHDR + ELFHDR->e_phoff); - eph = ph + ELFHDR->e_phnum; + ph = (struct Proghdr *) ((uint8_t *) ELFHDR + ELFHDR->phoff); + eph = ph + ELFHDR->phnum; for (; ph < eph; ph++) - readseg(ph->p_va, ph->p_memsz, ph->p_offset); + readseg(ph->va, ph->memsz, ph->offset); // call the entry point from the ELF header // note: does not return! - ((void (*)(void)) (ELFHDR->e_entry & 0xFFFFFF))(); + ((void (*)(void)) (ELFHDR->entry & 0xFFFFFF))(); bad: outw(0x8A00, 0x8A00); -- cgit v1.2.3