From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Andreas_Bie=DFmann?= Date: Fri, 05 Nov 2010 12:21:19 +0100 Subject: [U-Boot] Weak symbols: request for comments In-Reply-To: <4CD3DEFC.7010104@gmail.com> References: <4CD3DEFC.7010104@gmail.com> Message-ID: <4CD3E8AF.2010808@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 Dear Sebastien Carlier, Am 05.11.2010 11:39, schrieb Sebastien Carlier: > Hello all, > So, U-boot needs to be fixed. I can see the following ways forward: > > 1.1) Stop using weak symbols; use pre-initialized function pointers > instead (possibly grouped in a struct, for cleanliness). > This has the benefit of offering a clear interface and being > independent of toolchain details. sounds good to me despite of grouping. Isn't grouping tough due to different weak functions for each architecture? > 1.2) Use regular (non-weak) extern declarations for overridable stuff; > collect all default weak symbols into a separate library archive, > to be supplied last to the linker. sounds messy to me. How about different weak symbols for different architectures? regards Andreas Bie?mann