Changeset 227 for trunk/kernel/libk/elf.c
- Timestamp:
- Jul 18, 2017, 12:32:31 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/elf.c
r204 r227 38 38 // - return false with an error message if illegal header. 39 39 /////////////////////////////////////////////////////////////////// 40 static bool_t elf_isValidHeader(Elf 32_Ehdr *header)40 static bool_t elf_isValidHeader(Elf_Ehdr *header) 41 41 { 42 42 if((header->e_ident[EI_CLASS] == ELFCLASS32) … … 98 98 } 99 99 100 Elf 32_Ehdr * header = (Elf32_Ehdr *)buffer;100 Elf_Ehdr * header = (Elf_Ehdr *)buffer; 101 101 102 102 if( (header->e_ident[EI_MAG0] != ELFMAG0) || … … 141 141 vseg_t * vseg; 142 142 143 Elf 32_Phdr * seg_ptr = (Elf32_Phdr *)segs_base;143 Elf_Phdr * seg_ptr = (Elf_Phdr *)segs_base; 144 144 145 145 // loop on segments … … 223 223 { 224 224 kmem_req_t req; // kmem request for program header 225 Elf 32_Ehdrheader; // local buffer for .elf header225 Elf_Ehdr header; // local buffer for .elf header 226 226 void * segs_base; // pointer on buffer for segment descriptors array 227 227 uint32_t segs_size; // size of buffer for segment descriptors array … … 255 255 error = elf_header_load( file_xp , 256 256 &header, 257 sizeof(Elf 32_Ehdr) );257 sizeof(Elf_Ehdr) ); 258 258 if( error ) 259 259 { … … 273 273 274 274 // compute buffer size for segment descriptors array 275 segs_size = sizeof(Elf 32_Phdr) * header.e_phnum;275 segs_size = sizeof(Elf_Phdr) * header.e_phnum; 276 276 277 277 // allocate memory for segment descriptors array
Note: See TracChangeset
for help on using the changeset viewer.