All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: linux-tiny@selenic.com
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Reynes Philippe <tremyfr@yahoo.fr>,
	hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@elte.hu,
	tglx@linutronix.de
Subject: Re: [PATCH] Configure out DMI scanning code v2 (Linux Tiny)
Date: Tue, 1 Apr 2008 15:09:28 -0500	[thread overview]
Message-ID: <200804011509.28842.rob@landley.net> (raw)
In-Reply-To: <20080401120036.2254d7eb.akpm@linux-foundation.org>

On Tuesday 01 April 2008 14:00:36 Andrew Morton wrote:
>    text    data     bss     dec     hex filename
> 1614279  210524  159992 1984795  1e491b vmlinux
>
> but when I remove the ifdefs around the tables and rely on the compiler
> removing the code and data I get
>
>    text    data     bss     dec     hex filename
> 1614447  210972  159992 1985411  1e4b83 vmlinux
>
> An additional 616 bytes of useless stuff.
>
> Ingo, I think there was some trick to making this work right.  Do you
> recall?

Does bloat-o-meter say what the additional 616 bytes _is_?

scripts/bloat-o-meter vmlinux.old vmlinux.new

P.S.  What busybox did:

    ifneq ($(strip $(CONFIG_DEBUG)),y)
        OPTIMIZATION+=$(call check_cc,
$(CC),-ffunction-sections -fdata-sections,)
        CHECKED_LDFLAGS += $(call check_ld,$(LD),--gc-sections,)
    endif

Tells gcc to put each function and each global into its own ELF section, and 
then told the linker to garbage collect unused sections...

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.

      reply	other threads:[~2008-04-01 20:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-12  9:04 [PATCH] Configure out DMI scanning code v2 (Linux Tiny) Thomas Petazzoni
2008-02-12 18:56 ` Matt Mackall
2008-02-12 20:08   ` Andrew Morton
2008-02-17 17:59     ` Ingo Molnar
2008-04-01 19:00 ` Andrew Morton
2008-04-01 20:09   ` Rob Landley [this message]

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=200804011509.28842.rob@landley.net \
    --to=rob@landley.net \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tiny@selenic.com \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=tremyfr@yahoo.fr \
    /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.