Commit Graph

46 Commits

Author SHA1 Message Date
LagoLunatic 79542a4725 Significantly improve diffing performance and fix minor bug with bss section match percents (#316)
* Move symbol name processing from diff step to read step

* Use min_by_key instead of sorted_unstable_by_key

* Sort all symbols by address when reading the object

This fixes an underreport bug in diff_bss_section.

* More symbol sorting logic on read

* Move is_name_compiler_generated into SymbolFlag & filter out File symbols

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-01-24 19:41:03 -07:00
LagoLunatic 6ad60de32a Allow clicking on branch arrows to scroll target into view (#302) 2025-12-21 09:55:55 -07:00
LagoLunatic 32f5f202f7 Update outdated extab test snapshot (#292) 2025-11-26 17:56:32 -05:00
Luke Street 03a578c1bb Update test snapshots for new cwextab 2025-11-18 22:29:42 -07:00
Aetias 19ec08be9a Update unarm to 2.0 (#274)
* Migrate to unarm 2.0

* Update unarm to proper 2.0 release

* Deduplicate formatters for opaque instruction parts in ARM

* Add option to enable VFPv2 for ARM

* Update unarm to 2.0.1

* Fix read order for big-endian Thumb code

* Skip leading space in ARM instruction params

* Update ARM tests

* arm.rs: Use `alloc::borrow::Cow`
2025-10-12 21:13:29 -06:00
Luke Street 572afa8551 Support IDO .mdebug for line numbers (#264)
* Support IDO .mdebug for line numbers

Resolves #179

* Fix wasm build && cargo clippy --fix

* Resolve review comment
2025-09-25 10:00:40 -06:00
Luke Street 90e81fad7e Improve ARM function size inference
This allows 2-byte padding to be trimmed in ARM functions.

Resolves #253
2025-09-25 00:26:43 -06:00
Ethan Roseman e2c70342c9 Standardize the values for invalid and data opcodes (#261)
* Standardize the value for an invalid opcode
>
> This makes it so that all arches share the same value for an invalid opcode, so platform-specific logic isn't needed for checking whether instructions are valid.
Also updated dependencies

* OPCODE_DATA too
2025-09-13 12:33:06 -06:00
Anghelo Carvajal e6035b00df [MIPS] Add support for the other ABIs supported by rabbitizer (#259)
* [MIPS] Add support for the other abis supported by rabbitizer

* update test
2025-09-10 09:01:08 -06:00
Luke Street 97bcfe23d4 Update test snapshots 2025-09-08 22:40:51 -06:00
Luke Street fbdaa89cc0 Refactor data diffing & expose WASM API (#256)
* Refactor data diffing & expose WASM API

* Update test snapshots
2025-09-07 18:59:46 -06:00
iFarbod 7cc6ed2b43 Add support for x86 indirect tables (#251)
* Add support for x86 indirect tables

Closes #239

* Fix formatting issues in x86.rs

* Add x86 indirect table test
2025-09-07 11:28:23 -06:00
LagoLunatic 23009bf9a3 Implement diffing individual data symbols (#244)
* 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
2025-09-02 19:37:17 -06:00
Anghelo Carvajal 6fb4bb8855 [MIPS] Fix symbols being filtered out from target side of diff if target object contains .NON_MATCHING markers (#250)
* 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
2025-09-02 19:13:29 -06:00
Luke Street 1e62d4664c Make function size inference logic arch-specific
For MIPS, account for delay slot nops. For x86,
check for trailing nops (0x90). For PPC, check
for 4-byte 0x00 padding.

Resolves #229
2025-08-02 10:56:26 -06:00
Luke Street 8fac63c42c Remove temporary test 2025-07-17 21:23:12 -06:00
Luke Street 0fb7f3901c Add PPC COFF tests; fix IMAGE_REL_PPC_PAIR handling 2025-07-17 21:19:16 -06:00
Luke Street 60b227f45e Support PowerPC COFF (Xenon, Xbox 360)
ppc750cl is superseded by the powerpc crate, which
supports PPC64, AltiVec and VMX128 extensions.
2025-07-17 13:33:12 -06:00
Luke Street 5f48e69775 More clippy fixes 2025-07-07 15:29:30 -06:00
Mark Langen e638d0b17a Implementation of basic data flow analysis for PowerPC (#212)
* 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
2025-06-17 12:59:04 -06:00
Luke Street 8e8ab6bef8 Skip label symbols when inferring symbol sizes
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
2025-05-13 22:36:02 -06:00
Luke Street 0c48d711c7 Improve local branch relocation handling
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
2025-05-07 22:53:10 -06:00
Luke Street 8b5bf21f38 Mark combined sections as SectionKind::Unknown 2025-05-07 16:45:00 -06:00
Luke Street a1499f475d Update test snapshot 2025-05-06 22:07:21 -06:00
LagoLunatic f263e490e3 Combine data/text sections: Pad sections to alignment (#197)
* 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
2025-05-06 21:47:08 -06:00