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.
20 This, for example, is used
21 to build a FreeBSD kernel or module.
24 argument is the name of an ELF object file that holds the
26 These definitions are extracted from
27 the object file and written to standard output or to the
30 suitable for inclusion in assembler source files.
34 command only extracts symbols from the object file if they
37 and are global data types, whose value is the value given
39 The following C declaration
40 .Bd -literal -offset indent -compact
41 int assym_MY_SYMBOL = 3;
43 is used to create the following assembler symbol.
44 .Bd -literal -offset indent -compact
47 Note that the size of the symbol is extracted from the
48 object file, which means that the symbol may have any type
49 that is wide enough to hold the value.
56 command was written by
57 .An Marcel Moolenaar Aq marcel@FreeBSD.org
62 Not all linkers store the size of the symbol in the ELF
64 The GNU linker for Alpha has this bug for
65 example (binutils 2.9.1). In those cases the size of the
66 symbol is assumed to be equal to the word size of the ELF
68 For Alpha this is 64 bits and for i386 this
73 command first appeared in FreeBSD 4.0.