[U-Boot] [PATCH v4 2/5] spl: don't mark __u_boot_cmd* as undefined
Tom Rini
trini at ti.com
Mon Aug 6 17:30:56 CEST 2012
On 08/06/2012 08:10 AM, Ilya Yanok wrote:
> Hi Tom,
>
> On Mon, Aug 6, 2012 at 2:36 AM, Tom Rini <trini at ti.com
> <mailto:trini at ti.com>> wrote:
>
> On Sun, Aug 5, 2012 at 2:21 PM, Ilya Yanok
> <ilya.yanok at cogentembedded.com
> <mailto:ilya.yanok at cogentembedded.com>> wrote:
> > __u_boot_cmd* symbols are not used in SPL so there is no need
> > to tell the linker that they are undefined. With these symbols
> > marked as undefined linker fails to garbage collect some unused
> > functions and even fails to build the resulting image.
>
> I don't like this because it causes SPL to bloat when the commands
> aren't also removed from the build. But I assume a number of commands
>
>
> Nah. As far as I understand it, UNDEF_SYM stuff is there to protect
> commands from being purged by linker garbage collector. This is needed
> for main U-Boot as commands are referenced inderectly.
> I seems to me that this stuff was just copy-pasted into SPL Makefile. As
> far as we don't need commands in SPL we don't care about them being
> garbage collected (well, actually we want them to be collected). So it
> has nothing to do about bloating, actually SPL image is smaller with
> this patch applied.
What toolchain are you using? In my tests they have not been collected.
--
Tom
More information about the U-Boot
mailing list