
Hello,
recently there were some discussion how to support board specfic lowlevel_init code on the at91 plattform. For example in Nov 2008 there was a discussion about CONFIG_USER_LOWLEVEL_INIT or so and recently there was a patch proposal from Jean-Christophe to provide a cmd_link_o_target macro that creates a combinend object file instead an archive.
The combined object file was needed because weak linking somehow doesn't work with archive files. Very annoying.
I had large problems with weak linking regarding coloured LED support on my board, too. I came to the conclusion that weak linking across archives are somehow broken. However I was not able to create a small test case to trigger this behavior (bug?) in gcc/bintuils.
Ok, so here my proposal that is generic and allows any library code to get overwritten by board specific functions without defining any weak symbols in the library code. It is based purely on sequence of object files presented to 'ld'.
Please take a look and tell me your opinion.
I have patches to support a new board in my queue but I need any possibility to provide a board specific lowlevel_init. Which solution is selected plays no role to me.
Michael Roth