From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Stezenbach Date: Wed, 30 Jan 2008 16:36:04 +0100 Subject: [U-Boot-Users] [Patch] Disable icache before call the first line of kernel in do_bootelf(). In-Reply-To: <200801291912.11046.vapier@gentoo.org> References: <20080129223551.3A9EA24680@gemini.denx.de> <200801291912.11046.vapier@gentoo.org> Message-ID: <20080130153604.GA9497@sig21.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Jan 29, 2008 at 07:12:10PM -0500, Mike Frysinger wrote: > On Tuesday 29 January 2008, Wolfgang Denk wrote: > > In message <200801282114.14393.vapier@gentoo.org> you wrote: > > > unfortunately, using weak symbols and overriding elsewhere doesnt look > > > like it's possible currently due to the way ld searches archives. for > > > example, if > > > > ??? > > > > > ld will pick the weak symbol provided by libcommon.a even though a strong > > > symbol is also available in libblackfin.a :( > > > > That should never happen. What is your toolchain? > > read the binutils mailing list. this is the expected behavior of ld. > > http://sourceware.org/ml/binutils/2008-01/msg00301.html Overriding weak with strong symbols works just fine, however in your case ld has no reason to even look at your override, since it already has a (weak) definition for do_bootelf_setup(). Thus the solution for your problem is to give ld a reason to pull in your do_bootelf_setup() definition. There are two ways: - explicitly list the .o file on the linker command line, i.e. add it to $(OBJS) or $(PLATFORM_LIBS) instead of libblackfin.a - put the do_bootelf_setup() definition in a .o file along with some other code you know will be pulled in, e.g. add it to lib_blackfin/cache.c instead of putting it in its own file HTH, Johannes