A few issues were causing linker errors:
- Auto-splits could contain symbols that have a
higher alignment than the split itself. Detect
this and create a new auto-split at these symbols.
- The analyzer can miss objects in between other
objects if there are no direct relocations to them.
In these cases, non-zero data could just get totally
lost. Detect and create symbols for these.
This allows WAD projects to use the auto-extraction
feature: decomp-toolkit will extract all `object`s
from a disc file or WAD file that exists in the
configured `object_base`.
This command was an early experiment and only worked
correctly on one game. The project system has long
superseded it. ELFs are better supported by
generating a project config via `elf config` and
using the DOL as the object target.
Closes#1Closes#4Closes#21
When a link order is unresolvable, decomp-toolkit
now prints out all of the TUs in a cycle, easing
debugging.
Example:
```
Cyclic dependency encountered while resolving link order: Dolphin/os/__start.c -> Dolphin/os/__ppc_eabi_init.cpp -> Dolphin/pad/PadClamp.c -> Dolphin/pad/pad.c
```
Thanks @simonlindholm for the toposort impl.
Extract configuration is now emitted in the output config, so
tooling can load and perform their own tasks on extracted assets
without having to parse YAML.
`header_type`:
- `symbol` (default): Emit a full symbol declaration.
- `raw`: Emit raw array data (for wrapping in your own declaration)
- `none`: Don't emit a header at all. (For custom processing)
`custom_type`/`custom_data`: Passed through to the output config
as-is for custom tasks.