diff --git a/SheepShaver/src/kpx_cpu/src/cpu/jit/dyngen.c b/SheepShaver/src/kpx_cpu/src/cpu/jit/dyngen.c index ecca6ebd..e3e53465 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/jit/dyngen.c +++ b/SheepShaver/src/kpx_cpu/src/cpu/jit/dyngen.c @@ -1236,6 +1236,9 @@ int load_elf(const char *filename, FILE *outfile, int out_type) elf_shdr *rodata_cst4_sec; uint8_t *rodata_cst4 = NULL; int rodata_cst4_shndx; + elf_shdr *rodata_cst8_sec; + uint8_t *rodata_cst8 = NULL; + int rodata_cst8_shndx; elf_shdr *rodata_cst16_sec; uint8_t *rodata_cst16 = NULL; int rodata_cst16_shndx; @@ -1315,6 +1318,11 @@ int load_elf(const char *filename, FILE *outfile, int out_type) rodata_cst4_shndx = rodata_cst4_sec - shdr; rodata_cst4 = sdata[rodata_cst4_shndx]; } + rodata_cst8_sec = find_elf_section(shdr, ehdr.e_shnum, shstr, ".rodata.cst8"); + if (rodata_cst8_sec) { + rodata_cst8_shndx = rodata_cst8_sec - shdr; + rodata_cst8 = sdata[rodata_cst8_shndx]; + } rodata_cst16_sec = find_elf_section(shdr, ehdr.e_shnum, shstr, ".rodata.cst16"); if (rodata_cst16_sec) { rodata_cst16_shndx = rodata_cst16_sec - shdr; @@ -1401,6 +1409,11 @@ int load_elf(const char *filename, FILE *outfile, int out_type) do_print_code(outfile, gen_dot_prefix(name), rodata_cst16 + sym->st_value, 16); fprintf(outfile, "#endif\n"); } + else if (sym->st_shndx == (rodata_cst8_sec - shdr)) { + fprintf(outfile, "#ifdef DYNGEN_IMPL\n"); + do_print_code(outfile, gen_dot_prefix(name), rodata_cst8 + sym->st_value, 8); + fprintf(outfile, "#endif\n"); + } else if (sym->st_shndx == (rodata_cst4_sec - shdr)) { fprintf(outfile, "#ifdef DYNGEN_IMPL\n"); do_print_code(outfile, gen_dot_prefix(name), rodata_cst4 + sym->st_value, 4);