gimli icon indicating copy to clipboard operation
gimli copied to clipboard

Be able to change encoding at UnitTable::from

Open yurydelendik opened this issue 6 years ago • 2 comments

Currently the UnitTable::from() gets encoding from from dwarf/from_unit. It will be nice to change to encoding of the resulting write::UnitTable. The write::UnitTable can be used for further transform e.g. when 32bit wasm-DWARF address space is changed to 64bit native addresses.

yurydelendik avatar Feb 01 '19 14:02 yurydelendik

Changing the address size should be safe, since we validate that addresses are in range when writing. We might want to add validation to check that units and line programs have matching address sizes.

Changing the format is always fine, again as long as it is consistent between compilation units and things they reference.

Changing the version is tricky. Might avoid allowing that for now, unless you think you'll need it?

philipc avatar Feb 02 '19 07:02 philipc

Changing the version is tricky. Might avoid allowing that for now, unless you think you'll need it?

It will be nice to have that when trying to make all CUs in one version, but it is not needed at this moment. We can use original CUs' versions for UnitTable::from operations.

yurydelendik avatar Feb 04 '19 16:02 yurydelendik