mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Set the target of string relocs to the string index.
This commit is contained in:
parent
7fb22bd1e4
commit
bc78b84869
2 changed files with 10 additions and 5 deletions
|
@ -302,9 +302,8 @@ qfo_relocs (qfo_t *qfo)
|
|||
break;
|
||||
case rel_def_string:
|
||||
printf (" def@%d:%x string:%x `%s'",
|
||||
reloc->space, reloc->offset,
|
||||
QFO_STRING (qfo, reloc->space, reloc->offset),
|
||||
QFO_GSTRING (qfo, reloc->space, reloc->offset));
|
||||
reloc->space, reloc->offset, reloc->target,
|
||||
QFO_GETSTR (qfo, reloc->target));
|
||||
break;
|
||||
case rel_def_field:
|
||||
def = qfo->defs + reloc->target;
|
||||
|
|
|
@ -315,10 +315,16 @@ qfo_from_progs (pr_info_t *pr)
|
|||
|
||||
qfo->num_loose_relocs = qfo->num_relocs - (reloc - qfo->relocs);
|
||||
for (r = pr->relocs; r; r = r->next) {
|
||||
if (r->type == rel_def_op)
|
||||
if (r->type == rel_def_op) {
|
||||
qfo_encode_one_reloc (r, &reloc, r->label->dest->offset);
|
||||
else
|
||||
} else if (r->type == rel_def_string) {
|
||||
def_t d;
|
||||
d.space = r->space;
|
||||
d.offset = r->offset;
|
||||
qfo_encode_one_reloc (r, &reloc, D_STRING (&d));
|
||||
} else {
|
||||
qfo_encode_one_reloc (r, &reloc, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return qfo;
|
||||
|
|
Loading…
Reference in a new issue