[U-Boot] [PATCH v2 14/56] armv8: remove unused low-level modules from TPL
Tom Rini
trini at konsulko.com
Wed Jul 26 19:53:28 UTC 2017
On Wed, Jul 26, 2017 at 12:40:18PM +0200, Philipp Tomsich wrote:
> TPL builds today don't need to call into firmware or set up the MMU
> (if this changes, it should be controlled through a config option
> whether to include this or not), but include the needed support code
> for this anyway.
>
> Even for a feature-rich TPL (including DM support as for the RK3368),
> this equates to a size difference of approx. 10% in TPL binary size:
> - without this change:
> text data bss dec hex filename
> 23635 3112 24 26771 6893 tpl/u-boot-tpl
> - with this change:
> text data bss dec hex filename
> 21583 3112 24 24719 608f tpl/u-boot-tpl
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
> ---
>
> Changes in v2: None
>
> arch/arm/cpu/armv8/Makefile | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile
> index c447085..e831471 100644
> --- a/arch/arm/cpu/armv8/Makefile
> +++ b/arch/arm/cpu/armv8/Makefile
> @@ -9,12 +9,14 @@ extra-y := start.o
>
> obj-y += cpu.o
> obj-y += generic_timer.o
> +ifndef CONFIG_TPL_BUILD
> obj-y += cache_v8.o
> -obj-y += exceptions.o
> obj-y += cache.o
> obj-y += tlb.o
> obj-y += transition.o
> obj-y += fwcall.o
> +endif
> +obj-y += exceptions.o
> obj-y += cpu-dt.o
> obj-$(CONFIG_ARM_SMCCC) += smccc-call.o
We're talking about various asm files above, yes? Have you looked at
manually adding the section information to these files so they can be
gc'd in all cases? If it's too complex (for example, some macro-heavy
asm files we borrow from Linux are just too hard to make it work in),
then the above is fine. Otherwise I'd like to see section naming so
they can be gc'd with the normal flags here. Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170726/d8b487ff/attachment.sig>
More information about the U-Boot
mailing list