From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: "Steve Simon" Date: Mon, 2 Jul 2007 20:55:58 +0100 To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] executable memory map Topicbox-Message-UUID: 8f758c84-ead2-11e9-9d60-3106f5b1d025 Just to check I understand 386 executables on plan9. .text is linked to the address 4096 + size of the a.out header (32 bytes) => 4096 + 32. .data starts at the begining of the next 4096byte page after the .text. .bss follows the data with no gap. On exec the a.out file is read in its entirity to virtual address 4096 and the remainder of the file falls into place. The parts I am unsure of are: 1/ Is there any padding (to a 32 bit boundry or more) between .data and .bss? 2/ Does the a.out file contain padding to ensure .data starts on a 4k boundry or does the kernel's loader move .data (using memcpy() or MMU mapping)? Thanks. -Steve