Re: Confusion about build cycle and vmlinux/bzImage (need uncompressed ELF image of built kernel)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Apr 12, 2007 at 10:10:28PM -0400, John Anthony Kazos Jr. wrote:
> I did a few simple independent tests between 'char *foo = "foo"' and 'char 
> foo[] = "foo"' and they confirmed what the KJ docs say, that the latter 
> results in a smaller object. So I did a test with <fs/partitions/check.c>.
> 
> static char *make_block_name(struct gendisk *disk)
> {
> -	static char *block_str = "block:";
> +	static char block_str[] = "block:";
> 
> <fs/partitions/check.o> goes from 8149 bytes to 8137 bytes. 'readelf' 
> shows that "block:" got moved from .rodata.str1.1 to .data and a 
> relocation token got removed that pointed into .rodata.str1.1, saving 12 
> bytes.
> 
> <fs/built-in.o> goes from 1337360 to 1337320, saving 40 bytes.
> 
> <vmlinux>, however, stays exactly the same, at 4520468 bytes. And 
> <arch/i386/boot/bzImage> actually increases from 1702520 to 1072552, 
> losing 32 bytes.

The linker script aligns most sections at page boundaries (i.e.: 4k).
If you save 40 bytes in one of the objects, the chance that you shrink
the particular section over a 4k boundary is pretty slim.


Erik

- -- 
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGH0mZ/PlVHJtIto0RAltpAKCDSKea1gmjwlKD0+6RrMTjQxCgAgCfQQOC
P/sZFzJbbnczwliJObptjDE=
=tCAs
-----END PGP SIGNATURE-----

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux