Hi Tom, On Tue, Aug 7, 2012 at 12:52 AM, Tom Rini <tr...@ti.com> wrote:
> > By comparing of two images I've found that the difference comes from > > ro-strings (two help strings in U_BOOT_CMD, string in printf, "sw" & > "hw"). > > It looks like the linker doesn't collect ro-strings referenced from > > collected functions... Probably that's a bug but I'm not sure... > > Yes. What I meant was that not all of the stuff that is guarded today > is garbage collected so the resulting image is larger than it must be. > Yep. And that's actually goes beyond the subject of this patch: as long as we rely on linker GC and not putting guards by hands we will get unused string literals compiled in. I still think that this patch does the correct things (UNDEF_SYM is there to protect commands from GC and we don't really want commands in SPL so there is nothing to protect). But I will try to add guards to make net-spl compile even without this patch. > And yes, this is a toolchain issue of sorts (not being aggressive enough > in collecting unreferenced data). > Looks like it can be fixed by forcing the compiler to emit symbols for string literals... But I'm not really compiler guy... Regards, Ilya.
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot