alexcrichton opened PR #5608 from fix-reloc-readonly
to main
:
This commit fixes some asserts and support for relocation libcalls in precompiled modules loaded from disk. In doing so this reworks how mmaps are managed for files from disk. All non-file-backed
Mmap
entries are read/write but file-backed versions were readonly. This commit changes this such that allMmap
objects, even if they're file-backed, start as read/write. The file-based versions all use copy-on-write to preserve the private-ness of the mapping.This is not functionally intended to change anything. Instead this should have some more memory writable after a module is loaded but the text section, for example, is still left as read/execute when loading is finished. Additionally this makes modules compiled in memory more consistent with modules loaded from disk.
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
jameysharp submitted PR review.
jameysharp submitted PR review.
jameysharp created PR review comment:
Looks like the comment should change here too.
alexcrichton updated PR #5608 from fix-reloc-readonly
to main
.
alexcrichton requested jameysharp for a review on PR #5608.
alexcrichton updated PR #5608 from fix-reloc-readonly
to main
.
jameysharp submitted PR review.
alexcrichton merged PR #5608.
Last updated: Nov 22 2024 at 17:03 UTC