[U-Boot-Users] Can't get strong symbol to override weak one
Haavard Skinnemoen
haavard.skinnemoen at atmel.com
Fri Jun 13 10:44:06 CEST 2008
"Ben Warren" <biggerbadderben at gmail.com> wrote:
> I propose to wrap both the 'board/$(BOARDDIR)/lib$(BOARD).a' and
> 'cpu/$(CPU)/lib$(CPU).a' arguments to ld in
> --whole-module/--no-whole-module in order to accomplish this goal. We
> definitely don't want to do this across the board because image size
> will increase quite a bit due to unused code.
You can counter that additional size and more by adding --gc-sections to
the linker command line and -ffunction-sections -fdata-sections to gcc.
That will probably even get rid of the weak implementation if a strong
definition is provided.
There's a catch though -- if your linker script isn't prepared for
this, things will break.
Haavard
More information about the U-Boot
mailing list