Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Duplication and size of binaries in generated toolchain
Date: Thu, 5 Mar 2009 15:13:59 +0100	[thread overview]
Message-ID: <20090305151359.20b37039@surf> (raw)

Hi,

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

For example, for the 'ar' binutil. The first copy is in :

$ ls -l usr/bin/arm-linux-uclibcgnueabi-ar 
-rwxr-xr-x 2 thomas thomas 2500708 2009-03-05 14:19 usr/bin/arm-linux-uclibcgnueabi-ar
$ md5sum usr/bin/arm-linux-uclibcgnueabi-ar 
82a898a705b8313ff156ee2287552a60  usr/bin/arm-linux-uclibcgnueabi-ar

And the second copy is in :

$ ls -l usr/arm-linux/bin/ar 
-rwxr-xr-x 2 thomas thomas 2500708 2009-03-05 14:19 usr/arm-linux/bin/ar
$ md5sum usr/arm-linux/bin/ar 
82a898a705b8313ff156ee2287552a60  usr/arm-linux/bin/ar

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

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

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

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config
Type: application/octet-stream
Size: 17514 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20090305/b7fd5497/attachment-0001.obj>

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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-05 14:13 Thomas Petazzoni [this message]
2009-03-05 14:22 ` [Buildroot] Duplication and size of binaries in generated toolchain Olaf Rempel
2009-03-05 14:22 ` Peter Korsgaard
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=20090305151359.20b37039@surf \
    --to=thomas.petazzoni@free-electrons.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox