From owner-freebsd-hackers Thu Nov 21 8:54:53 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91C6B37B401 for ; Thu, 21 Nov 2002 08:54:51 -0800 (PST) Received: from smtp030.tiscali.dk (smtp030.tiscali.dk [212.54.64.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9891643E8A for ; Thu, 21 Nov 2002 08:54:50 -0800 (PST) (envelope-from dslb@tiscali.dk) Received: from cpmail.dk.tiscali.com (mail.tiscali.dk [212.54.64.159]) by smtp030.tiscali.dk (8.12.5/8.12.5) with ESMTP id gALGoCpV009162 for ; Thu, 21 Nov 2002 17:54:47 +0100 (MET) Received: from [213.237.112.252] by cpmail.dk.tiscali.com with HTTP; Thu, 21 Nov 2002 17:54:47 +0100 Date: Thu, 21 Nov 2002 17:54:47 +0100 Message-ID: <3D9C05F40000B2D2@cpfe6.be.tisc.dk> From: dslb@tiscali.dk Subject: Assembly and ELF To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi FreeBSD lovers I can't remember if I'm on the list, so please CC to me. I used to program in C++ and assembly under windows, but now I only run FreeBSD (4.7). I have to get used to not playing with BIOS interrupts and direct hardwar= e accessing, but I'll live. My questions are: 1. Can you guide my to some good info on asm programming under FreeBSD (I= have read www.int80h.org/bsdasm) 2. /usr/src/sys/kern/syscalls.master gives argument passing info, but it doesn't tell you about the function returns. I have read that for most pa= rts it is in EAX, but I wan't to be 100% where the return value is. Btw why do we need to pad arguments? 3. Why do BSD use the stack and not the registres to pass arguments to fu= nctions? I bet there is a really good reason, but isn't the Linux/Windows way bett= er performancewise? 4. I would really like to know more (everything) about the ELF file forma= t (this is the primary format in FreeBSD right?) So can you recommend some good links? I would like to know things like the use of .bss (the heap ri= ght?), .text, .data and also about the linker (ld). 5. When you run int 80h that happens? Is the functions staticly in the ke= rnel and thereby in RAM or will the kernel use a .so file? If so, how does it know which file to use? (I am trying to see the whole picture, how things= fit together) I hope can/will answer these questions :-) br socketd To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message