508 |
if (!haddr) { |
if (!haddr) { |
509 |
fprintf(stderr,"load_raw_image: invalid load address 0x%8.8x\n", |
fprintf(stderr,"load_raw_image: invalid load address 0x%8.8x\n", |
510 |
vaddr); |
vaddr); |
511 |
return(-1); |
// return(-1); |
512 |
} |
} |
513 |
|
|
514 |
if (len > PPC32_MIN_PAGE_SIZE) |
if (len > PPC32_MIN_PAGE_SIZE) |
598 |
|
|
599 |
fseek(bfd,shdr->sh_offset,SEEK_SET); |
fseek(bfd,shdr->sh_offset,SEEK_SET); |
600 |
vaddr = shdr->sh_addr; |
vaddr = shdr->sh_addr; |
601 |
|
// XXX my kernel address in elf file |
602 |
|
vaddr = vaddr - 0xc0000000; |
603 |
|
|
604 |
if (cpu->vm->debug_level > 0) { |
if (cpu->vm->debug_level > 0) { |
605 |
printf(" * Adding section at virtual address 0x%8.8x " |
printf(" * Adding section at virtual address 0x%8.8x " |
637 |
printf("ELF loading skipped, using a ghost RAM file.\n"); |
printf("ELF loading skipped, using a ghost RAM file.\n"); |
638 |
} |
} |
639 |
|
|
640 |
|
ehdr->e_entry = ehdr->e_entry - 0xc0000000; // XXX |
641 |
printf("ELF entry point: 0x%x\n",ehdr->e_entry); |
printf("ELF entry point: 0x%x\n",ehdr->e_entry); |
642 |
|
|
643 |
if (entry_point) |
if (entry_point) |