All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] Duplication and size of binaries in generated toolchain
Date: Thu, 05 Mar 2009 15:22:52 +0100	[thread overview]
Message-ID: <878wnkf3r7.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <20090305151359.20b37039@surf> (Thomas Petazzoni's message of "Thu\, 5 Mar 2009 15\:13\:59 +0100")

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 Thomas> After compiling a toolchain with Buildroot (no packages, no
 Thomas> kernel, see attached configuration file), I end up with
 Thomas> duplicated binaries in the STAGING_DIR.

 Thomas> Same story for as, c++, g++, gcc, ld, nm, objcopy, objdump, ranlib,
 Thomas> strip. In total, it's 24 MB of binaries that are duplicated.

 Thomas> I'm not sure why the binaries without the arm-linux prefix are needed
 Thomas> in usr/arm-linux/bin. But if they are, couldn't they be symbolic links.

They are hard links to the same file:

find -type f -name \*ar|xargs stat
  File: `./usr/bin/powerpc-linux-uclibc-ar'
  Size: 3675834         Blocks: 7192       IO Block: 4096   regular file
Device: fe00h/65024d    Inode: 3638102     Links: 2
Access: (0755/-rwxr-xr-x)  Uid: ( 1000/    peko)   Gid: ( 1000/    peko)
Access: 2009-03-05 13:39:31.000000000 +0100
Modify: 2009-03-05 13:39:31.000000000 +0100
Change: 2009-03-05 13:39:32.000000000 +0100
  File: `./usr/powerpc-linux-uclibc/bin/ar'
  Size: 3675834         Blocks: 7192       IO Block: 4096   regular file
Device: fe00h/65024d    Inode: 3638102     Links: 2
Access: (0755/-rwxr-xr-x)  Uid: ( 1000/    peko)   Gid: ( 1000/    peko)
Access: 2009-03-05 13:39:31.000000000 +0100
Modify: 2009-03-05 13:39:31.000000000 +0100
Change: 2009-03-05 13:39:32.000000000 +0100

 Thomas> Last question: why are the individual binutils so big ? For example,
 Thomas> the strip program is 2.9 MB, ar is 2.4 MB. This looks ridiculously big
 Thomas> for such simple tools. First of all, they are not stripped and they
 Thomas> include debugging symbols, is it really necessary ? Even after
 Thomas> stripping, strip itself is still ~650 KB. Is it because of the static
 Thomas> linking against libbfd ?

I don't actually know. Bernhard?

-- 
Bye, Peter Korsgaard

  parent reply	other threads:[~2009-03-05 14:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-05 14:13 [Buildroot] Duplication and size of binaries in generated toolchain Thomas Petazzoni
2009-03-05 14:22 ` Olaf Rempel
2009-03-05 14:22 ` Peter Korsgaard [this message]
2009-03-05 14:47   ` Thomas Petazzoni
2009-03-05 14:56     ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878wnkf3r7.fsf@macbook.be.48ers.dk \
    --to=jacmet@uclibc.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.