@item -mlongcall
@cindex functions called via pointer on the ARM
Normally the compiler produces single-instruction, 24 bit, direct calls.
In order to access functions that may lie anywhere in the 32 bit address
space we need to call through a function pointer. Because indirect
calls are more expensive we would like to make direct calls
wherever possible. With @samp{-mlongcall} the compiler 
uses a conservative heuristic to decide whether to
make a direct (24) call or an indirect (32 bit) call:
it generates a direct call if the target function is non public; or if its 
definition has already been seen; or if it is declared with the attribute 
"shortcall" (@xref{Function Attributes}). Otherwise it generates
an indirect call. An underlying assumption is that individual translation
units span less than 32MB so that it is always safe to make direct calls 
to functions in the same module. 

Here is an example:

@smallexample
static void f ();
void g () @{ /* do something */ @}
extern void h ();

void test ()
@{
  f ();
  g ();
  h ();
@}
@end smallexample

If this example is compiled with -mlongcall, the function
@samp{test} will contain direct calls to @samp{f} (non-public) and 
@samp{g} (definition seen before it is called) and an indirect call to
@samp{h}. 

