Re: tinyconfig x86-32 vmlinux sizes by gcc compiler version

From: Joe Perches
Date: Thu Dec 04 2014 - 17:43:55 EST


On Thu, 2014-12-04 at 14:25 -0800, josh@xxxxxxxxxxxxxxxx wrote:
> On Thu, Dec 04, 2014 at 01:32:59PM -0800, Joe Perches wrote:
> > Just fyi.
> >
> > At least for x86-32, it seems later versions of gcc
> > are producing smaller images.
> >
> > $ size vmlinux.*
> > text data bss dec hex filename
> > 657725 118496 1189040 1965261 1dfccd vmlinux.4.4
> > 633563 118528 1189448 1941539 1da023 vmlinux.4.6
> > 633277 118496 1189592 1941365 1d9f75 vmlinux.4.7
> > 632299 121120 1192784 1946203 1db25b vmlinux.4.9
>
> I would certainly hope that GCC's -Os gets better over time. However, I
> find the increase in data/bss and thus overall size in 4.9 concerning.
> Any idea what that comes from?

No.

It's all over the place.

For instance:

$ objdump -t vmlinux.4.7 | awk '{if (NF>=2) {print $(NF) "\t" $(NF-1)}}' | sort > 4.7
$ objdump -t vmlinux.4.9 | awk '{if (NF>=2) {print $(NF) "\t" $(NF-1)}}' | sort > 4.9

$ diff -u0 -rN 4.7 4.9 | wc -l
6944

$ diff -u0 -rN 4.7 4.9 | head -20
--- 4.7 2014-12-04 14:34:41.455533301 -0800
+++ 4.9 2014-12-04 14:34:16.703531656 -0800
@@ -5 +5 @@
-access_process_vm 00000040
+access_process_vm 0000003e
@@ -9,3 +9,2 @@
-account_event_cpu.isra.57 0000001f
-account_event.part.60 00000065
-account_group_user_time 0000001f
+account_event_cpu.isra.56 0000001f
+account_event.part.61 00000069
@@ -14,2 +13 @@
-account_kernel_stack 00000029
-account_page_dirtied 00000052
+account_page_dirtied 0000005f
@@ -20,2 +18,2 @@
-account_system_time 000000e3
-account_user_time 00000047
+account_system_time 0000010d
+account_user_time 0000005d



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/