Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

genassym(1) [netbsd man page]

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
Man Page

15 More Discussions You Might Find Interesting

1. Programming

C compiling under C++ compiler

I want to compile a c-language source file ( *.c ) under C++ compiler in the UNIX workstation. Is that compatable? (2 Replies)
Discussion started by: nomen
2 Replies

2. HP-UX

Unable to compile ANSI compatible code on HP-UX

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)
Discussion started by: jyotipg
9 Replies

3. Programming

Newbie Q

What is the comand to compile a c++ code in Unix. I have only used Borland C++ on win but have heard that UNIX has a integrated compiler. (5 Replies)
Discussion started by: <Therapy>
5 Replies

4. UNIX for Dummies Questions & Answers

create a periodic execution of a script?

Hello every body goal: create a script that control periodicly ( every 30 min ) if a process is already actif. How can I do that? thanks (3 Replies)
Discussion started by: hoang
3 Replies

5. UNIX for Advanced & Expert Users

CC compiler

Hi, If you you have CC installed, then where does it defaultly lives. Thanks (3 Replies)
Discussion started by: vtran4270
3 Replies

6. Linux

Windows C++ compiler for Linux

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)
Discussion started by: Kimm
4 Replies

7. Shell Programming and Scripting

written a srcipt with 2 arguments

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)
Discussion started by: sam4now
6 Replies

8. UNIX for Dummies Questions & Answers

create file .txt

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)
Discussion started by: battaglia
4 Replies

9. Programming

compiler can't find pstatus_t even procfs.h inlcuded

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)
Discussion started by: sleepy_11
4 Replies

10. UNIX for Dummies Questions & Answers

create excel file

Hi, How can I create an excel file from a txt file using shell script. Please do a help for me. Thanks, Regards, Milton (6 Replies)
Discussion started by: miltony
6 Replies

11. Programming

Help with Compiling large source file using g++

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)
Discussion started by: helpmeforlinux
2 Replies

12. Shell Programming and Scripting

gcc source in C language:WHERE I FIND THEM??

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)
Discussion started by: ferruccio87
2 Replies

13. Shell Programming and Scripting

Copy latest generated file

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)
Discussion started by: Alok Ranjan
2 Replies

14. Shell Programming and Scripting

shc compiler issue

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)
Discussion started by: ysvsr1
7 Replies

15. UNIX for Beginners Questions & Answers

Shell script to filter certain lines from a file

hi~ i need script on AIX. and have a text file following : create aa 1 2 3 from a@a; create bb from b; create cc 3 4 5 6 6 7 from c@c; (7 Replies)
Discussion started by: tomato00
7 Replies