<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/getting-perf-to-work-on-arm32-linux-part-3-the-abis-alicia-s-blog-kup91k1j0" -->

---
title: Getting perf to work on ARM32 Linux: Part 3, the ABIs –...
description: A deep technical dive into ARM32 application binary interfaces (ABIs), explaining how calling conventions, stack layout, and especially frame pointer...
canonical: https://daily.dev/posts/getting-perf-to-work-on-arm32-linux-part-3-the-abis-alicia-s-blog-kup91k1j0
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Getting perf to work on ARM32 Linux: Part 3, the ABIs – Alicia's blog | daily.dev
og:description: A deep technical dive into ARM32 application binary interfaces (ABIs), explaining how calling conventions, stack layout, and especially frame pointer...
og:url: https://daily.dev/posts/getting-perf-to-work-on-arm32-linux-part-3-the-abis-alicia-s-blog-kup91k1j0
og:image: https://api.daily.dev/og/posts/kUp91k1j0.png
og:image:alt: Getting perf to work on ARM32 Linux: Part 3, the ABIs – Alicia's blog
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting perf to work on ARM32 Linux: Part 3, the ABIs – Alicia's blog

**[Planet Igalia](https://daily.dev/sources/planet-igalia)** · 25 min read · 0 upvotes · 0 comments

## Summary

A deep technical dive into ARM32 application binary interfaces (ABIs), explaining how calling conventions, stack layout, and especially frame pointer conventions evolved across APCS, ATPCS, and AAPCS. It shows disassembled examples comparing GCC and clang frame pointer generation, revealing that GCC and clang implement mutually incompatible frame pointer layouts, that the official AAPCS frame pointer ABI was only formally specified in January 2020 (17 years after AAPCS existed), and that GCC's frame pointers are actually broken for leaf function unwinding due to a link-register-save-elimination optimization bug. It also covers Thumb-mode complications (r7 vs r11 as frame pointer register) and a race condition in stack unwinding during function prologues, concluding that reliable frame-pointer-based profiling (e.g. with perf) on ARM32 is still fragile.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blogs.igalia.com/aboya/2026/08/27/getting-perf-to-work-on-arm32-linux-part-3-the-abis>

## Questions this post answers

### Why are GCC and clang frame pointers incompatible on ARM32?

Because AAPCS did not officially specify a frame pointer ABI for 17 years after its 2003 introduction, GCC and clang independently developed similar but incompatible conventions. Clang's layout, later adopted as the official AAPCS spec in January 2020, points the frame pointer register at the saved frame pointer, while GCC's default points it at the saved link register instead, breaking naive stack-walking tools that assume one format.

_Anyone debugging cross-compiler unwinding quirks can track ARM32 ABI clarifications like this one on daily.dev._

### Why does perf record --call-graph=dwarf perform badly on a Raspberry Pi 3?

DWARF-based call graph unwinding is CPU and memory intensive because it requires parsing separate debuginfo sections per loaded object, searching program-counter tables, and decoding debug tags for every stack frame, repeated for each frame in the trace. On low-end hardware like a Raspberry Pi 3, running perf record -g --call-graph=dwarf can freeze the entire system until the OOM killer intervenes.

_Developers profiling on constrained ARM hardware can follow practical perf trade-offs like this via daily.dev._

### Why does GCC's default frame pointer handling break stack unwinding in leaf functions on ARM32?

GCC's -fno-omit-frame-pointer still applies a link-register-save-elimination optimization in leaf functions, so the frame pointer ends up pointing at the saved frame pointer rather than the saved link register as it does in non-leaf functions. An unwinder following the usual offset then misreads a random stack value as the return address, corrupting the reconstructed call chain.

_Engineers building or trusting stack unwinders can watch for edge cases like this GCC leaf-function bug on daily.dev._

## Similar posts on daily.dev

- [Thoroughly Understanding C\+\+ ABI](https://daily.dev/posts/thoroughly-understanding-c-abi-31gh0fage) · Hacker News · 3 upvotes · 0 comments
- [Lets explore the stack](https://daily.dev/posts/lets-explore-the-stack-byttrvvkv) · Meeting C\+\+ · 2 upvotes · 0 comments
- [Medium](https://daily.dev/posts/medium-qywq6zdry) · Medium · 0 upvotes · 0 comments
- [Linux Developers Looking At Retiring The x32 ABI](https://daily.dev/posts/linux-developers-looking-at-retiring-the-x32-abi-yx4prk9n4) · Phoronix · 0 upvotes · 0 comments

---

[View this post on daily.dev](https://daily.dev/posts/getting-perf-to-work-on-arm32-linux-part-3-the-abis-alicia-s-blog-kup91k1j0)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Getting perf to work on ARM32 Linux: Part 3, the ABIs – Alicia's blog","url":"https://daily.dev/posts/getting-perf-to-work-on-arm32-linux-part-3-the-abis-alicia-s-blog-kup91k1j0","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/getting-perf-to-work-on-arm32-linux-part-3-the-abis-alicia-s-blog-kup91k1j0"},"datePublished":"2026-09-20T07:44:26.039Z","dateModified":"2026-09-20T07:49:43.482Z","description":"A deep technical dive into ARM32 application binary interfaces (ABIs), explaining how calling conventions, stack layout, and especially frame pointer...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1a9fcf331a4e40672cd8b9f82ac9b5f7?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1a9fcf331a4e40672cd8b9f82ac9b5f7?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Planet Igalia","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet Igalia","logo":"https://media.daily.dev/image/upload/s--84VSWNwZ--/f_auto,q_auto/v1789890204/logos/planet-igalia?_a=BAMAMicg0","url":"https://daily.dev/sources/planet-igalia"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/getting-perf-to-work-on-arm32-linux-part-3-the-abis-alicia-s-blog-kup91k1j0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"","timeRequired":"PT25M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet Igalia","item":"https://daily.dev/sources/planet-igalia"},{"@type":"ListItem","position":3,"name":"Getting perf to work on ARM32 Linux: Part 3, the ABIs – Alicia's blog"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/getting-perf-to-work-on-arm32-linux-part-3-the-abis-alicia-s-blog-kup91k1j0#faq","mainEntity":[{"@type":"Question","name":"Why are GCC and clang frame pointers incompatible on ARM32?","acceptedAnswer":{"@type":"Answer","text":"Because AAPCS did not officially specify a frame pointer ABI for 17 years after its 2003 introduction, GCC and clang independently developed similar but incompatible conventions. Clang's layout, later adopted as the official AAPCS spec in January 2020, points the frame pointer register at the saved frame pointer, while GCC's default points it at the saved link register instead, breaking naive stack-walking tools that assume one format. Anyone debugging cross-compiler unwinding quirks can track ARM32 ABI clarifications like this one on daily.dev."}},{"@type":"Question","name":"Why does perf record --call-graph=dwarf perform badly on a Raspberry Pi 3?","acceptedAnswer":{"@type":"Answer","text":"DWARF-based call graph unwinding is CPU and memory intensive because it requires parsing separate debuginfo sections per loaded object, searching program-counter tables, and decoding debug tags for every stack frame, repeated for each frame in the trace. On low-end hardware like a Raspberry Pi 3, running perf record -g --call-graph=dwarf can freeze the entire system until the OOM killer intervenes. Developers profiling on constrained ARM hardware can follow practical perf trade-offs like this via daily.dev."}},{"@type":"Question","name":"Why does GCC's default frame pointer handling break stack unwinding in leaf functions on ARM32?","acceptedAnswer":{"@type":"Answer","text":"GCC's -fno-omit-frame-pointer still applies a link-register-save-elimination optimization in leaf functions, so the frame pointer ends up pointing at the saved frame pointer rather than the saved link register as it does in non-leaf functions. An unwinder following the usual offset then misreads a random stack value as the return address, corrupting the reconstructed call chain. Engineers building or trusting stack unwinders can watch for edge cases like this GCC leaf-function bug on daily.dev."}}]}
```

