standardize on not using foo_ prefix in struct foo
This commit is contained in:
		
							parent
							
								
									6b765c480f
								
							
						
					
					
						commit
						ef2bd07ae4
					
				
					 10 changed files with 181 additions and 180 deletions
				
			
		
							
								
								
									
										10
									
								
								bootmain.c
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								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); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 rsc
						rsc