This is the mail archive of the
mailing list for the GCC project.
Re: ARM/Thumb function attribute
On Sat, Mar 22, 2008 at 8:24 PM, Paul Brook <firstname.lastname@example.org> wrote:
> 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.
I guess it wasn't clear that I'm requesting a new attribute.
I want to force a call to be Thumb, or to be ARM.
> 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.
There is an existing attribute that I can use to deal
with range. (longcall if I remember right) I will use this
as required. I must do this anyway, since even my
own code will reside in two separate chunks.
My linker-defined symbol probably won't have much
of a type at all. I'm asking for a way to make gcc ignore
the type, and just call the symbol.
Another way to solve the problem would be to have
some way to make gcc emit the symbol, perhaps by
an attribute that declares the address.
So one of these would do:
(ideally both, so that I don't need to mess with the bits
of Thumb code addresses)