Re: [U-Boot] [PATCH v2 1/2] arm920t/at91/reset.c: fix weak reset_board()

2010-11-04 Thread Sebastien Carlier
On Thu, Nov 4, 2010 at 11:54 AM, Andreas Bießmann wrote: > > --->8--- > __LIBS := $(subst $(obj),,$(LIBBOARD)) $(subst $(obj),,$(LIBS)) > ---8<--- Still, why would the linker pull definitions from libboard.a? Library archive are only searched by the linker to resolved undefined definitions. Wea

Re: [U-Boot] [PATCH v2 1/2] arm920t/at91/reset.c: fix weak reset_board()

2010-11-04 Thread Andreas Bießmann
Dear Sebastien Carlier, Am 04.11.2010 04:27, schrieb Sebastien Carlier: > These weakly defined empty functions prevent the strong definition > from being linked in. > > For example, libarm.a contains a weak symbol 'red_LED_on', which is > expected to be defined (strongly) in the board library. Be

Re: [U-Boot] [PATCH v2 1/2] arm920t/at91/reset.c: fix weak reset_board()

2010-11-04 Thread Andreas Bießmann
Dear all, Am 04.11.2010 02:23, schrieb Joakim Tjernlund: > Graeme Russ wrote on 2010/11/04 02:13:44: >> >> On Thu, Nov 4, 2010 at 12:00 PM, Joakim Tjernlund >> wrote: >>> The arm920t compiler/linker dif not handle weak functions correctely. Therefore the linker tried to link outsi

Re: [U-Boot] [PATCH v2 1/2] arm920t/at91/reset.c: fix weak reset_board()

2010-11-03 Thread Sebastien Carlier
These weakly defined empty functions prevent the strong definition from being linked in. For example, libarm.a contains a weak symbol 'red_LED_on', which is expected to be defined (strongly) in the board library. Because archive libraries are being used, this fails (testing with binutils 2.20.1),

Re: [U-Boot] [PATCH v2 1/2] arm920t/at91/reset.c: fix weak reset_board()

2010-11-03 Thread Joakim Tjernlund
Graeme Russ wrote on 2010/11/04 02:13:44: > > On Thu, Nov 4, 2010 at 12:00 PM, Joakim Tjernlund > wrote: > > > >> > >> The arm920t compiler/linker dif not handle weak functions correctely. > >> Therefore the linker tried to link outside the ELF (isn't that lazy > >> linking?). This leads to segfa

Re: [U-Boot] [PATCH v2 1/2] arm920t/at91/reset.c: fix weak reset_board()

2010-11-03 Thread Graeme Russ
On Thu, Nov 4, 2010 at 12:00 PM, Joakim Tjernlund wrote: > >> >> The arm920t compiler/linker dif not handle weak functions correctely. >> Therefore the linker tried to link outside the ELF (isn't that lazy >> linking?). This leads to segfault of linker in the end. >> >> This patch adds a empty stu

Re: [U-Boot] [PATCH v2 1/2] arm920t/at91/reset.c: fix weak reset_board()

2010-11-03 Thread Joakim Tjernlund
> > The arm920t compiler/linker dif not handle weak functions correctely. > Therefore the linker tried to link outside the ELF (isn't that lazy > linking?). This leads to segfault of linker in the end. > > This patch adds a empty stub for weak function reset_board() to catch > that case. I believ

[U-Boot] [PATCH v2 1/2] arm920t/at91/reset.c: fix weak reset_board()

2010-11-03 Thread Andreas Bießmann
The arm920t compiler/linker dif not handle weak functions correctely. Therefore the linker tried to link outside the ELF (isn't that lazy linking?). This leads to segfault of linker in the end. This patch adds a empty stub for weak function reset_board() to catch that case. Signed-off-by: Andreas