Remove libunwind dependency for NativeAOT

Open
#119,347 6 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp

Research direction

Start by tracing how the ILC compiler and NativeAOT runtime currently depend on libunwind, ELF, and DWARF metadata. Determine the required method-boundary and exception-handling metadata in rodata, then verify that the runtime can parse it in ARMv7-M raw binary images without libunwind.

Written by the indexing model from the issue text.

Description

area-NativeAOT-coreclr

Hello,

I am currently porting NativeAOT to ARMv7-M Thumb2 microcontrollers with VFPv5-D16 FPU support. On these embedded platforms, firmware is typically deployed as bin/hex/S19 files, not ELF. As a result, it is not possible to use libunwind, which relies on ELF/DWARF metadata and sections.

Would it be possible for the ILC compiler to generate the necessary method boundary, exception handling metadata.... to rodata sections? The runtime could then parse this data, removing the dependency on libunwind and ELF. This would make NativeAOT much more portable to RTOS(NUTTX) environments, where only raw binary images are used.

I believe this change would greatly benefit embedded scenarios and make .NET more accessible on microcontrollers.

Thank you for considering this feature request!

Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/runtime

All issues in dotnet/runtime

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.