From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <6B6DC1B5-662B-4408-9F52-D0CC7302FDC0@kix.in> From: Anant Narayanan To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> In-Reply-To: <7871fcf50802180853v7473d507w991517014e3cb4bb@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Subject: Re: Page-aligned executables (Was re: [9fans] Non-stack-based calling conventions) Date: Tue, 19 Feb 2008 00:54:36 +0530 References: <7871fcf50802180853v7473d507w991517014e3cb4bb@mail.gmail.com> Topicbox-Message-UUID: 599d97c2-ead3-11e9-9d60-3106f5b1d025 >> Hence, writing the loader for Plan 9's a.out proved to be a >> challenge. >> >> I ended up writing a user-space program that padded out the required >> gap between TEXT and DATA before asking the kernel to execute it. >> Suboptimal, but it works. >> >> If anyone has any ideas as to how I can improve the situation, i'll >> be >> grateful. > > What's the context that you're building this loader for? I'm building a sort of reverse linuxemu, call it plan9emu if you will. I want to be able to run plan 9 binaries on linux without any modification. I've gotten as far as catching the syscalls, but the binary still has to be modified (padded). -- Anant