Handle chains of alias defs so relocs will be emitted.

This commit is contained in:
Bill Currie 2011-03-05 08:39:16 +09:00
parent bbedbf5c9c
commit 7fd839a5ed

View file

@ -139,15 +139,14 @@ add_statement_def_ref (def_t *def, dstatement_t *st, int field)
if (def) { if (def) {
int st_ofs = st - pr.code->code; int st_ofs = st - pr.code->code;
if (def->alias) { while (def->alias) {
if (def->offset_reloc) //FIXME it seems there is a bug somewhere creating chains
reloc_op_def_ofs (def->alias, st_ofs, field); //of aliases
else def_t *a = def;
reloc_op_def (def->alias, st_ofs, field); def = def->alias;
free_def (def); free_def (a);
} else {
reloc_op_def (def, st_ofs, field);
} }
reloc_op_def (def, st_ofs, field);
} }
} }