From: David Howells <dhowells@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: David Howells <dhowells@redhat.com>,
torvalds@osdl.org, akpm@osdl.org, benh@kernel.crashing.org,
linux-kernel@vger.kernel.org, uclinux-dev@uclinux.org
Subject: Re: [PATCH 2/3] FRV: Permit __do_IRQ() to be dispensed with
Date: Mon, 11 Sep 2006 10:47:02 +0100 [thread overview]
Message-ID: <7359.1157968022@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <20060909051211.GA6922@elte.hu>
Ingo Molnar <mingo@elte.hu> wrote:
> The real solution would be to use gcc -ffunction-sections plus ld
> --gc-sections to automatically get rid of unused global functions, at
> link time.
It's easy. It's already possible with FRV. Just add the attached patch and
enable the new option. However, you also need to compile without debugging
code, otherwise it has little effect. I think stabs links bring stuff in or
something.
David
---
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index 5e6583a..0dc3730 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -342,6 +342,14 @@ menu "Power management options"
source kernel/power/Kconfig
endmenu
+config GC_SECTIONS
+ bool "Garbage collect unused functions and data"
+ default y
+ help
+ Tell the compiler to place all functions and variables in their own
+ sections and then tell the linker to discard any section that aren't
+ referred to.
+
endmenu
next prev parent reply other threads:[~2006-09-11 9:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-08 15:32 [PATCH 1/3] FRV: Improve FRV's use of generic IRQ handling David Howells
2006-09-08 15:32 ` [PATCH 2/3] FRV: Permit __do_IRQ() to be dispensed with David Howells
2006-09-09 5:12 ` Ingo Molnar
2006-09-09 7:26 ` Benjamin Herrenschmidt
2006-09-21 13:12 ` David Howells
2006-09-21 21:59 ` Benjamin Herrenschmidt
2006-09-10 14:34 ` Daniel Walker
2006-09-11 5:33 ` Ingo Molnar
2006-09-11 9:47 ` David Howells [this message]
2006-09-11 15:33 ` Daniel Walker
2006-09-08 15:32 ` [PATCH 3/3] FRV: Mark __do_IRQ() deprecated David Howells
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=7359.1157968022@warthog.cambridge.redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@osdl.org \
--cc=uclinux-dev@uclinux.org \
/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