You copied the Doc URL to your clipboard.


Assemblers can identify the start of a function when producing DWARF call frame information for ELF.

ARM syntax

The FUNCTION directive marks the start of a function. PROC is a synonym for FUNCTION.

The ENDFUNC directive marks the end of a function. ENDP is a synonym for ENDFUNC.

For example:

myproc  PROC
  ; Procedure body

GNU syntax

Use the .type directive to identify symbols as functions. For example:

  .type myproc, "function"
  // Procedure body

GNU syntax assembly code provides the .func and .endfunc directives. However, these are not supported by armclang. armclang uses the .size directive to set the symbol size:

  .type myproc, "function"
  // Procedure body
  .size myproc, .Lmyproc_end0-myproc


Functions must be typed to link properly.