Changeset f93f168 in mainline
- Timestamp:
- 2008-07-08T17:27:42Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4e4052b
- Parents:
- c98e6ee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/loader/elf_load.c
rc98e6ee rf93f168 225 225 226 226 rc = read(elf->fd, &segment_hdr, sizeof(elf_segment_header_t)); 227 if (rc < 0) { printf("read error\n"); return EE_INVALID; } 227 if (rc < 0) { 228 printf("read error\n"); 229 return EE_INVALID; 230 } 228 231 229 232 rc = segment_header(elf, &segment_hdr); … … 243 246 244 247 rc = read(elf->fd, §ion_hdr, sizeof(elf_section_header_t)); 245 if (rc < 0) { printf("read error\n"); return EE_INVALID; } 248 if (rc < 0) { 249 printf("read error\n"); 250 return EE_INVALID; 251 } 246 252 247 253 rc = section_header(elf, §ion_hdr); … … 327 333 if ((entry->p_offset % entry->p_align) != 328 334 (entry->p_vaddr % entry->p_align)) { 329 printf("align check 1 failed offset%%align=%d, vaddr%%align=%d\n", 330 entry->p_offset % entry->p_align, 331 entry->p_vaddr % entry->p_align 335 printf("align check 1 failed offset%%align=%d, " 336 "vaddr%%align=%d\n", 337 entry->p_offset % entry->p_align, 338 entry->p_vaddr % entry->p_align 332 339 ); 333 340 return EE_INVALID; … … 370 377 // printf("seek to %d\n", entry->p_offset); 371 378 rc = lseek(elf->fd, entry->p_offset, SEEK_SET); 372 if (rc < 0) { printf("seek error\n"); return EE_INVALID; } 379 if (rc < 0) { 380 printf("seek error\n"); 381 return EE_INVALID; 382 } 373 383 374 384 // printf("read 0x%x bytes to address 0x%x\n", entry->p_filesz, entry->p_vaddr+bias); … … 392 402 // printf("->%d\n", rc); 393 403 394 if (rc < 0) { printf("read error\n"); return EE_INVALID; } 404 if (rc < 0) { 405 printf("read error\n"); 406 return EE_INVALID; 407 } 395 408 396 409 left -= now;
Note:
See TracChangeset
for help on using the changeset viewer.