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

Support AArch64 in ELF32 (ILP32) #536

Open
ondrudav opened this issue Jan 29, 2024 · 1 comment
Open

Support AArch64 in ELF32 (ILP32) #536

ondrudav opened this issue Jan 29, 2024 · 1 comment

Comments

@ondrudav
Copy link

ILP32 on AArch64 produces ELF32 files with alternative relocation codes as defined by: https://github.com/ARM-software/abi-aa/blob/b0f1111afbd7d0aa8f2b160dd63971e69c99955a/aaelf64/aaelf64.rst#L1028

Currently this results in Unsupported relocation type: X exceptions

I'm considering adding the codes to ENUM_RELOC_TYPE_AARCH64 and _RELOCATION_RECIPES_AARCH64 as it's the simplest but this has 2 downsides:

  1. Lack of error when a code occurs in a file of the opposite variation.
  2. R_AARCH64_NONE and R_AARCH64_P32_NONE are both 0 and readelf.py won't tell the difference.
    • Note: the code only knows R_AARCH64_NONE under the alias 256

The other option is another pair of enum + dict for ILP32 and conditionals in _do_apply_relocation() and describe_reloc_type() if I'm not missing anything.

@sevaa
Copy link
Contributor

sevaa commented Sep 23, 2024

A sample binary would be nice, please.

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

No branches or pull requests

2 participants