[U-Boot] [PATCH v4 2/5] spl: don't mark __u_boot_cmd* as undefined

Ilya Yanok ilya.yanok at cogentembedded.com
Mon Aug 6 17:10:11 CEST 2012


Hi Tom,

On Mon, Aug 6, 2012 at 2:36 AM, Tom Rini <trini at ti.com> wrote:

> On Sun, Aug 5, 2012 at 2:21 PM, Ilya Yanok
> <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.

were being pulled in as part of the networking stack?
>

Not really, only some functions.

Regards, Ilya.


More information about the U-Boot mailing list