From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Wegner Date: Fri, 30 Oct 2009 14:11:12 +0100 Subject: [U-Boot] FPGA relocation/C environment In-Reply-To: References: <20091029082113.GE3216@leila.ping.de> <20091029110000.EA98F19F73@gemini.denx.de> <20091029134059.GH3216@leila.ping.de> <20091029150004.GI3216@leila.ping.de> <20091029154455.GJ3216@leila.ping.de> Message-ID: <20091030131112.GL3216@leila.ping.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, thank you all for all the comments so far. It seems I have at least 2 problems: - my gcc (m68k-elf-gcc (Sourcery G++ Lite 4.3-208) 4.3.3) does not produce correctly relocatable code; no matter if I give -fPIC or not (-mrelocatable is not accepted at all), I do not get any entries in .got2 or .fixup, only .got However, there still may be anything wrong in my conclusion, because I can use this compiler to compile uClinux-dist-20071107 and get working applications (which, as far as I understand, have to be relocated at runtime, too, but I do not know if any of these use such features as statically initialized function pointers that I have in the U-Boot fpga code...). - the current coldfire startup code (at least for MCF532x/MCF537x) would not handle these sections even if they existed - however, this seems to be rather easily (i.e. maybe even I could do it) fixed, looking at the ppc examples. I will first live with the problem (relocating the fpga struct pointers in my own board code, where it is filled anyways - for coldfire, gd->reloc_off is still present) and see if I can get hold of a better gcc version. I tried gcc-4.4.1, but was unable to compile one of U-Boot or uClinux, so switched back to this one which I found to compile (old and current) U-Boot, old uClinux _and_ support mcf5445x, which I am designing in now... Thank you and sorry for my stupid questions. Regards, Wolfgang