gimli
gimli copied to clipboard
Be able to change encoding at UnitTable::from
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.
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?
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.