1 .\" $NetBSD: genassym.1,v 1.3 2005/08/18 01:09:02 rpaulo Exp $
3 .\" Copyright (c) 1997 Matthias Pfaller.
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 .Nd emit an assym.h file
36 .Ar C compiler invocation
39 is a shell script normally used during the kernel build process to
40 create an assym.h file.
41 This file defines a number of cpp constants derived from the configuration
44 reads from stdin. The generated file is used by kernel sources
45 written in assembler to gain access to information (e.g. structure
46 offsets and sizes) normally only known to the C compiler.
49 are usually of the form
50 .Ar ${CC} ${CFLAGS} ${CPPFLAGS}
53 is the C compiler used to compile the kernel, while
57 are flag arguments to the C compiler. The script creates a C source file
58 from its input. Then the C compiler is called according to the script's
59 arguments to compile this file. Normally
61 instructs the C compiler to create an assembler source from the constructed
62 C source. The resulting file is then processed to extract the information
63 needed to create the assym.h file. The
67 to create slightly different code, generate an executable from this code
68 and run it. In both cases the assym.h file is written to stdout.
75 Either self-explanatory, or generated by one of the programs
76 called from the script.
85 .Pa /usr/src/sys/kern .
86 It became a userland utility in