Loading dyngen.c +39 −25 Original line number Diff line number Diff line Loading @@ -1910,6 +1910,7 @@ void gen_code(const char *name, host_ulong offset, host_ulong size, char relname[256]; int type; int addend; int is_label; int reloc_offset; for(i = 0, rel = relocs;i < nb_relocs; i++, rel++) { if (rel->r_offset >= start_offset && Loading @@ -1930,7 +1931,19 @@ void gen_code(const char *name, host_ulong offset, host_ulong size, get_reloc_expr(relname, sizeof(relname), sym_name); type = ELF32_R_TYPE(rel->r_info); is_label = get_reloc_expr(relname, sizeof(relname), sym_name); addend = rel->r_addend; if (is_label) { switch (type) { case R_PPC_REL24: fprintf (outfile, " tcg_out_reloc(s, gen_code_ptr + %d, %d, %s, %d);\n", reloc_offset, type, relname, addend); break; default: error ("unsupported ppc relocation (%d)", type); } } else { switch(type) { case R_PPC_ADDR32: fprintf(outfile, " *(uint32_t *)(gen_code_ptr + %d) = %s + %d;\n", Loading Loading @@ -1958,6 +1971,7 @@ void gen_code(const char *name, host_ulong offset, host_ulong size, } } } } #elif defined(CONFIG_FORMAT_MACH) struct scattered_relocation_info *scarel; struct relocation_info * rel; Loading Loading
dyngen.c +39 −25 Original line number Diff line number Diff line Loading @@ -1910,6 +1910,7 @@ void gen_code(const char *name, host_ulong offset, host_ulong size, char relname[256]; int type; int addend; int is_label; int reloc_offset; for(i = 0, rel = relocs;i < nb_relocs; i++, rel++) { if (rel->r_offset >= start_offset && Loading @@ -1930,7 +1931,19 @@ void gen_code(const char *name, host_ulong offset, host_ulong size, get_reloc_expr(relname, sizeof(relname), sym_name); type = ELF32_R_TYPE(rel->r_info); is_label = get_reloc_expr(relname, sizeof(relname), sym_name); addend = rel->r_addend; if (is_label) { switch (type) { case R_PPC_REL24: fprintf (outfile, " tcg_out_reloc(s, gen_code_ptr + %d, %d, %s, %d);\n", reloc_offset, type, relname, addend); break; default: error ("unsupported ppc relocation (%d)", type); } } else { switch(type) { case R_PPC_ADDR32: fprintf(outfile, " *(uint32_t *)(gen_code_ptr + %d) = %s + %d;\n", Loading Loading @@ -1958,6 +1971,7 @@ void gen_code(const char *name, host_ulong offset, host_ulong size, } } } } #elif defined(CONFIG_FORMAT_MACH) struct scattered_relocation_info *scarel; struct relocation_info * rel; Loading