[PATCH] D58655: lld: add support for aarch64be -m flags

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 26 02:10:43 PST 2019


peter.smith added a comment.

Rui is correct, neither AArch64 or Arm support big endian at the moment. The output of the linker would certainly be broken. AArch64 and ARM make some demands of the linker that mean some additional complexity is needed:

- AArch64 instructions are little-endian, data is big-endian. Input objects have little-endian instructions.
- ARM v6+ in be-8 mode (default), instructions are little-endian, data is big-endian. Input objects have big-endian instructions and a linker must endian reverse the instructions.
- ARM prior to v6 and v6/v7 in be-32 mode (backwards compatibility only)  have big-endian instructions and data.

My understanding is that big-endian is used in some networking and embedded systems as they have native big-endian data, however these tend not to make it to consumer hardware.

I would like to add support for big-endian, but I've not had it as high priority. If it is needed then I can work on it. I'd suggest AArch64 first, with potentially support for ARM v6+ be-8 mode. I don't think support for be-32 is needed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58655/new/

https://reviews.llvm.org/D58655





More information about the llvm-commits mailing list