Symbol names begin with a letter or with one of `._'. On most
machines, you can also use $
in symbol names; exceptions are
noted in section Machine Dependent Features. That character may be followed by any
string of digits, letters, dollar signs (unless otherwise noted in
section Machine Dependent Features), and underscores.
For the AMD 29K family, `?' is also allowed in the
body of a symbol name, though not at its beginning.
Case of letters is significant: foo
is a different symbol name
than Foo
.
Each symbol has exactly one name. Each name in an assembly language program refers to exactly one symbol. You may use that symbol name any number of times in a program.
Local symbols help compilers and programmers use names temporarily. There are ten local symbol names, which are re-used throughout the program. You may refer to them using the names `0' `1' ... `9'. To define a local symbol, write a label of the form `N:' (where N represents any digit). To refer to the most recent previous definition of that symbol write `Nb', using the same digit as when you defined the label. To refer to the next definition of a local label, write `Nf'---where N gives you a choice of 10 forward references. The `b' stands for "backwards" and the `f' stands for "forwards".
Local symbols are not emitted by the current GNU C compiler.
There is no restriction on how you can use these labels, but remember that at any point in the assembly you can refer to at most 10 prior local labels and to at most 10 forward local labels.
Local symbol names are only a notation device. They are immediately transformed into more conventional symbol names before the assembler uses them. The symbol names stored in the symbol table, appearing in error messages and optionally emitted to the object file have these parts:
L
as
and
ld
forget symbols that start with `L'. These labels are
used for symbols you are never intended to see. If you use the
`-L' option then as
retains these symbols in the
object file. If you also instruct ld
to retain these symbols,
you may use them in debugging.
digit
^A
ordinal number
For instance, the first 1:
is named L1^A1
, the 44th
3:
is named L3^A44
.