From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 12 Jan 2011 14:31:02 -0800 From: Anthony Martin To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20110112223102.GA5183@dinah> References: <20110111185536.GA6160@dinah> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [9fans] plan9 go output faults on 9vx but ok on cpu Topicbox-Message-UUID: 95202942-ead6-11e9-9d60-3106f5b1d025 ron minnich once said: > are you saying change 8l so that it creates code that works on 9vx in > the special case that it runs on a 64-bit system? Then we're going to > need to make 8l aware of way too much stuff. I'm talking about Go's linker. In the Go runtime, the G and M pointers need to be in a per-process storage area. On Plan 9, this is the stack. Right now, the offset of the pointers is hard-coded in the linker to be just before the Tos structure. The problem is that the value that was chosen is not correct when running on 9vx because the top of the stack is is at 0x10000000 instead of 0xdffff000 (as it is on native Plan 9). I think that the Go 8l should not hard-code this value but, instead, discover it somehow ... though I'm not sure how. Anthony