From: Robin Gilks Date: Thu, 03 Jul 2003 10:01:46 +1200 Subject: [U-Boot-Users] Function pointers after relocation In-Reply-To: <20030702143117.B3B5EC592A@atlas.denx.de> References: <20030702143117.B3B5EC592A@atlas.denx.de> Message-ID: <3F03564A.4090807@tait.co.nz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > > This is not correct. The problem is that staticlly initialized data > (like initialized function pointers() must be manually relocated. If > there is such a thing left pointing to flash, it is a bug and should > be fixed. > > Which part of the code are you speaking of? Opps - a typo in the example!! I meant to say the pointer env_get_char() which is initialised to env_get_char_init and remains pointing at the Flash copy of that function after relocation. As it happens I think we have another problem in getting to our environment since the gd->env_ptr value seems to be garbage!! I don't see that running the code from Flash should in itself be a real problem (although undesirable). More info later if it's relevent... -- Robin Gilks Senior Design Engineer Phone: (+64)(3) 357 1569 Tait Electronics Fax : (+64)(3) 359 4632 PO Box 1645 Christchurch Email : robin.gilks at tait.co.nz New Zealand