Skip to contentSkip to conversation

global data pointer on arm

U-Boot-Users Andreas Engel 1 participant 2 messages Jul 2, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

I'm currently trying to replace armboot with u-boot-1.1.1 on a custom board with an epxa10 chip. While debugging, I discovered that the compiled code of getenv_r destroys the content of r8, which holds the global data pointer. Of course this makes u-boot fail. Is this a bug in u-boot or the toolchain? Or did I miss something else?

Regards,
Andreas

#1 lore raw
Quoted 3 lines · On Fri, 2 Jul 2004 13:14:39 +0200 Andreas Engel wrote:

compiled code of getenv_r destroys the content of r8, which holds the global data pointer. Of course this makes u-boot fail. Is this a bug in u-boot or the toolchain? Or did I miss something else?

Umm... of course I missed something: I shouldn't stop reading in the middle of the relevant gcc info page.

JFTR: in cpu/epxa/config.mk add '-ffixed-r8' to PLATFORM_RELFLAGS.

Soliloquizing,
Andreas