Dear Peter, In message <1279658019.5685.125.ca...@thunk> you wrote: > > > I think the problem is that before relocation we have to use > > getenv_r(), which is done for example to read the baudrate, see > > arch/powerpc/lib/board.c: init_baudrate() > > How hard is it to detect this case and generate a stackdump if someone > calls getenv() before relocation is complete? That would help to spot > places where people are breaking the rules...
It's trivial to check - all we need to addd to getenv() is something like if (!(gd->flags & GD_FLG_RELOC)) bail_out(); But then, we could as well try to be friendly and eliminate getenv_r(). We would just need a static buffer for the result. 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: w...@denx.de Reader, suppose you were an idiot. And suppose you were a member of Congress. But I repeat myself. - Mark Twain _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot