<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/building-a-custom-architecture-and-platform-part-3-wcuiwepik" -->

---
title: Building a Custom Architecture and Platform: Part 3
description: A deep technical walkthrough on adding platform support to a custom Binary Ninja architecture plugin for the fictional Quark architecture. Covers implementing...
canonical: https://daily.dev/posts/building-a-custom-architecture-and-platform-part-3-wcuiwepik
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Building a Custom Architecture and Platform: Part 3 | daily.dev
og:description: A deep technical walkthrough on adding platform support to a custom Binary Ninja architecture plugin for the fictional Quark architecture. Covers implementing...
og:url: https://daily.dev/posts/building-a-custom-architecture-and-platform-part-3-wcuiwepik
og:image: https://api.daily.dev/og/posts/WCuIwEpik.png
og:image:alt: Building a Custom Architecture and Platform: Part 3
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.

# Building a Custom Architecture and Platform: Part 3

**[Binary Ninja](https://daily.dev/sources/binary-ninja)** · 31 min read · 0 upvotes · 0 comments

## Summary

A deep technical walkthrough on adding platform support to a custom Binary Ninja architecture plugin for the fictional Quark architecture. Covers implementing calling conventions, system call handling, Platform Types versus Type Libraries, ordinal resolution for dynamic linking, WARP-based function signature generation, and a custom Workflow to rewrite IP-relative load instructions in Lifted IL so signatures match correctly. Concludes a three-part series that started with a disassembler and lifter, ending with a fully functional decompiler for the custom architecture.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://binary.ninja/2026/03/04/quark-platform-part-3.html>

## Questions this post answers

### How do I define a calling convention for a custom architecture in Binary Ninja?

Subclass CallingConvention and set fields like caller_saved_regs, callee_saved_regs, int_arg_regs, int_return_reg, and high_int_return_reg, then register it with both the Architecture and Platform via register_calling_convention and set it as default_calling_convention. For variadic functions where all arguments go on the stack instead of registers, set arg_regs_for_varargs to False.

_Developers building custom disassembler plugins can dig deeper into Binary Ninja internals on daily.dev._

### What is the difference between Platform Types and Type Libraries in Binary Ninja?

Platform Types are included in every analysis using that platform and should be kept minimal, typically just noreturn functions and syscalls, while Type Libraries hold the bulk of standard library and syscall types and are only imported into an analysis when actually used, avoiding clutter in the System Types list. Binary Ninja's first-party plugins prefer Type Libraries for this reason.

_Reverse engineers designing platform plugins can track deep-dive guides like this on daily.dev._

### Why does WARP fail to match function signatures across binaries that use ip-relative loads?

WARP ignores relocatable (variant) instructions since their bytes change per compilation, but on some architectures the ip-relative constant load spans multiple instructions and can't be distinguished from a normal register load, so it isn't marked variant and causes false mismatches. The fix rewrites the load sequence via a custom Workflow into a single ip-relative constant expression that WARP can properly detect and exclude from the signature.

_Engineers tuning binary analysis tooling can follow practical writeups like this on daily.dev._

## Similar posts on daily.dev

- [Binary Ninja 6.0 \(Krypton\)](https://daily.dev/posts/binary-ninja-6-0-krypton--lvq5myq9k) · Binary Ninja · 0 upvotes · 0 comments
- [The postmodern build system \(updated 2025\)](https://daily.dev/posts/the-postmodern-build-system-updated-2025--t57bcgqul) · Lobsters · 0 upvotes · 0 comments
- [Binary Obfuscation that Doesn't Kill LTO: A Recap of My Thotcon Talk](https://daily.dev/posts/binary-obfuscation-that-doesn-t-kill-lto-a-recap-of-my-thotcon-talk-5st70tkez) · Hacker News · 0 upvotes · 0 comments
- [Rust-Based Wild Linker 0.9 Brings New Platform Coverage, Linker Plugin API](https://daily.dev/posts/rust-based-wild-linker-0-9-brings-new-platform-coverage-linker-plugin-api-zxk7n8pei) · Phoronix · 11 upvotes · 0 comments

---

Tags: [#reverse-engineering](https://daily.dev/tags/reverse-engineering)

[View this post on daily.dev](https://daily.dev/posts/building-a-custom-architecture-and-platform-part-3-wcuiwepik)

```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":"Building a Custom Architecture and Platform: Part 3","url":"https://daily.dev/posts/building-a-custom-architecture-and-platform-part-3-wcuiwepik","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/building-a-custom-architecture-and-platform-part-3-wcuiwepik"},"datePublished":"2026-08-23T12:17:17.762Z","dateModified":"2026-08-23T12:22:43.221Z","description":"A deep technical walkthrough on adding platform support to a custom Binary Ninja architecture plugin for the fictional Quark architecture. Covers implementing...","image":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","thumbnailUrl":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","isAccessibleForFree":true,"articleSection":"Binary Ninja","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":"Binary Ninja","logo":"https://media.daily.dev/image/upload/s--luR82Bod--/f_auto,q_auto/v1787487415/logos/binary-ninja?_a=BAMAMicg0","url":"https://daily.dev/sources/binary-ninja"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/building-a-custom-architecture-and-platform-part-3-wcuiwepik","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"reverse-engineering","timeRequired":"PT31M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Binary Ninja","item":"https://daily.dev/sources/binary-ninja"},{"@type":"ListItem","position":3,"name":"Building a Custom Architecture and Platform: Part 3"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/building-a-custom-architecture-and-platform-part-3-wcuiwepik#faq","mainEntity":[{"@type":"Question","name":"How do I define a calling convention for a custom architecture in Binary Ninja?","acceptedAnswer":{"@type":"Answer","text":"Subclass CallingConvention and set fields like caller_saved_regs, callee_saved_regs, int_arg_regs, int_return_reg, and high_int_return_reg, then register it with both the Architecture and Platform via register_calling_convention and set it as default_calling_convention. For variadic functions where all arguments go on the stack instead of registers, set arg_regs_for_varargs to False. Developers building custom disassembler plugins can dig deeper into Binary Ninja internals on daily.dev."}},{"@type":"Question","name":"What is the difference between Platform Types and Type Libraries in Binary Ninja?","acceptedAnswer":{"@type":"Answer","text":"Platform Types are included in every analysis using that platform and should be kept minimal, typically just noreturn functions and syscalls, while Type Libraries hold the bulk of standard library and syscall types and are only imported into an analysis when actually used, avoiding clutter in the System Types list. Binary Ninja's first-party plugins prefer Type Libraries for this reason. Reverse engineers designing platform plugins can track deep-dive guides like this on daily.dev."}},{"@type":"Question","name":"Why does WARP fail to match function signatures across binaries that use ip-relative loads?","acceptedAnswer":{"@type":"Answer","text":"WARP ignores relocatable (variant) instructions since their bytes change per compilation, but on some architectures the ip-relative constant load spans multiple instructions and can't be distinguished from a normal register load, so it isn't marked variant and causes false mismatches. The fix rewrites the load sequence via a custom Workflow into a single ip-relative constant expression that WARP can properly detect and exclude from the signature. Engineers tuning binary analysis tooling can follow practical writeups like this on daily.dev."}}]}
```

