This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: b[l]x instruction in cortex-m3 code


On Mon, Jul 18, 2011 at 4:03 PM, Daniel Otte <daniel.otte@rub.de> wrote:
> Hi,
> when I link code for the ARM Cortex-M3 the b[l]x instruction is emitted.
> Since Cortex-M3 has no ARM mode and no b[l]x instruction the CPU goes in a fault
> mode when it is asked to execute it.
>
> As far as I have read it is ok for the compiler to emit b[l]x but the linker is
> required to translate it into b[l] instructions.
>
> I tried a lot of linker flags with no success.

Typically this means you are calling a function that is not correctly
marked as Thumb code, so the linker is helpfully switching you back to
ARM mode; check the target symbol.

-- 
Thanks,
Daniel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]