Date: Mon, 4 Nov 2002 18:11:07 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Naydoe Maung <nyingelay@hotpop.com> Cc: FreeBSD Questions <freebsd-questions@FreeBSD.ORG> Subject: Re: NASM (BSD vs. Linux) Message-ID: <20021105001106.GA12357@dan.emsphone.com> In-Reply-To: <200211041524.43350.nyingelay@hotpop.com> References: <200211041524.43350.nyingelay@hotpop.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Nov 04), Naydoe Maung said: > mov eax, 4 > mov ebx, 1 > mov ecx, msg > mov edx, MSGLEN > int 80h > > Shell output: > > bash-2.05b$ nasm -f elf hello.asm > bash-2.05b$ ld -o hello hello.o > bash-2.05b$ ./hello > bash-2.05b$ ls > hello hello.asm hello.o > bash-2.05b$ > ================== > > As you can see here, It compiled and linked without any errors, > however no appropriate output is being generated. There were no > problems running it on Linux. I heard some issues about different > sys calls and interrupts on Linux and BSD, but I thought since the > Linux driver was loaded there should be no problems running Linux > oriented programs. I'm very confused, and I'm sure I'm missing out > some stuff. Help me please. Try branding your executable as a Linux binary with brandelf, or call the write function and link with libc, which will do the syscall for you and won't require the Linuxulator to run. Take a look at the editors/e3 port to see how to write portable assembly. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021105001106.GA12357>