From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Thu, 19 Jun 2008 16:12:52 -0500 Subject: [U-Boot-Users] Non-static global variables cause relocation to fail In-Reply-To: <20080619205247.10F95248D2@gemini.denx.de> References: <20080619205247.10F95248D2@gemini.denx.de> Message-ID: <485ACBD4.8030608@freescale.com> 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: > In message <485AC5C5.5080709@freescale.com> you wrote: >> I did say that. Simply making the global variable not static caused it to fail. > > Ummm... I guess there must be more than one variable in U-Boot, as > there are several source files and several board configurations. Sorry, I was under the assumption that the problem is not unique to the actual variable in question. That is, making any global variable non-static risks having relocation fail. I was looking for a more general explanation to the problem. I was hoping that someone who understood the relocation code well could explain to me, in theoretical terms, how this could happen. > What is "same"? Which source file is this? Which line? Which board? > Which compiler from which distro? Which binutils? This is a new file that I haven't posted yet. It is a replacement for board/freescale/common/sys_eeprom.c. It's currently undergoing internal review. That's why I asked for a general explanation. Compiler: powerpc-linux-gnu-gcc (GCC) 4.2.1 Binutils: GNU ld (GNU Binutils) 2.18.50.20070820 -- Timur Tabi Linux kernel developer at Freescale