MirOS Manual: genassym.sh(8)

GENASSYM.SH(8)           BSD System Manager's Manual            GENASSYM.SH(8)


     genassym.sh - emit an assym.h file


     sh genassym.sh [-c] C compiler invocation


     genassym.sh is a shell script normally used during the kernel build pro-
     cess to create an assym.h file. This file defines a number of cpp con-
     stants derived from the configuration information genassym.sh reads from
     stdin. The generated file is used by kernel sources written in assembler
     to gain access to information (e.g. structure offsets and sizes) normally
     only known to the C compiler.

     genassym.sh resides in the /sys/kern directory. Arguments to genassym.sh
     are usually of the form ${CC} ${CFLAGS} ${CPPFLAGS} where ${CC} is the C
     compiler used to compile the kernel, while ${CFLAGS} and ${CPPFLAGS} are
     flag arguments to the C compiler. The script creates a C source file from
     its input. Then the C compiler is called according to the script's argu-
     ments to compile this file.

     Normally genassym.sh instructs the C compiler to create an assembler
     source from the constructed C source. The resulting file is then pro-
     cessed to extract the information needed to create the assym.h file. The
     -c flag instructs genassym.sh to create slightly different code, generate
     an executable from this code and run it. In both cases the assym.h file
     is written to stdout.


     Either self-explanatory, or generated by one of the programs called from
     the script. The script will exit with the return code from the compiler,
     or, in the -c case, with the return code from the generated executable.




     The genassym.sh script first appeared in OpenBSD 2.2.

MirOS BSD #10-current          January 25, 1997                              1

Generated on 2017-04-03 16:26:17 by $MirOS: src/scripts/roff2htm,v 1.88 2017/01/29 00:51:06 tg Exp $

These manual pages and other documentation are copyrighted by their respective writers; their source is available at our CVSweb, AnonCVS, and other mirrors. The rest is Copyright © 2002–2017 The MirOS Project, Germany.
This product includes material provided by mirabilos.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.