From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Thu, 16 Sep 2010 07:09:46 +0200 Subject: [U-Boot] [PATCH 12/26] ARM: add relocation support In-Reply-To: <4C91356B.5060701@free.fr> References: <4C62E8E7.2000407@denx.de> <4C91356B.5060701@free.fr> Message-ID: <4C91A69A.8050102@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 Hello Albert, Albert ARIBAUD wrote: > Le 11/08/2010 20:16, Heiko Schocher a ?crit : > >> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c >> index 54519b0..88c6427 100644 >> --- a/arch/arm/lib/board.c >> +++ b/arch/arm/lib/board.c > >> +init_fnc_t *init_sequence[] = { > > Tested this code tonight, and I noticed that if the image is run from > another location than the one it was linked for, then access to > init_sequence is not made at the right location. To get correct access > regardless of the image location, init_sequence has to be defined const. Hmm.. at this place code is not relocated! So it should be executed on the right address. Don;t know, if this would be the only problem, if you run this code from another address ... > I suspect that the same applies to all globals used by any function > called during board_init_f execution. bye Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany