* Implement diffing individual data symbols
* Remove unused code for diffing sections
* Data diff view: Make rows show offset within the symbol, not within the section
* Remove SelectedSymbol enum as it only has a single variant now
* Create fake data section symbols to allow diffing entire sections again
* Fix text sections not having their size zeroed out
* Update test snapshots
* Clean up code for inferring section symbol size
* Fix bug where PPC pool references weren't ignoring section symbols
* Update comment
* Always add unique section symbols for data sections
* Update test snapshots
* Remove unnecessary clone in format! call
* Auto-start mapping for unpaired data symbols
* Fix filtering out symbols from the target side that have a symbol with the same name and a `.NON_MATCHING` suffix.
- Target side: Show all the symbols except the `.NON_MATCHING` ones.
- Base side: Ignore all the `.NON_MATCHING` symbols and also ignore the ones with the same name without the suffix
* fmt
* comment
* tests
* fmt tests
* maybe this could fix wasm?
* Fix wasm?
* fmt
* Move `DiffSide` to `diff` mod
* Update the stuff the advisories CI told me to
* Improve automatic symbol pairing for nameless literals
* Fix data reloc diffing when the reloc points to an in-function static symbol
* Only pair up literals that match perfectly
* Clippy
* Do two separate passes when pairing up literals
* Fix partially-matching literal pairups not working right
* Remove duplicate $ splitting code
* Implement $ splitting for section names too
* Minor cleanup
Check raw code length when instructions have same disassembly
but different encodings. Marks as OpMismatch to indicate
encoding difference.
Fixes#242Fixes#233
Seeing how commonly used boricj's delinker extension is, it makes sense for this one to be included by default, before #238 is considered and worked on.
This allows explicitly ignoring changes to certain
files or directories, even if the changed file ends
up matching `watch_patterns`. The default value,
`build/**/*` will ensure that changes in the build
directory will not trigger a duplicate rebuild.
Resolves#143Resolves#215
This has been unimplemented since v3.0.0-alpha.1,
and I don't currently have plans to bring it back.
If you need it for something, please open an issue!
* Fix data flow analysis for multiple text sections
* Data flow analysis results were only keyed by the symbol (function)
address. That doen't work if there are multiple text sections, the
result from the first function in one section will stomp the result
from the first function in another because both have address zero.
* Remove the ambiguity by keying off of the section address as well.
* Formatting
* Satisfy wasm build
* Clippy
* Formatting again
* Thought that section was the section address not the section number.
---------
Co-authored-by: Luke Street <luke.street@encounterpc.com>
* WIP implementation
* * Move flow analysis to dedicated file
* Show string constants inline
* Handle calls to MWCC "sled" helpers which otherwise disrupt flow analysis
* Run cargo insta review
* Apply clippy feedback
* Update more tests.
* Remove std use from ppc flow analysis
* Try to make wasm build work again
* More test changes
* Probably last wasm fix
* Formatting
* Fix WASM
* One more clippy thing
* Fixed display of float constants in a LFS or LFD instruction in case where there is a branch to the subsequent instruction with a different register value.
* On lines with a reloc, only hide Symbol type data flow values rather than all data flow values.
* Formatting
* Use symbol name when comparing against an externed reloc
For partial matching files, often a symbol is externed even though it
should exist in the target object. We can still compare the symbol name,
instead of always returning a mismatch.
* Combine cases, and apply change reloc_eq in code.rs
When searching for a symbol by name, only look at
symbols that are defined within the object,
ignoring extern symbols (symbols without section).
Fixes#180Fixes#181
COFF objects in particular don't contain the size of
symbols. We infer the size of these symbols by
extending them to the next symbol. If a tool emits
symbols for branch targets, this causes the inferred
size to be too small.
This checks if a symbol starts with a certain prefix
(right now, just .L or LAB_), and skips over it
during symbol size inference.
Resolves#174
We have specific diff logic that relies on knowing
which object is the target object, and which is the
base. generate_mapping_symbols was designed in such
a way that it would reverse the target/base, leading
to a match percent shown that's different when it
gets applied.
Fixes#200
Reworks the local-branch handling logic to be more
unified: scan_instructions does all the work up front,
and process_instruction / display_instruction can
simply use the calculated branch destination instead
of performing their own is-relocation-target-
function-local checks.
(Hopefully) Fixes#192