mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-16 12:02:30 +00:00
ppc dyngen fix (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4585 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
2662e13f68
commit
90426a4e2d
14
dyngen.c
14
dyngen.c
@ -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 &&
|
||||
@ -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",
|
||||
@ -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…
Reference in New Issue
Block a user