Subject: Re: netbsd i386 assembler
To: haad <haaaad@gmail.com>
From: Peter Bex <Peter.Bex@xs4all.nl>
List: netbsd-users
Date: 03/10/2006 16:38:25
--pvq4FPIYehQuVelz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Mar 10, 2006 at 12:47:17PM +0100, haad wrote:
> compile it with this nasm -f aoutb hello.S
> and link with this   ld --oformat a.out-i386-netbsd -s -o hello hello.o
>=20
> notebook> ./hello
> Segmentation fault (core dumped)
>=20
> if I run nasm with nasm -f elf hello.S and link it with this
> 		   ld  -s -o hello hello.o
> notebook> ./hello
> ./hello: Exec format error. Binary file not executable.
>=20
> >file hello
> hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
> statically linked, stripped

Did you read http://www.netbsd.org/Documentation/kernel/elf-notes.html ?

HTH,
Peter
--=20
http://www.student.ru.nl/peter.bex
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
							-- Donald Knuth

--pvq4FPIYehQuVelz
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (NetBSD)

iQEVAwUBRBGdcdOrBFwYag3gAQJzfgf/f4q7y1KbgFXj/iRrvDN0Og9r3YYlJCEN
4VqiVQpFRDCmqszuwewBwZXgKbuiM89jbxbO4K66turBJMqtrMiH82UWkeLlKVem
WDer1d+Ztf4eubmhNxI/5n+tVD4zeSdWgu7rv7Bt8ZEc0O1+LpzDKCGCat8ZV2Ov
MUn3M0oyPzE9TwRuOGwW6EeE8uqMDM3KzgKyJraRjnx0LBdfV+rqM0MDe9eM/ND0
YF9iuFWB/7GBLP0FHcGDwNMCtITxaIiR5i5p/Uy7BAGdwoE8OQY4Q4WYBAIsRtEb
P/pc+muBXre5PxQHndvbpsnMBiivQ925WGjsgdAAR42W8ek6A5j2kQ==
=luz2
-----END PGP SIGNATURE-----

--pvq4FPIYehQuVelz--