Skip to content

Commit

Permalink
ELF Data tested OK yay!
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed Jan 31, 2024
1 parent 704be7e commit b664995
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jsemu.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,11 @@ void vm_start(const char *url, int ram_size, const char *cmdline,
const char *drive_url, uint8_t *elf_data0, int elf_len0)
{
//// Begin Test: Patch the ELF Data to a.out in Initial RAM Disk
extern uint8_t elf_data[];
extern uint8_t elf_data[]; // From riscv_machine.c
extern int elf_len;
elf_len = elf_len0;

// Must copy ELF Data to Local Buffer because it will get overwritten
printf("elf_len=%d\n", elf_len);
if (elf_len > 4096) { puts("*** ERROR: elf_len exceeds 4096, increase elf_data and a.out size"); }
memcpy(elf_data, elf_data0, elf_len);
Expand Down

0 comments on commit b664995

Please sign in to comment.