[U-Boot-Users] Can't get strong symbol to override weak one
Wolfgang Denk
wd at denx.de
Sat Jun 14 23:37:20 CEST 2008
In message <20080613104406.3116ac16 at hskinnemo-gx745.norway.atmel.com> you wrote:
> "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.
... and it probably doesn't work with older toolchains either.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Every solution breeds new problems.
More information about the U-Boot
mailing list