Changeset 315 for trunk/kernel/libk
- Timestamp:
- Aug 3, 2017, 10:15:18 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/elf.c
r313 r315 89 89 90 90 // load .elf header 91 count = vfs_move( true, // to_buffer 92 false, // is_user 93 file_xp, 94 buffer, 95 size ); 91 count = vfs_user_move( true, // to_buffer 92 file_xp, 93 buffer, 94 size ); 96 95 97 96 if( count != size ) … … 135 134 process_t * process ) 136 135 { 137 error_t error;138 136 uint32_t index; 139 137 intptr_t file_size; … … 163 161 { 164 162 type = VSEG_TYPE_CODE; 165 process->vmm.code_vpn_base = start>> CONFIG_PPM_PAGE_SHIFT;163 process->vmm.code_vpn_base = vbase >> CONFIG_PPM_PAGE_SHIFT; 166 164 167 165 elf_dmsg("\n[INFO] %s : found CODE vseg / base = %x / size = %x\n", 168 __FUNCTION__ , start, mem_size );166 __FUNCTION__ , vbase , mem_size ); 169 167 } 170 168 else // found DATA segment 171 169 { 172 170 type = VSEG_TYPE_DATA; 173 process->vmm.data_vpn_base = start>> CONFIG_PPM_PAGE_SHIFT;171 process->vmm.data_vpn_base = vbase >> CONFIG_PPM_PAGE_SHIFT; 174 172 175 173 elf_dmsg("\n[INFO] %s : found DATA vseg / base = %x / size = %x\n", 176 __FUNCTION__, start, mem_size );174 __FUNCTION__, vbase , mem_size ); 177 175 } 178 176 … … 194 192 195 193 // initialize "file_mapper", "file_offset", "file_size" fields in vseg 196 vseg-> file_mapper = hal_remote_lwd( XPTR( file_cxy , &file_ptr->mapper);194 vseg->mapper_xp = (xptr_t)hal_remote_lwd( XPTR( file_cxy , &file_ptr->mapper ) ); 197 195 vseg->file_offset = file_offset; 198 196 vseg->file_size = file_size; … … 289 287 290 288 // load seg descriptors array to local buffer 291 count = vfs_move( true, // to_buffer 292 false, // is_user 293 file_xp, 294 segs_base, 295 segs_size ); 289 count = vfs_user_move( true, // to_buffer 290 file_xp, 291 segs_base, 292 segs_size ); 296 293 297 294 if( count != segs_size )
Note: See TracChangeset
for help on using the changeset viewer.