* Infer anonymous unions from type layout
* Add comments to signify inferred types
* Improve union detection
* Fix some output weirdness
* Handle some more anonymous union edge cases
* Change union offset validation
* Skip anonymous unions with less than 2 members.
* Support FT_MW_int128
* Support OP_MW_FPREG
* Support AT_MW_mangled on local variables
* cargo fmt
---------
Co-authored-by: Luke Street <luke@street.dev>
* Added: Minimal Required Changes to Dump Sonic Heroes (PS2)
* Added: Switch for Little Endian DWARF Dump
* Added: Support for Array Ordering
* Added: Big/Little Endian Variants of u32_from_bytes
* Changed: Detect bitness from .elf header.
* Changed: Use Proper MetroWerks Names
* Changed: Use Endianness from File API
* Refactor DWARF endian handling & some fixes
* Undo accidental formatting changes
---------
Co-authored-by: Luke Street <luke@street.dev>
- With a map, attempts to detect and handle common BSS automatically
- With a map, attempts to detect and correct inflated common BSS bug (< GC 2.7 linker)
- Support for "stripped" symbols, sometimes required to match inflated common BSS sizes
- Warns on duplicated TUs in a map (other than common BSS)
- Automatically adds `comment:0` to `.s` TUs from a map (avoids linker crash)
- Displays subroutine "static" and "inline" if present
- Displays subroutine labels, blocks and inlines if present
- Displays struct member visibility if present
- Skips tags that can't be processed rather than bailing
Adds an "extract" list to project configuration:
```
extract:
- symbol: SomeData
binary: Lib/SomeData.bin
header: Lib/SomeData.inc
```
This example extracts the data of symbol
`SomeData` to `out_dir/bin/Lib/SomeData.bin`,
and a C array representation to
`out_dir/include/Lib/SomeData.inc`.
Resolves#11
- Supports games with C++ DWARF info
- Syntax highlighting when printing to console (disable with `--no-color`)
- Overall improvements to parsing and output
- Adjusts `write_rel` to use the proper ordering for relocations and imports based on the REL version.
- Adds `-r`/`--relocations` switch to `rel info` that prints (very) verbose relocation information.
- Avoid overwriting `symbols.txt` or `splits.txt` if the file was modified since it was read or if the file's contents didn't change.
- Remove `binrw` and `byteorder` dependencies, moving to `FromReader`/`ToWriter` traits.
- Migrate generic bounds to `where` clauses.
- Remove unused `build.rs` logic.
- Transparent NLZSS decompression (add `:nlzss` to path)
- Overhaul portions of the analyzer to support more games
- Reject some invalid data relocations automatically
- Jump table analysis fixes
- More robust .comment section handling
- Auto-create .comment section for objects with common symbols (MW 2.7+ hack)
- Support loading REL modules in `dol split` (currently only for references)
- Add `dol diff` for quick diffing between linked ELF and expected symbols
- Add `dol apply` for applying linked ELF symbols to symbol config file