This is the mail archive of the
mailing list for the GCC project.
Re: ARM/Thumb function attribute
This list is for development of gcc, not gcc users. In future gcc-help, or
some other arm specific list is the correct place to ask such questions.
> As far as I can tell, there is no way to declare
> that a particular function pointer will point at
> plain ARM code or at Thumb code. I'm more
> than a little surprised actually, so maybe I just
> missed something.
The low bit of a function pointer value indicates thumbness. The caller
doesn't know or care whether it is calling an Arm or Thumb function.
However note that
> int __cdecl thread_create(...)
This isn't a function pointer, it's an actual function declaration. Expect
this to break because (a) it's probably out of range of a branch instruction,
and (b) your linker defined symbol won't have the correct type.