Index: gcc/config/arm/bpabi.h =================================================================== --- gcc/config/arm/bpabi.h (revision 455328) +++ gcc/config/arm/bpabi.h (working copy) @@ -128,7 +128,7 @@ /* The generic link spec in elf.h does not support shared libraries. */ #define BPABI_LINK_SPEC \ - "%{mbig-endian:-EB} %{mlittle-endian:-EL} " \ + "%{mbig-endian:-EB -m armelfb} %{mlittle-endian:-EL -m armelf} " \ "%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} " \ "-X" SUBTARGET_EXTRA_LINK_SPEC EABI_LINK_SPEC Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 455328) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2015-10-20 Jonathan Roelofs + + * config/arm/bpabi.h: Tell the linker which emulation to use + based on the endianness of the target. + 2015-07-16 Release Manager * GCC 5.2.0 released.