From c0e0b93f5305fd7746f8188df5c3943be2d061be Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Thu, 11 Jun 2026 21:48:27 -0400 Subject: [PATCH 1/2] Fix MSP430 default calling convention. ...which, as far as I can tell, has been completely backwards since this code was shipped. --- arch/msp430/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/msp430/src/lib.rs b/arch/msp430/src/lib.rs index 0655cc853f..6adb9da062 100644 --- a/arch/msp430/src/lib.rs +++ b/arch/msp430/src/lib.rs @@ -30,14 +30,14 @@ pub extern "C" fn CorePluginInit() -> bool { // standardized one that is compatible with TI's compiler let default = calling_convention::ConventionBuilder::new(arch) .is_eligible_for_heuristics(true) - .int_arg_registers(&["r15", "r14", "r13", "r12"]) - .return_int_reg("r15") - .return_hi_int_reg("r14") + .int_arg_registers(&["r12", "r13", "r14", "r15"]) + .return_int_reg("r12") + .return_hi_int_reg("r13") .register("default"); calling_convention::ConventionBuilder::new(arch) .is_eligible_for_heuristics(true) - .return_int_reg("r15") - .return_hi_int_reg("r14") + .return_int_reg("r12") + .return_hi_int_reg("r13") .register("stack"); arch.set_default_calling_convention(&default); From 99160866ff3a335b172bc4cf2b820f893cab867c Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Thu, 11 Jun 2026 11:09:54 -0700 Subject: [PATCH 2/2] [ELF] Improve performance of loading binaries with many sections not mapped into the address space These sections are added to the parent view. Do the work within a bulk segment modification to significantly reduce the overhead of adding sections. --- view/elf/elfview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/view/elf/elfview.cpp b/view/elf/elfview.cpp index d5ff0ef4b2..bfb5c68b2c 100644 --- a/view/elf/elfview.cpp +++ b/view/elf/elfview.cpp @@ -615,6 +615,7 @@ bool ElfView::Init() Elf64SectionHeader symbolTableSection; BeginBulkAddSegments(); + GetParentView()->BeginBulkAddSegments(); uint64_t segmentStart = 0; for (size_t i = 1; i < m_elfSections.size(); i++) { @@ -736,6 +737,7 @@ bool ElfView::Init() } } + GetParentView()->EndBulkAddSegments(); EndBulkAddSegments(); // Apply architecture and platform if (!m_arch)