Re: [arm-gnu] RE: illegal instruction ARMv7 on omap3evm, with -mthumb option
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] RE: illegal instruction ARMv7 on omap3evm, with -mthumb option



> You said
> 
> > It generates Thumb-2 code if you specify -march=armv7-a and -mthumb.
> > It never generates ARM mode code if you specify -mthumb.
> 
> Does that mean it generates only ARM if I do not specify -mthumb?
> Without that option, why do I still see when I run readelf on the generated
> executable TAG_THUMB_ISA_use: Thumb-2 ?

The ARM EABI target attributes define the functionality that is permitted, not 
the functionality required.  When compiling code for a core/architecture 
variant that includes Thumb-2 it is normal to tag the object as allowing use 
of Thumb-2, even if no Thumb instructions are actually emitted.

Some early revisions of the EABI specified subtly different semantics
(allow v.s. require), which may help explain some of the confusion.

Paul