Search code examples
armabi

Are colons required after labels in ABI compliant ARM


I have seen examples of labels in ARM with and without colons following the symbol name. Is the colon required?

I was under the impression that colons are required, but an example from ARM's site is missing them: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.kui0100a/armasm_ceghjdfb.htm


Solution

  • The presence or absence of a colon after a label is a matter of assembler syntax and does not get included in the object file and therefore not an ABI concern. GNU assembler requires a trailing colon, some other assemblers prohibit a trailing colon.

    The preceding underscores required by some ABIs are not treated specially by assemblers and are required to be compatible with a C compiler for those ABIs.