Bug 13213 - Gold does not support the BE-8 big-endian variant of the ARM architecture
Summary: Gold does not support the BE-8 big-endian variant of the ARM architecture
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Cary Coutant
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-21 14:51 IST by Matthew Gretton-Dann
Modified: 2016-12-02 04:14 IST (History)
3 users (show)

See Also:
Host:
Target: arm-none-eabi
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Gretton-Dann 2011-09-21 14:51:43 IST
Gold only supports the BE-32 (word-invariant) big-endian variant of the ARM architecture (supported in v4, v5, and optionally v6).  v6 and v7 introduce BE-8 variant (byte invariant).

One of the major features of the BE-8 variant is that all instructions are in little-endian format, whereas they are big-endian in BE-32.

The ABI (http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044d/IHI0044D_aaelf.pdf) section 5.5.1 says that object files are produced in BE-32 format and when the linker produces a BE-8 executable image it byte reverses instructions back to little endian format (word-by-word for ARM, half-word-by-half-word for Thumb).  BE-8 executable files have the processor specific flag EF_ARM_BE8 set on the image.

The implication of this is that currently Gold cannot produce images that will run correctly in big-endian mode on ARM v7-A CPUs.
Comment 1 Bharathi Seshardi 2016-08-07 21:25:46 IST
Proposed patch for BE8 implementation for arm :

https://sourceware.org/ml/binutils/2016-07/msg00107.html
Comment 2 Cary Coutant 2016-12-02 04:14:08 IST
Implemented on trunk:

https://sourceware.org/ml/binutils-cvs/2016-08/msg00142.html