- Format with rustfmt; fix clippy lints
- Add module documentation
- Reject invalid record types instead of silently skipping
- Recognize the DWARF segment class as debug sections
- Add read_core,omf to the feature test matrix
- Add Borland and Watcom test files (from object-testfiles)
- Add objdump snapshot outputs for all OMF test files
- Verify LIDATA expansion content and COMDAT sections/symbols in tests
- Fix SEGDEF length field size to depend on record type, not the P (use32)
bit, and honor the B (big) bit. This fixes parsing of Borland objects.
- Parse COMDAT records per the TIS spec (separate align byte, conditional
public base fields), synthesize sections and symbols for them, and
support continuation and iterated data.
- Allow FIXUPP records to follow COMDAT records.
- Support Borland virtual segments (COMDEF with a segment index data type,
referenced via segment indices with bit 14 set).
- Read the FIXUP M bit from the correct byte (LOCAT instead of fix data).
- Fix iterated data (LIDATA) repeat/block counts to be plain integers
rather than COMDEF-style encoded values, support multiple consecutive
blocks, and propagate expansion errors.
- Fix relocation section targets to use 1-based section indices.
- Rework relocation kind mapping: self-relative fixups map to Relative
with an end-of-location addend; segment-relative offsets map to Absolute
(FLAT frame) or SectionOffset (target-section frame).
- Return empty imports/exports like other relocatable formats.
The goal is to reduce the amount of casts required by API users, and
make it easier to correctly handle overflow later (not implemented by
this commit).
usize is still used in many places for counts.
Breaking changes:
- WritableBuffer trait method signatures
- various low level writer APIs
.dynsym needs to link to .dynstr. This matches the existing logic
for .symtab and .strtab. Also some minor dynstr_len cleanup.
Writer originally required this, but was changed in f3432e98. This
change was because there are files in the wild that are missing .dynstr,
and Builder needed to be able to handle them. Now that Builder is no
longer using Writer, I don't see any downside to writing the empty
.dynstr, so I think it's better to change Writer back again.
It's still possible to omit .dynstr if you use Builder (which uses
Encoder directly, not Writer), and there is a test for this.