Ensure the target of def_op relocs gets updated.

These occur only when switch statements use jump tables, thus why the
problem went unnoticed :/
This commit is contained in:
Bill Currie 2011-04-08 17:09:40 +09:00
parent 37b0648ec7
commit b522853765

View file

@ -858,6 +858,8 @@ process_loose_relocs (qfo_t *qfo)
str = QFOSTR (qfo, reloc->target);
reloc->target = linker_add_string (str);
}
if (reloc->type == rel_def_op)
reloc->target += work_base[qfo_code_space];
if (!reloc->space) {
//FIXME double check
reloc->offset += work_base[qfo_code_space];