diff options
Diffstat (limited to 'fs/elf.c')
| -rw-r--r-- | fs/elf.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -69,8 +69,9 @@ Elf32_Phdr; // returns elf entry point uint32_t load_elf(char *name, uint32_t *alloc) { + uint32_t ext2_ramimage= fs_get_root_ext2_ramimage(); - int inode_nr=ext2_filename_to_inode(EXT2_RAM_ADDRESS,name); + int inode_nr=ext2_filename_to_inode(ext2_ramimage,name); if(inode_nr<1)return 0; //TODO: load ELF binary and move this to own compilation unit @@ -80,8 +81,8 @@ uint32_t load_elf(char *name, uint32_t *alloc) uint32_t vaddr=0x08000000; log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"loading %s",name); - ext2_check(EXT2_RAM_ADDRESS); - ext2_inode_content(EXT2_RAM_ADDRESS,inode_nr,vaddr,0x100000); // load 1mb; + ext2_check(ext2_ramimage); + ext2_inode_content(ext2_ramimage,inode_nr,vaddr,0x100000); // load 1mb; log(FOOLOS_MODULE_NAME,FOOLOS_LOG_DEBUG,"ELF File loaded to final destination."); Elf32_Ehdr *elf; |
