From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Fri, 29 Oct 2010 11:19:41 +0200 Subject: [U-Boot] Most ARM CPU's have buggy clear_bss? In-Reply-To: <4CCA8AF0.3000201@ahsoftware.de> References: <4CC93C74.6050309@ahsoftware.de> <4CC94305.8060001@ahsoftware.de> <4CCA8AF0.3000201@ahsoftware.de> Message-ID: <4CCA91AD.3060806@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi all, Le 29/10/2010 10:50, Alexander Holler a ?crit : > Hello again, > > I'm leaving the problem description below, what fixed it all here was to > add -fPIC to the CFLAGS to instruct the compiler to generate relocatable > code (again). > > This flag was replaced in commit 92d5ecba47feb9961c3b7525e947866c5f0d2de5 Did you reach tis commit by dissecting? > with -pie in LDFLAGS, which I don't understand (does not mean I have > much experience how the compiler and linker are working in regard to > relocatable code). > > Regards, > > Alexander That needs some more analysis. -fPIC without GOT relocation does nothing good, and with it, does not enough -- hence the ELF relocation patches replacing -fPIC with -pie, which is *intended* for relocating executables. these two machanisms are not meant to be used together. Can you be more specific about this: >> To verify the problem: >> >> Add >> >> #define DEBUG >> >> in top of arch/arm/lib/board.c >> >> and >> >> printf("nand_chip: %p\n",,&nand_chip[0]); >> >> in nand_init() in drivers/mtd/nand/nand.c >> >> and have a look at the output when u-boot comes up. Precisely what is the output in both cases? >> Regards, >> >> Alexander Amicalement, -- Albert.