From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Wegner Date: Thu, 29 Oct 2009 16:44:55 +0100 Subject: [U-Boot] FPGA relocation/C environment In-Reply-To: <20091029150004.GI3216@leila.ping.de> References: <20091029082113.GE3216@leila.ping.de> <20091029110000.EA98F19F73@gemini.denx.de> <20091029134059.GH3216@leila.ping.de> <20091029150004.GI3216@leila.ping.de> Message-ID: <20091029154455.GJ3216@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, although I have to leave for now, just some questions to see if there is anything I understood correctly until now... - in the PPC startup (assembly) files, the section .got2 is explicitely created using START_GOT etc. - .got2 contains some vital pointers (vectors) as well as data pointers like a pointer to .fixup and a pointer to itself (?!) - the ppc linker automatically puts .data.rel (and other relocatable sections?) into .fixup (which seems not the case with my m68k linker) - the ppc startup code uses some obfuscated assembly code ;-) to relocate both the global relocation table (.got) as well as the sections .got2 and .fixup (.got seems to be implicitly mentioned: "/* First our own GOT */ add r14, r14, r15 /* then the one used by the C code */ add r30, r30, r15" but I can not see where it is actually relocated...) Is this correct so far? I am not sure because it seems more complicated than necessary to me (especially the algorithm to relocate .got2 and .fixup - or is this all about the possibility to do multiple relocations?), so maybe I still have a misunderstanding here. Furthermore, the special handling of r14 (-ffixed-r14 in config.mk) still puzzles me. Thank you and best regards, Wolfgang