arm library linked instead of thumb

Asked by hugo

Hello,

I installed the gnu arm binaries 4.9.3 from this web site in /usr/arm. The compile and link worked fine but the link seemed to have linked in the arm libraries because I was negligent in specifying thumb mode. But when I add the -Wl,-thumb option for the link stage I get an error message:

/usr/arm/bin/arm-none-eabi/bin/ld: unrecognised emulation mode: thumb
Supported emulations: armelf

Is 4.9.3. not a multilib? The error message seems to suggest the libraries only support arm mode. But I can see several armv... and the thumb directories in /usr/arm/lib/gcc/arm-none-eabi/4.9.3.

Since I am running out of ideas what to try I would appreciate any hint that would lead me in the right direction.

Kind Regards,

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
hugo
Solved:
Last query:
Last reply:
Revision history for this message
hugo (hugo-habicht) said :
#1

Seems the linker got confused with the -Wl,
It links the thumb libs now. Still not working though, but that is another problem....

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#2

Hi Hugo,

Indeed it's the compiler that tells the linker the right library to link based on the command line it gets. By the way, the option for GCC is -mthumb, not -thumb.

Best regards.