From mboxrd@z Thu Jan 1 00:00:00 1970 From: Latchesar Ionkov To: 9fans@cse.psu.edu Subject: Re: [9fans] gcc trouble Message-ID: <20031120143356.GA20235@ionkov.net> References: <20031111001624.GA10112@ionkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Date: Thu, 20 Nov 2003 09:33:56 -0500 Topicbox-Message-UUID: 8fb43c50-eacc-11e9-9e20-41e7f4b1d025 Hi, I spend some time researching how to make gcc to produce Plan9 object format. Creating a new BFD backend that generates Plan9 object files won't solve the problem. GCC uses different calling convention, so even if we make libbfd to produce Plan9 object format, the object files won't be compatible with object files created by 8c. I think the only solution is to change GCC machine description for Plan9. It may even be possible to make gcc to generate Plan9 object files instead of assembler files. So far I see four major tasks: 1. Change target's calling convention. This also includes finding out if the change will affect C++ exception handling. 2. Change assembler syntax to be compatible with 8a, or make GCC to generate Plan9 object files directly. 3. Teach 8l (and 8a) about the additional instructions that GCC can produce (MMX, SSE etc.), or make GCC to not use them. 4. Modify 8l to support multiple definitions of GLOBAL DATA symbols, placing only one in the image (similar to setting bit 2 of the TEXT symbol flags). Any thoughts? Thanks, Lucho On Wed, Nov 12, 2003 at 11:46:19PM +0000, Charles Forsyth said: > >>I guess (didn't look into it) Plan9 object format doesn't support sections > >>with arbitrary names. > > it isn't the usual object format: > see thompson's paper on the compiler (to begin with).