mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-21 00:31:50 +00:00
fix build on FC2/x86_64 (Bob Deblier)
This commit is contained in:
parent
bfd1c7b659
commit
c45fa9c75e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user