New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aarch64 page-size support #80
Conversation
Passing all tests run under amd64 and aarch64. Not sure what this "conflicts that must be resolved" thing is about. |
@gitfoxi it means that the recent changes to the git repository mean that you changes no longer apply cleanly. You need to update the upstream repository and rebase on top of or merge the latest git master. |
In particular, your code probably conflicts with pr #73 |
Thanks @fsateler I see that was a different solution to the same problem. Just let the user specify the page size. I thought of this but wondered how nixpkgs could feed the target page size to all of patchelf for a given platform and gave up. My approach is to look at the architecture of the ELF being modified and use that to select page size. I think it's better but not perfect because, for example, aarch64 can have different page sizes, configured at the OS level. But 64k is a safe superset of all possible page sizes. Ideally, the page size would be stored in the ELF file itself but that doesn't seem to be the case. What do you think @fsateler? I don't really know how or if I should proceed. |
@gitfoxi The page size is auto-detected at build time. This means that when running natively (ie, the same env that produced patchelf), the default should be correct. The page size is for operating on foreign binaries: those not generated by the same toolchain as your own patchelf binary. Now, if you could somehow determine the page size by inspecting the elf binary, that would be awesome. As you note, the info is not readily available, so some gymnastics might be needed. |
See #216 |
This isn't ready. It works natively on aarch64 patching elfs for same, but fails on cross-architecture patch. See issue #79