Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

ELF64BE case support problem #158

Open
deeeepblue opened this issue May 26, 2021 · 3 comments
Open

ELF64BE case support problem #158

deeeepblue opened this issue May 26, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@deeeepblue
Copy link

deeeepblue commented May 26, 2021

Hello, I have been trying to use BOLT with a 64-bit BE ELF but got the error below:
BOLT-ERROR: only 64-bit LE ELF binaries are supported

Here are some header info of my ELF:
`ELF Header:

Class: ELF64
Data: 2's complement, big endian
OS/ABI: UNIX - System V
Type: REL (Relocatable file)
Machine: AArch64`

As it is not possible to change my ELF into 64-bit LE, does it posible to make BOLT support ELF64BE by modifying the source code? And how can I modity it?

@rafaelauler
Copy link
Contributor

That's an interesting question, I've never tested that. I think we will break badly in some places if we just accept big endian. If I'm not mistaken we have explicit little endian writing when we patch some places. But I might be wrong and it could be easier than I think.

I would pay extra attention to support::ulittle code in BOLT, and also some templates we specialize when reading ELF object files.

In theory, it is possible, yes.

@rafaelauler rafaelauler added the enhancement New feature or request label Jun 1, 2021
@deeeepblue
Copy link
Author

Thanks for your reply. By the way, do you and your team have any plans to support big endian?

@rafaelauler
Copy link
Contributor

Not at the moment

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants