9 .Nd generate assembler symbols from C
17 command is a special-purpose program to generate assembler
18 symbols from C code and is used to interface the low-level
19 assembly code with the C code. This, for example, is used
20 to build a FreeBSD kernel or module.
23 argument is the name of an ELF object file that holds the
24 symbol definitions. These definitions are extracted from
25 the object file and written to standard output or to the
28 suitable for inclusion in assembler source files.
32 command only extracts symbols from the object file if they
35 and are global data types, whose value is the value given
36 to the symbol. The following C declaration
37 .Bd -literal -offset indent -compact
38 int assym_MY_SYMBOL = 3;
40 is used to create the following assembler symbol.
41 .Bd -literal -offset indent -compact
44 Note that the size of the symbol is extracted from the
45 object file, which means that the symbol may have any type
46 that is wide enough to hold the value.
53 command was written by
54 .An Marcel Moolenaar Aq marcel@FreeBSD.org
59 Not all linkers store the size of the symbol in the ELF
60 object file. The GNU linker for Alpha has this bug for
61 example (binutils 2.9.1). In those cases the size of the
62 symbol is assumed to be equal to the word size of the ELF
63 object file. For Alpha this is 64 bits and for i386 this
68 command first appeared in FreeBSD 4.0.