standardize on not using foo_ prefix in struct foo

This commit is contained in:
rsc 2006-07-16 15:41:47 +00:00
parent 6b765c480f
commit ef2bd07ae4
10 changed files with 181 additions and 180 deletions

View file

@ -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);