* 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
* Add data info for superh
* fmt
* Fetch symbol data dynamically from resolved.section
* Remove unused var
---------
Co-authored-by: Luke Street <luke@street.dev>
* Combine data/text sections: Pad all sections to 4-byte minimum alignment
* Update x86 test snapshot
* Read and store object section alignment
* Combine data/text sections: Pad sections to more than 4-byte alignment if they have alignment specified
* Reimplement colorized data relocation hover diffs
* Fix objdiff-wasm build
Data diffing doesn't seem to be fully implemented in objdiff-wasm yet, so just putting placeholders in so it compiles.
* Reloc hover: Add separators, override special color too