From: Wolfgang Denk Date: Thu, 19 Jun 2008 23:55:13 +0200 Subject: [U-Boot-Users] Non-static global variables cause relocation to fail In-Reply-To: Your message of "Thu, 19 Jun 2008 16:12:52 CDT." <485ACBD4.8030608@freescale.com> Message-ID: <20080619215513.E43C8248D2@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <485ACBD4.8030608@freescale.com> you wrote: > > 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. Hm...as you will notice, there are many global vaiables being used without problems, so I don't easily buy such a very general statement. > I was looking for a more general explanation to the problem. I was hoping that How about analyzing your specific problem instead of assuming that it is a general problem? Did you, for example, try changing another static variable in another source file for another, known to be working board, and observe the same problem? Or why exactly do you assume it is a general problem? > This is a new file that I haven't posted yet. It is a replacement for Ah. So there is a chance that it's just bugs in your new code? > That's why I asked for a general explanation. Sounds unreasonable to me. > Compiler: powerpc-linux-gnu-gcc (GCC) 4.2.1 > Binutils: GNU ld (GNU Binutils) 2.18.50.20070820 Hm... did you try another, maybe less recent, toolchain, with the same results? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Landing: a controlled mid-air collision with a planet.