Skip to content
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

Closed
wants to merge 4 commits into from
Closed

aarch64 page-size support #80

wants to merge 4 commits into from

Conversation

gitfoxi
Copy link

@gitfoxi gitfoxi commented Feb 28, 2016

This isn't ready. It works natively on aarch64 patching elfs for same, but fails on cross-architecture patch. See issue #79

@gitfoxi
Copy link
Author

gitfoxi commented Feb 28, 2016

Passing all tests run under amd64 and aarch64.

Not sure what this "conflicts that must be resolved" thing is about.

@fsateler
Copy link
Contributor

fsateler commented Mar 2, 2016

@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.

@fsateler
Copy link
Contributor

fsateler commented Mar 2, 2016

In particular, your code probably conflicts with pr #73

@gitfoxi
Copy link
Author

gitfoxi commented Mar 2, 2016

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.

@fsateler
Copy link
Contributor

fsateler commented Apr 5, 2016

@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.

@domenkozar
Copy link
Member

See #216

@domenkozar domenkozar closed this Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants