From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graeme Russ Date: Thu, 27 Nov 2008 07:06:56 +1100 Subject: [U-Boot] weak functions not being over-ridden (location dependent) In-Reply-To: <492DA694.2050606@gmail.com> References: <492D3AD5.3080400@gmail.com> <3efb10970811260501h6dcf87b9idf3d80981ceee07b@mail.gmail.com> <20081126151236.F0298834B020@gemini.denx.de> <492DA460.9070404@gmail.com> <492DA694.2050606@gmail.com> Message-ID: <492DAC60.6060608@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Ben Warren wrote: > Graeme, > > Graeme Russ wrote: >> Wolfgang Denk wrote: >> >>> I think this has been answered before: it doesn't work when the >>> functions are in libraries. It only works when the respective >>> functions are in explicitely linked object files. >>> >>> >>> >> This doesn't seem right - reset_cpu () will be in a library no matter >> where >> I put it (either libsc520.a or libeNET.a) >> > Is the overriding function the only one in the source file (and thus the > object file)? I've found that overriding functions will link only if > there's other code in the source file that is strongly-linked. > > regards, > Ben That solves the problem - Thanks I think this is an ld bug IMHO - will submit to binutils mailing list for comment In the meantime, I need to dream up a strongly linked function which will be useful ;) Regards, Graeme