[Buildroot] kernel image size depends on toolchain?

Peter Korsgaard jacmet at uclibc.org
Wed Jun 11 11:09:22 UTC 2008

>>>>> "Andreas" == Andreas Kuehn <Andreas.Kuehn at gin.de> writes:

 Andreas> Here it comes...
 Andreas>                                           old        actual
 Andreas> -------------------------------------------------------------
 Andreas> linux/System.map                          695909      695917
 Andreas> linux/vmlinux                           27876137    27875949
 Andreas> linux/vmlinux.o                         46429585    46507157
 Andreas> linux/arch/arm/boot/Image                2896464  3224138320

So Image is around 3G. There afaik was a problem in arch/arm about
some binutils versions creating huge images because of a new section.
What binutils version are you using (old and new)?

Ahh, this seems to be it:

commit 1e621a8e3752367d4aae78a8ab00a18fb2793f34
Author: Lennert Buytenhek <buytenh at wantstofly.org>
Date:   Fri Oct 12 14:38:54 2007 +0100

    [ARM] 4600/1: fix kernel build failure with build-id-supporting binutils
    Newer versions of binutils support --build-id, which adds an ELF
    note section called ".note.gnu.build-id" to the output.  On the ARM
    kernel build, because there is no explicit mention of this section
    in the shipped ld script, this section is placed at vaddr 0x00000000
    (whereas the normal kernel text/data typically starts at vaddr
    0xc0008000), causing the output of objcopy (Image) to produce a 3G+
    This patch makes objcopy strip the .note.gnu.build-id section from
    the Image file along with all other note sections, which fixes the
    Signed-off-by: Lennert Buytenhek <buytenh at wantstofly.org>
    Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>

Bye, Peter Korsgaard

More information about the buildroot mailing list