On x86_64 we can build application with -pagezero_size 10000 linker flag and perform mmap to allocate memory with 32-bit address in pointer, like this:
mmap(start, size, PROT_NONE, (MAP_PRIVATE | MAP_FIXED | MAP_EXCL |(MAP_PRIVATE | MAP_FIXED | MAP_EXCL)), -1, 0);
But if we build application targeting arm64-apple-macos11 with -pagezero_size 10000 we will got "Malformed Mach-o file" error
In other case, with -pagezero_size 100010000 application executes success
Does new macOS kernel mach loader limit vmsize of __PAGEZERO segment to minimal size 0x100000000 for arm64?
P.S. Sory for my English
mmap(start, size, PROT_NONE, (MAP_PRIVATE | MAP_FIXED | MAP_EXCL |(MAP_PRIVATE | MAP_FIXED | MAP_EXCL)), -1, 0);
But if we build application targeting arm64-apple-macos11 with -pagezero_size 10000 we will got "Malformed Mach-o file" error
In other case, with -pagezero_size 100010000 application executes success
Does new macOS kernel mach loader limit vmsize of __PAGEZERO segment to minimal size 0x100000000 for arm64?
P.S. Sory for my English