From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 6 Aug 2012 08:30:56 -0700 Subject: [U-Boot] [PATCH v4 2/5] spl: don't mark __u_boot_cmd* as undefined In-Reply-To: References: <1344201713-10291-1-git-send-email-ilya.yanok@cogentembedded.com> <1344201713-10291-3-git-send-email-ilya.yanok@cogentembedded.com> Message-ID: <501FE330.4090603@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 08/06/2012 08:10 AM, Ilya Yanok wrote: > Hi Tom, > > On Mon, Aug 6, 2012 at 2:36 AM, Tom Rini > wrote: > > On Sun, Aug 5, 2012 at 2:21 PM, Ilya Yanok > > 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