From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Mon, 28 Jan 2008 21:14:13 -0500 Subject: [U-Boot-Users] [Patch] Disable icache before call the first line of kernel in do_bootelf(). In-Reply-To: <20070813155047.C419424041@gemini.denx.de> References: <20070813155047.C419424041@gemini.denx.de> Message-ID: <200801282114.14393.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday 13 August 2007, Wolfgang Denk wrote: > in message <200708131052.44472.vapier@gentoo.org> you wrote: > > so using weak hooks is OK now ? i think it'd be good to migrate all of > > the > > It always has been OK - just nobody bothered to use it. [And I didn't > even know about it when I started working on PPCBoot.] > > > ugly boote/bootm/etc... cruft to external weaks and let arches define > > their own > > Yes, a few #ifdef's can be eliminated that way. unfortunately, using weak symbols and overriding elsewhere doesnt look like it's possible currently due to the way ld searches archives. for example, if i do something like: common/cmd_elf.c: __attribute__((weak)) do_bootelf_setup() { ... current code ... } do_bootelf() { ... do_bootelf_setup(); ... and then i want to override this with a Blackfin version: lib_blackfin/bootelf_setup.c: do_bootelf_setup() { ... } but since the linking process looks like: ld ... --start-group ... \ ... lib_blackfin/libblackfin.a ... \ ... common/libcommon.a ... \ --end-group ... ld will pick the weak symbol provided by libcommon.a even though a strong symbol is also available in libblackfin.a :( so our only realistic options are: - create another static archive in common/ for weak symbols and specify it just before libcommon.a - live with #ifdef's, but minimize the crappy situation by splitting out just the relevant code so the main bootelf function stays clean -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 827 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20080128/a3885df1/attachment.pgp