* 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
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
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
This allows users to "map" (or "link") symbols with different names so that they can be compared without having to update either the target or base objects. Symbol mappings are persisted in objdiff.json, so generators will need to ensure that they're preserved when updating. (Example: d1334bb79e)
Resolves#117
* Guess reloc data type based on the instruction.
Adds an entry to the reloc tooltip to show the inferred data type
and value.
* Fix clippy warning
* Match on Opcode rather than mnemonic string
* Basic integration
* Implement basic right click option
Needs lotsa work
* nothing to worry about
* Convert extab diff to separate view
* Make clippy and fmt shut up
* Make clippy fmt shut up for real this time
* Print extab/extabindex symbol names in extab view
* I hate fmt
* Basic integration
* Implement basic right click option
Needs lotsa work
* nothing to worry about
* Convert extab diff to separate view
* Make clippy and fmt shut up
* Make clippy fmt shut up for real this time
* Print extab/extabindex symbol names in extab view
* I hate fmt
* Fix scroll position not being maintained from extab view
* Silly me
* Add rlwinm decoder window
* Remove extra files
* Create Cargo.lock
* Show extab symbol names in hover window
* Appease fmt
* Update symbol_diff.rs
* Update symbol_diff.rs
* Get extab symbol from extabindex relocations instead
* Update Cargo.lock
* Update Cargo.lock
* Support multiple DWARF sequences
* Rework DWARF line info parsing
- Properly handles multiple sections
in DWARF 1
- line_info moved into ObjSection
- DWARF 2 parser no longer errors with
no .text section
- Both parsers properly skip empty
sections
* Simplify line_info (no Option)
---------
Co-authored-by: Luke Street <luke.street@encounterpc.com>
No more scattered relocation handling and
feature checks. Everything will go through
the ObjArch trait, which makes it easier
to add new architectures going forward.
- Add `objdiff-cli report changes` for diffing two reports
- Unify some click-to-highlight logic between CLI and GUI
- Load .splitmeta section for extra object metadata (original virtual addr, etc)
- More work on objdiff-cli diff