No description
Find a file
H. Peter Anvin ef7468f4ec NASM 0.98p7
2002-04-30 20:57:59 +00:00
doc NASM 0.98p7 2002-04-30 20:57:59 +00:00
lcc NASM 0.94 2002-04-30 20:52:08 +00:00
misc NASM 0.96 2002-04-30 20:52:49 +00:00
Mkfiles NASM 0.98p6 2002-04-30 20:57:38 +00:00
rdoff NASM 0.98p3.5 2002-04-30 20:56:43 +00:00
test NASM 0.96 2002-04-30 20:52:49 +00:00
assemble.c NASM 0.98p7 2002-04-30 20:57:59 +00:00
assemble.h NASM 0.95 2002-04-30 20:52:26 +00:00
c16.mac NASM 0.98p3.5 2002-04-30 20:56:43 +00:00
c32.mac NASM 0.98p3.5 2002-04-30 20:56:43 +00:00
changed.asm NASM 0.98p6 2002-04-30 20:57:38 +00:00
Changes NASM 0.98p3.2 2002-04-30 20:54:58 +00:00
configure.in NASM 0.98p7 2002-04-30 20:57:59 +00:00
COPYING NASM 0.98p6 2002-04-30 20:57:38 +00:00
disasm.c NASM 0.98p7 2002-04-30 20:57:59 +00:00
disasm.h NASM 0.98p3.5 2002-04-30 20:56:43 +00:00
eval.c NASM 0.98p3.2 2002-04-30 20:54:58 +00:00
eval.h NASM 0.98p3 2002-04-30 20:53:55 +00:00
exebin.mac NASM 0.98p3.5 2002-04-30 20:56:43 +00:00
float.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
float.h NASM 0.91 2002-04-30 20:51:32 +00:00
insns.dat NASM 0.98p7 2002-04-30 20:57:59 +00:00
insns.h NASM 0.98p7 2002-04-30 20:57:59 +00:00
insns.pl NASM 0.98p3.4 2002-04-30 20:56:19 +00:00
install-sh NASM 0.97 2002-04-30 20:53:16 +00:00
internal.doc NASM 0.95 2002-04-30 20:52:26 +00:00
labels.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
labels.h NASM 0.98p3 2002-04-30 20:53:55 +00:00
Licence NASM 0.98p7 2002-04-30 20:57:59 +00:00
listing.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
listing.h NASM 0.95 2002-04-30 20:52:26 +00:00
macros.c NASM 0.98p3.2 2002-04-30 20:54:58 +00:00
macros.pl NASM 0.96 2002-04-30 20:52:49 +00:00
makedist.sh NASM 0.97 2002-04-30 20:53:16 +00:00
Makefile.in NASM 0.98p7 2002-04-30 20:57:59 +00:00
MODIFIED NASM 0.98p7 2002-04-30 20:57:59 +00:00
names.c NASM 0.98p3.5 2002-04-30 20:56:43 +00:00
nasm.1 NASM 0.98p7 2002-04-30 20:57:59 +00:00
nasm.c NASM 0.98p7 2002-04-30 20:57:59 +00:00
nasm.h NASM 0.98p7 2002-04-30 20:57:59 +00:00
nasmlib.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
nasmlib.h NASM 0.98p3 2002-04-30 20:53:55 +00:00
ndisasm.1 NASM 0.98p7 2002-04-30 20:57:59 +00:00
ndisasm.c NASM 0.98p7 2002-04-30 20:57:59 +00:00
ndisasm.doc NASM 0.95 2002-04-30 20:52:26 +00:00
outaout.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
outas86.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
outbin.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
outcoff.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
outdbg.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
outelf.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
outform.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
outform.h NASM 0.98p3.2 2002-04-30 20:54:58 +00:00
outforms.h NASM 0.98p3 2002-04-30 20:53:55 +00:00
outobj.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
outrdf.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
outrdf2.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
parser.c NASM 0.98p3.5 2002-04-30 20:56:43 +00:00
parser.h NASM 0.98p3 2002-04-30 20:53:55 +00:00
preproc.c NASM 0.98p7 2002-04-30 20:57:59 +00:00
preproc.h NASM 0.98p6 2002-04-30 20:57:38 +00:00
Readme NASM 0.98p3.5 2002-04-30 20:56:43 +00:00
standard.mac NASM 0.98p3.2 2002-04-30 20:54:58 +00:00
sync.c NASM 0.98p3 2002-04-30 20:53:55 +00:00
sync.h NASM 0.91 2002-04-30 20:51:32 +00:00
Wishlist NASM 0.98p6 2002-04-30 20:57:38 +00:00
zoutieee.c NASM 0.98p3.2 2002-04-30 20:54:58 +00:00

This directory contains the necessary files to port the C compiler
``LCC'' (available by FTP from sunsite.doc.ic.ac.uk in the directory
/computing/programming/languages/c/lcc) to compile for Linux (a.out or
ELF) or other supported operating systems by using NASM as a back-end
code generator.

This patch has been tested on lcc version 4.0.

To install:

- Copy `x86nasm.md' into the `src' directory of the lcc tree.

- Copy either `lin-elf.c' or `lin-aout.c' into the `etc' directory.

- With previous versions, you had to modify x86-nasm.md if you weren't
  using ELF.  There is now inbuilt support within NASM in the shape
  of the __CDECL__ macro, so this modification is no longer necessary.

- Make the following changes to `bind.c' in the `src' directory:

  - Near the top of the file, add a line that reads
	extern Interface x86nasmIR;

  - In the `bindings' array, add the lines
        "x86-nasm",      &x86nasmIR,
        "x86/nasm",      &x86nasmIR,
    (in sensible looking places...)

  A sample `bind.c' has been provided to show what the result of
  this might look like. You might be able to get away with using it
  directly...

- Modify the lcc makefile to include rules for x86nasm.o: this will
  have to be done in about three places. Just copy any line with
  `x86' on it and modify it to read `x86nasm' everywhere. (Except
  that in the list of object files that rcc is made up from, do
  remember to ensure that every line but the last has a trailing
  backslash...)

- You may have to modify the contents of `lin-elf.c' or `lin-aout.c'
  to reflect the true locations of files such as crt0.o, crt1.o,
  ld-linux.so and so forth. If you don't know where to find these,
  compile a short C program with `gcc -v' and see what command line
  gcc feeds to `ld'.

- You should now be able to build lcc, using `lin-elf.c' or
  `lin-aout.c' as the system-dependent part of the `lcc' wrapper
  program.

- Symlink x86nasm.c into the `src' directory before attempting the
  triple test, or the compile will fail.

- Now it should pass the triple test, on either ELF or a.out. Voila!