Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Sebastien Carlier
Dear Wolfgang, I have implemented this solution: On 11/05/2010 01:14 PM, Wolfgang Denk wrote: > I think stop using a library archives and do what Linux does > instead is the way to go. > You will find the patch here: http://io.oiioiio.com/~sebc/0001-Use-partial-linking-instead-of-buil

Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Sebastien Carlier
Dear Wolfgang, On 11/05/2010 01:23 PM, Wolfgang Denk wrote: > Dear Sebastien Carlier, > > In message<4cd3f58f.8090...@gmail.com> you wrote: > >> It does seem like weak symbols were designed with other uses in mind, >> such as C++ class members defined within a class declaration, or to weak >>

Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Sebastien Carlier
Dear Wolfgang, On 11/05/2010 01:14 PM, Wolfgang Denk wrote: >> 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 tool

Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Reinhard Meyer
Dear Sebastien, >>> Are there better options? Which one would you prefer to see >>> implemented? >>> >> Yes. The old-fashioned #define CONFIG_BOARD_INIT_F and friends >> method. I would prefer that one. Its not beautiful but still >> widely used and bullet-proof. >> > > Could you please

Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Wolfgang Denk
Dear Sebastien Carlier, In message <4cd3f58f.8090...@gmail.com> you wrote: > > It does seem like weak symbols were designed with other uses in mind, > such as C++ class members defined within a class declaration, or to weak > the dependencies between libraries... but not really to allow > over

Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Sebastien Carlier
Dear Reinhard, On 11/05/2010 12:16 PM, Reinhard Meyer wrote: >> 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. >> > Not very practical, that would

Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Wolfgang Denk
Dear Sebastien Carlier, In message <4cd3defc.7010...@gmail.com> you wrote: > > 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 > independ

Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Joakim Tjernlund
> > 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

Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Andreas Bießmann
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). >

Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Reinhard Meyer
Dear Sebastien Carlier, > Some context: u-boot uses weak symbols in several places to provide > default definitions intended to be overriden in individual boards; > this feature is broken with recent toolchains (at least gcc 4.4.4, > binutils 2.20.1), and as a result only the default definitions ar

Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Andre Schwarz
Sebastien, [snip] > 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 >

[U-Boot] Weak symbols: request for comments

2010-11-05 Thread Sebastien Carlier
Hello all, I am looking for comments on the use of weak symbols in u-boot. Some context: u-boot uses weak symbols in several places to provide default definitions intended to be overriden in individual boards; this feature is broken with recent toolchains (at least gcc 4.4.4, binutils 2.20.1), an