On 11/28/19 5:47 PM, Alex Bennée wrote: > Do binaries have to be page size aware? I thought it was a runtime thing. > However if the aarch64-linux-user is hardwired to 4k it might explain it's > confusion on a 64k machine.
Binaries do have to be built for a minimum page size. Most aarch64 binaries are built so that they can run on a 64k host. This is of course compatible with a 4k host. But it is possible to build binaries that will only run on a 4k host. This appears to be one of them. I'm surprised that the armclang lld is so configured. Indeed, it's possible with linker scripts to force binaries to be built that are completely mis-aligned and won't run at all on a paged operating system. This kind of thing used to be done for building kernels, where we were interested in minimizing "wasted" memory between the segments. r~