Place async resumption info in read-write section outside Windows for AOT#123433
Merged
jakobbotsch merged 19 commits intodotnet:mainfrom Feb 3, 2026
Merged
Place async resumption info in read-write section outside Windows for AOT#123433jakobbotsch merged 19 commits intodotnet:mainfrom
jakobbotsch merged 19 commits intodotnet:mainfrom
Conversation
Rework `allocMem` to support allocating an arbitrary number of data chunks. The motivation is to allow ilc to put async resumption info chunks into sections that support relocations to .text, but additionally will allow for sharing read only data between multiple functions.
This reverts commit 056f51b.
This was referenced Jan 27, 2026
Open
This was referenced Jan 30, 2026
EgorBo
approved these changes
Jan 31, 2026
Member
Author
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Feb 1, 2026
Member
Author
|
Looks like there are some failures to investigate. |
Member
Author
|
I think we are already running into the problem above (#123433 (comment)). Basically JIT assumes that constant data will be close and generates code/relocs to load the address of the resumption info as if that is the case. |
Member
Author
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jakobbotsch
commented
Feb 3, 2026
| { | ||
| emitRecordRelocation(dst - sizeof(code_t), dstAddr, CorInfoReloc::ARM64_PAGEBASE_REL21); | ||
| } | ||
|
|
Member
Author
There was a problem hiding this comment.
cc @shushanhf @dotnet/samsung. You likely will need a similar change for loongarch64 and RISCV64.
In summary we can now have data that is not allocated together with the code so for those you will need to emit relocs.
Member
Author
|
/ba-g x64 infra timeouts -- these jobs succeeded on the previous run with only arm64 changes since them |
shushanhf
added a commit
to shushanhf/runtime
that referenced
this pull request
Feb 4, 2026
lewing
pushed a commit
to lewing/runtime
that referenced
this pull request
Feb 9, 2026
… AOT (dotnet#123433) ELF/MachO do not support relocations from read-only sections into the .text section. We generate such relocations when creating async resumption info. Now that dotnet#123378 is in we can teach ilc/crossgen2 to place these pieces of data in a read-write section when necessary. Fix dotnet#121871
shushanhf
added a commit
to shushanhf/runtime
that referenced
this pull request
Feb 10, 2026
shushanhf
added a commit
to shushanhf/runtime
that referenced
this pull request
Feb 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELF/MachO do not support relocations from read-only sections into the .text section. We generate such relocations when creating async resumption info. Now that #123378 is in we can teach ilc/crossgen2 to place these pieces of data in a read-write section when necessary.
Fix #121871