For engineers
Firmware on PowerPC, SuperH or Xtensa? How well tools see it
By Manish SharmaPublished 11 min read
Founder and CEO, MAGDOX. Writes on firmware security and device regulation.
Firmware analysis tools are tuned for ARM and x86, so other CPUs often get weaker results. We measured FDIE against compiler ground truth on stripped builds of BusyBox, Dropbear and two test programs. On eight less common Linux instruction sets, it went from naming no import call to naming 96.1% to 98.0% of them on six. SuperH call edges went from 0% to 95.9%, but Xtensa is still the weakest at 64.6% of call edges, and switch tables on these instruction sets are not read yet.
Results as of . We keep improving FDIE’s engine for accuracy, so later runs may score differently; this post records what we measured on that date.
In short
- On eight less common Linux instruction sets, FDIE named no import call before this work. It now names 96.1% to 98.0% of them on six.
- SuperH call edges went from 0% to 95.9%, mostly by following calls through literal pools. Xtensa is still the weakest at 64.6%.
- Most of these numbers come from our own stripped builds scored against compiler ground truth, not from shipped firmware.
Most connected devices run ARM or MIPS, but not all. Industrial and telecom gear still ships PowerPC, FPGA-based designs run MicroBlaze or Nios II soft cores, and every ESP32 and ESP8266 runs Xtensa. A tool that names functions and calls well on ARM but quietly falls apart on the rest gives you an uneven picture of your product line.
In October 2026 we measured FDIE on eight of these instruction sets against compiler ground truth, then fixed what the numbers showed and measured again. This post covers what makes them hard, what we changed, the numbers and where we are still weak.
Why does function recovery matter?
Everything after disassembly is built on function starts and call edges, so a missed call is a missed finding.
When FDIE matches a CVE to a library in your image, it tells you whether your programs call the vulnerable function. If the call goes through a stub the analysis cannot name, the answer is "unknown". Taint leads and function changes between releases depend on the same graph. Before this work, FDIE named no import call at all on these eight instruction sets.
How do you measure function recovery?
We compiled programs with symbols and debug information, then stripped a copy. Each tool got only the stripped copy, and we scored the results against the truth taken from the build.
The programs were BusyBox 1.37.0 and Dropbear 2026.93 at -Os, plus two small test programs with switch tables of every form and functions that never return. The truth is every function symbol, every call in the assembly and the functions DWARF marks as never returning.
| Instruction set | Toolchain and C library | Functions in the truth | Call edges |
|---|---|---|---|
| PowerPC (32-bit, big endian) | Debian GCC 14, glibc | 4,774 | 20,581 |
| s390x | Debian GCC 14, glibc | 4,718 | 18,026 |
| SuperH (SH4) | Debian GCC 14, glibc | 4,689 | 18,009 |
| m68k (68020) | Debian GCC 14, glibc | 4,658 | 14,993 |
| SPARC (V8) | Bootlin 2026.08, uClibc | 4,001 | 21,871 |
| MicroBlaze (big endian) | Bootlin 2026.08, musl | 3,820 | 17,602 |
| Nios II | Bootlin 2024.05, glibc | 4,667 | 19,421 |
| Xtensa (LX60, windowed) | Bootlin 2026.08, uClibc, -mlongcalls | 4,026 | 19,115 |
Scores are recall and precision (R / P) in percent, for four things:
- function starts
- boundaries, the share of found functions whose extent is right
- call edges
- calls to library functions
Ghidra 12.1.4 and Rizin 0.9.1 ran unmodified, and we used their output only as reference data.
Decoders first
Before looking at calls, we compared each decoder with GNU objdump on every instruction of every function. Most already agreed, and three needed work.
PowerPC (405,083 instructions), SPARC, Nios II, Xtensa and MicroBlaze left nothing undecoded, and SuperH left 5 of 598,312. The s390x decoder skipped 464 instructions, mostly z196 binary floating point, and now skips 30. The m68k decoder skipped 2,411, mostly 68020 mul.l and div.l forms and 68881 floating point, and now skips 137.
The most expensive bug was on PowerPC. Position-independent 32-bit code loads its own address with bcl 20,31,$+4 followed by mflr. That bcl links to the very next instruction, so FDIE read it as a call and split every such function after its third instruction. Fixing it took PowerPC boundaries from 18.9% to 95.3% and call edges from 2.9% to 60.1%, before any of the work below.
Import calls: one stub shape per instruction set
Each instruction set reaches library functions through a differently shaped stub, and FDIE now reads each one.
- PowerPC. With GCC's
-msecure-plt, the stubs live in.textand load their target from the GOT relative to r30. Each caller sets up r30 withbcl 20,31; mflr r30; addis; addi. The value differs per linked object, so one stub can look different from different callers. BusyBox has 3,646 such stubs for 385 imports. FDIE names a stub by the slot most of its callers' r30 reaches, and leaves it unnamed when they disagree rather than guessing. All 385 imports the truth labels are named correctly. - s390x stubs load the slot with
larl %r1,slot. m68k stubs jump throughjmp ([%pc,d]). MicroBlaze stubs build the address withimmandlwi r12, absolute or through the GOT. SuperH stubs load a literal word aftermov.l, absolute or relative to the GOT in r12. - SPARC is different again. The dynamic linker rewrites the PLT entry itself at run time, so the stub is identified by the offset of its jump-slot relocation.
- Nios II and Xtensa with long calls have no stub in the call path at all. The call loads the GOT slot itself, and the slot is named from its relocation.
Calls through literal pools: SuperH and Xtensa
On SuperH, and on Xtensa built the way ESP-IDF builds ESP32 firmware, compilers call through an address loaded from a literal pool. A tool that does not follow the literal sees almost no calls.
SuperH's direct branch range is short, so GCC loads the target with mov.l @(disp,PC),Rn. It then calls it with jsr @Rn, or bsrf Rn for library calls.
On Xtensa, the GCC manual says -mlongcalls makes the assembler "translate direct calls to indirect calls" unless the target is known to be in range. The result is l32r aN, literal followed by callx8 aN for every call across sections. FDIE now does three things here:
- follows the register from the literal load to the call
- requires a windowed Xtensa call to land on an
entryinstruction - marks literal words as data, so no later pass decodes them
A literal holding a library slot names the import. SuperH call edges went from 0% to 95.9%, and start precision from 52.7% to 92.5%. In BusyBox alone, 1,627 false starts had been pool words read as code. Xtensa call edges went from 2.6% to 64.6%.
Pointers, prologues and fixed-address programs
Some functions are reached only through pointers, such as callbacks and BusyBox's applet table, so FDIE also scans data for code addresses and recognises function prologues.
MicroBlaze showed why both need care. BusyBox's applet table lay beyond the part of the program FDIE scanned for pointers. Scanning further found those functions, but it also read the switch tables in .rodata as function pointers. In a fixed-address program, those tables are plain lists of case addresses.
The result was 1,164 false starts, and start precision fell from 92.8% to 73.9%. FDIE now treats a run of code addresses that all land inside one function's span as a switch table. A run spread across the program, like the applet table, is kept. MicroBlaze start recall went from 36.3% to 97.2%, at 90.9% precision.
Prologue patterns were added for four instruction sets:
- s390x:
stmg - MicroBlaze:
addik r1,r1,-n - Nios II:
addi sp,sp,-n - m68k without a frame pointer:
movem.l,lea,subq.lon a7
A prologue that a nearby branch reaches is a register save inside a function, not a new one. Nios II calls through the GOT in r22 are now followed too. On Nios II, BusyBox call edges went from 5,232 to 15,046 of 16,772.
Before and after
All eight instruction sets were measured on 19 October 2026, on the same four programs and the same truth. Figures are R / P in percent, with bounds and PLT as one share.
| Starts | Bounds | Edges | Import edges | PLT named | Never return | |
|---|---|---|---|---|---|---|
| PowerPC, before | 97.4 / 91.1 | 95.3 | 60.1 / 67.3 | 0 | 0 | 30.7 / 100.0 |
| PowerPC, after | 97.5 / 91.1 | 95.4 | 87.4 / 97.9 | 97.4 / 97.5 | 99.6 | 82.7 / 100.0 |
| s390x, before | 88.2 / 98.8 | 92.8 | 68.2 / 68.9 | 0 | 0 | 41.3 / 100.0 |
| s390x, after | 96.7 / 97.8 | 97.4 | 98.4 / 98.4 | 97.8 / 97.8 | 100.0 | 84.0 / 100.0 |
| SuperH, before | 83.8 / 52.7 | 73.4 | 0.0 / 0.0 | 0 | 0 | 12.0 / 64.3 |
| SuperH, after | 94.4 / 92.5 | 94.5 | 95.9 / 95.1 | 96.2 / 95.0 | 100.0 | 81.3 / 98.4 |
| m68k, before | 82.8 / 98.3 | 86.9 | 62.7 / 63.2 | 0 | 0 | 28.0 / 100.0 |
| m68k, after | 90.0 / 97.5 | 91.9 | 95.8 / 95.4 | 96.2 / 96.4 | 100.0 | 78.7 / 100.0 |
| SPARC, before | 99.1 / 99.8 | 99.2 | 67.1 / 67.2 | 0 | 0 | 78.7 / 100.0 |
| SPARC, after | 99.3 / 99.8 | 99.3 | 98.4 / 98.7 | 98.0 / 98.2 | 100.0 | 85.3 / 100.0 |
| MicroBlaze, before | 36.3 / 92.8 | 82.5 | 17.0 / 44.3 | 0 | n/a | 13.3 / 90.9 |
| MicroBlaze, after | 97.2 / 90.9 | 96.6 | 95.4 / 92.9 | 96.1 / 96.6 | n/a | 88.0 / 98.5 |
| Nios II, before | 61.3 / 65.0 | 83.0 | 27.1 / 31.1 | 0 | n/a | 34.7 / 96.3 |
| Nios II, after | 88.0 / 85.7 | 89.1 | 86.2 / 88.8 | 87.5 / 90.6 | n/a | 82.7 / 93.9 |
| Xtensa, before | 53.6 / 56.6 | 48.1 | 2.6 / 18.4 | 0 | n/a | 2.7 / 40.0 |
| Xtensa, after | 86.9 / 81.9 | 80.6 | 64.6 / 64.6 | 65.2 / 69.4 | n/a | 73.3 / 83.3 |
PLT is "n/a" where the toolchain emits no labelled stubs. A few precision figures went down slightly while recall rose much more: s390x, m68k and MicroBlaze starts, and Nios II never-return. We report them rather than hide them.

How does it compare with Ghidra and Rizin?
On the instruction sets the reference tools support, FDIE now finds more call edges than Ghidra 12.1.4 on SuperH, m68k and SPARC, and about as many on PowerPC. Ghidra keeps an edge on some start precision and on Xtensa.
Ghidra and Rizin ran once, on the same four programs and the same truth, so their results do not depend on our changes.
| Call edges, R / P | FDIE | Ghidra 12.1.4 | Rizin 0.9.1 |
|---|---|---|---|
| PowerPC | 87.4 / 97.9 | 87.0 / 98.0 | 39.0 / 43.3 |
| s390x | 98.4 / 98.4 | no support | 0.0 / n/a |
| SuperH | 95.9 / 95.1 | 33.9 / 64.8 | 30.8 / 46.4 |
| m68k | 95.8 / 95.4 | 53.3 / 53.2 | 50.1 / 89.1 |
| SPARC | 98.4 / 98.7 | 89.7 / 98.6 | 40.1 / 65.3 |
Function starts and boundaries tell a more mixed story:
| Starts and boundaries | Ghidra 12.1.4 | FDIE |
|---|---|---|
| Start precision, PowerPC | 95.4% | 91.1% |
| Start precision, SuperH | 99.8% | 92.5% |
| Starts found, SuperH | 65.8% | 94.4% |
| Boundaries, PowerPC | 96.9% | 95.4% |
| Boundaries, m68k | 97.2% | 91.9% |
On SuperH boundaries, both reference tools cut functions short (6.4% and 5.5%). Ghidra and Rizin do not support MicroBlaze or Nios II, so there is no reference for those two.
On Xtensa, Ghidra was given only the three smaller programs. It found 84.9% of starts at 99.3% precision, and 99.4% of boundaries. We were at 58.3% of starts on that set in the earlier round. Our newer numbers include BusyBox, so they are not comparable, and we do not claim to have caught up on Xtensa function starts.
Where we are still weak
Xtensa is the weakest of the eight, and switch tables are not read on any of them. Most of these numbers also come from our own builds rather than from shipped firmware.
- Xtensa call edges are at 64.6% recall and precision. Most wrong edges come from false function starts the engine already had (1,512 in BusyBox before this round, 720 after). Their callers are not real functions.
- Nios II position-independent calls: Dropbear is at 1,649 of 2,600 edges. The rest go through registers loaded elsewhere.
- Switch tables on these eight instruction sets are only kept out of the pointer scan, not read as tables.
- Real images. Before this round we checked Debian's busybox-static 1.38.0-3 for sh4 against its debug symbols (4,454 functions). FDIE found 79.3% of function starts, and 70.7% of its starts were real; we have not re-measured it since. The PowerPC OpenWrt TL-WDR4900 image runs end to end but has no truth to score against. We found no public MicroBlaze or Nios II image, and SPARC, m68k and s390x are measured on our builds only.

If your products use these processors, ask any vendor, us included, for recall and precision per instruction set against a known answer, and which programs they come from. A feature table can list every instruction set while the tool finds a tenth of the calls on one of them.
Questions
Which instruction sets does FDIE disassemble?
Twenty-two, each measured against compiler ground truth, among them ARM, AArch64, MIPS, x86-64, RISC-V, PowerPC, s390x, SPARC, m68k, MicroBlaze, Nios II, SuperH, Xtensa, TriCore, MSP430, AVR, dsPIC, PIC18 and 8051. ARC programs are read for architecture and libraries but not disassembled.
Why are calls on SuperH and Xtensa hard to recover from a binary?
Compilers often call through a literal pool on these instruction sets. They load a 32-bit function address from a constant placed near the code and then call the register. A tool that does not follow the literal sees no call at all.
Were these numbers measured on real firmware?
Mostly on our own stripped builds of BusyBox 1.37.0, Dropbear 2026.93 and two test programs, where the exact answer is known. SuperH was also measured on Debian's busybox-static package. We found no public firmware image for MicroBlaze or Nios II, and SPARC, m68k and s390x were measured on our builds only.
How does FDIE compare with Ghidra on these instruction sets?
On the same programs FDIE found more call edges than Ghidra 12.1.4 on SuperH, m68k and SPARC, and about as many on PowerPC. Ghidra was more precise on some function starts and ahead on Xtensa. It has no s390x, MicroBlaze or Nios II support.
Sources
- Ghidra (National Security Agency), official repository github.com
- Rizin, official site rizin.re
- GCC manual, Xtensa options (-mlongcalls) gcc.gnu.org
- GCC manual, RS/6000 and PowerPC options (-msecure-plt) gcc.gnu.org
- Bootlin toolchains toolchains.bootlin.com
- BusyBox busybox.net
- Dropbear SSH matt.ucc.asn.au
- Debian ports (sh4 and other architectures) ports.debian.org
OpenWrt is a registered trademark of Software Freedom Conservancy; see openwrt.org. Product and project names are trademarks of their owners, used only to identify the public firmware, software and standards discussed. MAGDOX is not affiliated with or endorsed by them.