On Thu Oct 16 23:29:17 2025 +0000, Alexandre Julliard wrote:
I don't love the preprocessor black-magic to replace every mmap()
call, but it avoids having to modify any other functions. If we want to avoid that, map_pe_header() and map_file_into_view() are the mmap() calls that I know need to be changed. That would be preferable. Note that most (all?) callers already do a mprotect() after the mmap() so there's no need to do it twice.
I'm still using the `mac_mmap()` wrapper in `map_file_into_view()`, but for `map_pe_header()` I found that macOS doesn't restrict executable mapping of files on noexec filesystems. Was detecting that the only reason `map_pe_header()` uses `PROT_EXEC`? If so, I'm only doing RW mapping there on macOS.