d2r2: deduper fixes/simplification, first half of structured namespace support

This commit is contained in:
Ryan Fleury
2026-05-04 15:41:23 -07:00
parent 8f65f466f5
commit aee299efe7
4 changed files with 670 additions and 415 deletions
+1 -1
View File
@@ -583,7 +583,7 @@ dw2_reference_info_off_from_form_val(DW2_ParseCtx *ctx, DW2_FormVal *v)
case DW_Form_Ref4: case DW_Form_Ref4:
case DW_Form_Ref8: case DW_Form_Ref8:
{ {
result = v->u128.u64[0]; result = ctx->unit_base_info_off + v->u128.u64[0];
}break; }break;
// TODO(rjf): DW_Form_RefAddr, DW_Form_RefUData, DW_Form_RefSig8, DW_Form_RefSup8, etc. // TODO(rjf): DW_Form_RefAddr, DW_Form_RefUData, DW_Form_RefSig8, DW_Form_RefSup8, etc.
} }
+1
View File
@@ -63,6 +63,7 @@ struct DW2_ParseCtx
DW_Ext ext; DW_Ext ext;
U64 addr_size; U64 addr_size;
U64 unit_base_addr; U64 unit_base_addr;
U64 unit_base_info_off;
DW2_AbbrevMap *abbrev_map; DW2_AbbrevMap *abbrev_map;
DW2_OffsetTable *rnglists_table; DW2_OffsetTable *rnglists_table;
DW2_OffsetTable *str_offsets_table; DW2_OffsetTable *str_offsets_table;
File diff suppressed because it is too large Load Diff
+1
View File
@@ -22,6 +22,7 @@ struct D2R2_UniqueTagNode
D2R2_UniqueTagKind kind; D2R2_UniqueTagKind kind;
U64 hash; U64 hash;
U64 info_off; U64 info_off;
U64 container_ancestor_info_off;
U64 order_idx; U64 order_idx;
}; };