You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm going to fully disable the test because we don't want to run source generator tests with native AOT (they include entire Roslyn, are not trim safe and in general a pain) and all the other ones are already disabled. But this is probably a representative "massive executable" issue.
ld: b(l) ARM64 branch out of range (134218280 max is +/-128MB): from _SystemNative_Write (0x10015AE9C) to _write.stub@0x00000000 (0x10815B0F0) in '_SystemNative_Write' from /Users/runner/work/1/s/artifacts/bin/testhost/net9.0-osx-Release-arm64/shared/Microsoft.NETCore.App/9.0.0/libSystem.Native.a(pal_io.c.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is that in a debug build? I wanted to write about it but I didn’t find a realistic scenario where it would be hit.
While I'm not sure if I've encountered the exact error mentioned in this issue, I do compile a large executable with NativeAOT for x64 and ARM64. Occasionally, I have to find ways to be more size-conscious in my codebase. ARM64 compilation fails if the final output would be significantly larger than 128MB.
error LNK2013: BRANCH26 fixup overflow. Target 'RhpNewArray' is out of range
error LNK2013: BRANCH26 fixup overflow. Target '{thunk}RhpNewArray' is out of range
I would be happy to help with this if I can. The size limitation has been frustrating for me, and it'd be a relief to no longer worry about that.
Activity
dotnet-policy-service commentedon Jun 5, 2024
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.
filipnavara commentedon Jun 5, 2024
Is that in a debug build? I wanted to write about it but I didn’t find a realistic scenario where it would be hit.
MichalStrehovsky commentedon Jun 5, 2024
The logs say it's release
ds5678 commentedon Mar 24, 2025
While I'm not sure if I've encountered the exact error mentioned in this issue, I do compile a large executable with NativeAOT for x64 and ARM64. Occasionally, I have to find ways to be more size-conscious in my codebase. ARM64 compilation fails if the final output would be significantly larger than 128MB.
https://github.com/AssetRipper/AssetRipper
Most recently, the error I encountered was:
I would be happy to help with this if I can. The size limitation has been frustrating for me, and it'd be a relief to no longer worry about that.
[NativeAOT] Do not resolve an out-of-range arm64 BRANCH26 within a se…
[NativeAOT] Split large arm64 code sections so the linker can place r…
jkotas commentedon Nov 16, 2026
Fixed by linker PRs
[NativeAOT] Split large arm64 code sections so the linker can place r…
[release/11.0] Fix 256MB+ binaries produced by NativeAOT on Arm64 (#1…