[U-Boot-Users] Non-static global variables cause relocation to fail

Wolfgang Denk wd at denx.de
Thu Jun 19 23:55:13 CEST 2008


In message <485ACBD4.8030608 at 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.




More information about the U-Boot mailing list