https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67871
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> --- arm-none-eabi GCC only supports little-endian, not big-endian and armeb-none-eabi GCC only supports big-endian, not little-endian. To make them support both, you need to pass the right -m option to linker.