konst@linuxassembly.org
Copyright © 1999-2001 by Konstantin Boldyshev
$Date: 2001/03/18 07:08:25 $
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License Version 1.1; with no Invariant Sections, with no Front-Cover Texts, and no Back-Cover texts.
I assume you are familiar with Unix and assembly language to an extent when you are able to understand what is written here. If you are unable to comprehend most of what is written here, probably this manuscript is not for you, sorry.
I expect that you will dig in and examine source code of asmutils. This document is not intended to replace the source, its goal is only to accompany asmutils source and explain several unclear moments. Again, examine ALL source code. Look how command line parsing is done, how conditional assembly for different kernel versions is done and so on -- I am not going to explain all and everything here.
This document deals with compiling, developing, debugging, contributing issues, it shows some tricks you can use; also it describes a set of macros I've developed to write fast and readable: they are hiding from you unneeded details, and take care of optimization.
You may also want to read other documentation represented at the Linux Assembly site to get better general (not asmutils specific) understanding of asmutils source code.
Asmutils are build with the usual compile suite and nasm. Except nasm you will need GNU make, ld, sh, ln, rm, possibly strip and possibly something else, depending on your OS.
Preferred program versions are:
nasm 0.98
ld from GNU binutils 2.9 (on Linux)
GNU make 3.79
Older/newer/other versions may work too. GNU make is required, on BSD systems it is usually called gmake, and can be found in ports collection.
All compile-time configuration is in the MCONFIG file, which has enough comments to figure out what you can do. You can try to fallback to libc functions instead of using direct system calls by defining OS=LIBC in MCONFIG if your really want to do so; then you will also need gcc and libc headers.
Note: several utils (cpuinfo, eject, httpd, kill, etc) have their own additional configuration in the source code.
Next | ||
Program layout |