From owner-freebsd-questions Tue Nov 5 07:42:07 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA06986 for questions-outgoing; Tue, 5 Nov 1996 07:42:07 -0800 (PST) Received: from sdev.usn.blaze.net.au (sdev.usn.blaze.net.au [203.17.53.19]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id HAA06966 for ; Tue, 5 Nov 1996 07:41:37 -0800 (PST) Received: (from davidn@localhost) by sdev.usn.blaze.net.au (8.7.6/8.6.9) id CAA05714; Wed, 6 Nov 1996 02:38:44 +1100 (EST) Message-Id: <199611051538.CAA05714@sdev.usn.blaze.net.au> Date: Wed, 6 Nov 1996 02:38:43 +1100 From: davidn@sdev.usn.blaze.net.au (David Nugent) To: beng@uclink.berkeley.edu (Benjamin Greenwald) Cc: questions@freebsd.org Subject: Re: Where can I get information about FreeBSD's object file format References: <327EE491.476C8C85@uclink.berkeley.edu> X-Mailer: Mutt 0.49 Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-md5; boundary="GR=Z1=n7aEwapjvb" In-Reply-To: <327EE491.476C8C85@uclink.berkeley.edu>; from Benjamin Greenwald on Nov 4, 1996 22:54:09 -0800 Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk --GR=Z1=n7aEwapjvb Benjamin Greenwald writes: > I'd like to give something to the FreeBSD, as well as the NASM project, > comunities. As you may or may not know, NASM is a free, Intel syntax > assembler which currently generates object code for DJGPP(COFF), Linux > (a.out and ELF), Win16, Win32, and .com files. I'd like to add a > FreeBSD relocatable object file format back end, but I can't find the > technical info I need anywhere on the web. nasm already supports what is required. "Linux aout" is basically the same as FreeBSD's. I compiled nasm only a day or two ago and it required *no* changes to build under FreeBSD, and the aout object files worked fine. (from aouttest.asm) ; test source file for assembling to a.out ; build with: ; nasm -f aout aouttest.asm ; gcc -o aouttest aouttest.c aouttest.o ; (assuming your gcc is a.out) davidn@sdev[~/nasm-0.90/test]$ ../nasm -f aout aouttest.asm davidn@sdev[~/nasm-0.90/test]$ gcc -o aouttest aouttest.c aouttest.o davidn@sdev[/home/davidn/tmp/nasm-0.90/test]$ ./aouttest Testing lrotate: should get 0x00400000, 0x00000001 lrotate(0x00040000, 4) = 0x00400000 lrotate(0x00040000, 14) = 0x00000001 This string should read `hello, world': `hello, world' The integers here should be 1234, 1235 and 4321: integer==1234, localint==1235, commvar=4321 These pointers should be equal: 0x1831 and 0x1831 So should these: 0x20d0 and 0x20d0 I don't have ELF support on my system, but it may well be that ELF will work as well. Regards, David Nugent, Unique Computing Pty Ltd - Melbourne, Australia Voice +61-3-9791-9547 Data/BBS +61-3-9792-3507 3:632/348@fidonet davidn@blaze.net.au http://www.blaze.net.au/~davidn --GR=Z1=n7aEwapjvb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia iQCVAwUBMn5iYa0PLjnMZgUtAQFDlQP+IZJ8jNg1QZSKy37zG/ptM+J3iabrD1Jc ho0ullxM/06ks/tijHwccwKHKk8kx5gNAHzenTCKzm3N8BlbYoOjYVvqUxA42h3D SWx3JHxeQnjtG1TL5XlcNlHolAbWW1l2ZwxrGZuIhEIp0dCTRhwZ68/f4/I/cE2X atTBSCVHFag= =JODr -----END PGP SIGNATURE----- --GR=Z1=n7aEwapjvb--