From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <676c31f080955764cdac09f8daa541dd@swtch.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] Good enough approximation for ape/pcc From: "Russ Cox" Date: Tue, 11 Apr 2006 07:58:11 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 34dae766-ead1-11e9-9d60-3106f5b1d025 > i've considered this. would it be too much trouble to convert plan 9 object > files to elf? or to write a plan9-to-elf converter? this always seems like a good idea at first but is not, as least as a solution for plan 9 from user space. one of the main goals of p9p is to play nice with the local system. if you're going to do that you need to be able to link with the local system libraries, which means knowing the local system's calling convention, object file formats, etc. also debugging format so that you can generate debuggable binaries. plan 9 386 .8 files (just to take an example, any architecture will do) look nothing like unix .o files, so it's not like you could just change the compiler to generate .o either. you'd have to merge 8c and 8l into a single program just to generate a traditional unix .o, and then use the system linker or maybe write your own. that's not what i would call a portable system. better to have ansi c copies of the source and just use the system compiler in the first place. much less to maintain. the work might be worth it if you were building your own operating system and wanted it to use a non-gcc compiler suite. but at that point you could just load plan 9 binaries instead of elf binaries and be done. russ