patchelf: increase the page size alignment on Aarch64 to support 64K pages #89317
+20
−2
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.
Motivation for this change
NixOS built binaries currently do not work on ARMv8 systems configured for 64K wide pages (the more common default is 4K pages, like x86). This is because even though the usual compiler toolchains properly generate ELF files with 64K segment alignment, patchelf will sometimes rewrite segments and align them to 4K instead. The 4K value comes from the fact that the current Hydra ARMv8 builder uses 4K pages, which in itself is kind of undesirable (leaking details of the build infrastructure into packages).
I currently lack enough system diversity to test this (my only ARMv8 box is the one that's broken...), so feedback welcome.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)