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) {
int st_ofs = st - pr.code->code;
if (def->alias) {
if (def->offset_reloc)
reloc_op_def_ofs (def->alias, st_ofs, field);
else
reloc_op_def (def->alias, st_ofs, field);
free_def (def);
} else {
reloc_op_def (def, st_ofs, field);
while (def->alias) {
//FIXME it seems there is a bug somewhere creating chains
//of aliases
def_t *a = def;
def = def->alias;
free_def (a);
}
reloc_op_def (def, st_ofs, field);
}
}