GENASSYM(1) BSD General Commands Manual GENASSYM(1)NAME
genassym -- emit an assym.h file
SYNOPSIS
genassym [-c] [-f] C compiler invocation
DESCRIPTION
genassym is a shell script normally used during the kernel build process to create an assym.h file. This file defines a number of cpp con-
stants derived from the configuration information genassym reads from stdin. The generated file is used by kernel sources written in assem-
bler to gain access to information (e.g. structure offsets and sizes) normally only known to the C compiler.
Arguments to genassym 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 arguments to compile this file.
Normally genassym instructs the C compiler to create an assembler source from the constructed C source. The resulting file is then processed
to extract the information needed to create the assym.h file. The -c flag instructs genassym 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. The -f flag instructs genassym to create forth
code.
DIAGNOSTICS
Either self-explanatory, or generated by one of the programs called from the script.
SEE ALSO genassym.cf(5)HISTORY
The genassym command appeared in NetBSD 1.3 as ``genassym.sh'' in /usr/src/sys/kern. It became a userland utility in NetBSD 4.0.
BSD April 13, 2010 BSD
Check Out this Related Man Page
GENASSYM.CF(5) BSD File Formats Manual GENASSYM.CF(5)NAME
genassym.cf -- assym.h definition file
DESCRIPTION
The genassym.cf file is used by genassym(1) to make constant C expressions known to assembler source files. Lines starting with '#' are dis-
carded by genassym(1). Lines starting with include, ifdef, if, else or endif are preceded with '#' and passed otherwise unmodified to the C
compiler. Lines starting with quote get passed on with the quote command removed. The first word after a define command is taken as a CPP
identifier and the rest of the line has to be a constant C expression. The output of genassym(1) will assign the numerical value of this
expression to the CPP identifier. export X is a shorthand for define X X. struct X remembers X for the member command and does a define
X_SIZEOF sizeof(X). member X does a define X offsetof(<last struct>, X). config <ctype> <gcc constraint> <asm print modifier> can be used
to customize the output of genassym(1). When producing C output, values are casted to <ctype> (default: long) before they get handed to
printf. <gcc constraint> (default: n) is the constraint used in the __asm__ statements. <asm print modifier> (default: empty) can be used to
force gcc to output operands in different ways then normal. The "a" modifier e.g. stops gcc from emitting immediate prefixes in front of con-
stants for the i386 and m68k port.
FILES
/usr/src/sys/arch/${MACHINE}/${MACHINE}/genassym.cf
SEE ALSO genassym(1)HISTORY
The genassym.cf file appeared in NetBSD 1.3.
BSD August 18, 2005 BSD
Hi!!,
my HP-UX - 10.2 compiler doesnt appear to support ANSI style of coding. On compiling my C code, it flags error messages like
error 1705: Function prototypes are an ANSI Feature
Is it a generic problem with the HP compiler or do I need to use some special switches on the command... (9 Replies)
Does anyone here know of any good windows c++ compiler for linux? so that I can compile c++ programs in Linux (this is very possible!). Doesnt mather if it is a real windows compiler that works in wine or if its a compiler written for linux but compiles windows binaries (4 Replies)
hello all
pls can anybody point me a direction of capturing 2 arguments: one a line of text the other is a file.
In paticular how can i get the file
so for exampls, i create a script called monalisa
monalisa this is an angel from the 7th heaven booboo
where monalisa is the script... (6 Replies)
hi.i want to create a bash script called countfiles.sh, that will count the pack of files under the current file that their term satisfy a specific pattern. The script must show the total per file or on the whole.
thank tou (4 Replies)
Hi,
I am trying to get a the process cpu usage from the /proc file recently, on the Solaris 5.10. But met some rookie issue which i need some help. for below program, compiler complains that pstatus_t is undefined, although both type are defined in the procfs.h.
#include <sys/procfs.h>... (4 Replies)
HI All,
I m compiling a 27 MB cpp file and compiler crashes.
My enviroment : RH 9, compiler g++
how i m compiling
g++ -fPIC -DWITH_OPENSSL -DWITH_COOKIES -c soapC.cpp
it took almost 30 -32 to throw error like report bug etc. I will post the same error, but if can any body tell how to... (2 Replies)
Hi, sorry for my english,
i want to find the C-sources of the compiler gcc because i must create a compiler for an educational architecture made by my information technology professor. He told me that i must start from this sources, compile the gcc with them (pratically "auto-compile" the... (2 Replies)
Hi,
There is csv file generated at /usr/data on server1 on monthly basis.
It is in the format reportYYYYDD(e.g 201105).
I needed a script which would copy the latest generated file from the location to another server at /usr/loc
Please can you help? (2 Replies)
I am using the shc shell compiler, it works fine, just that when i execute it, it displays the code at the terminal. Is there any way to hide this as well? otherwise it beats the purpose of hiding the code.
Thanks ! (7 Replies)