From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@linux-foundation.org
Cc: linux-am33-list@redhat.com, linux-kernel@vger.kernel.org,
David Howells <dhowells@redhat.com>
Subject: [PATCH 1/3] Make it possible for the linker to discard local symbols from vmlinux
Date: Tue, 17 Feb 2009 16:55:53 +0000 [thread overview]
Message-ID: <20090217165552.17657.90940.stgit@warthog.procyon.org.uk> (raw)
Make it possible for the linker to discard local symbols from vmlinux as they
cause vmlinux to balloon when CONFIG_KALLSYMS=y and they cause dump_stack() and
get_wchan() to produce useless information under some circumstances.
With this we add a config option (CONFIG_STRIP_ASM_SYMS) that will cause the
build to supply -X to the linker to tell it to strip temporary local symbols.
This doesn't seem to cause gdb any problems.
Signed-off-by: David Howells <dhowells@redhat.com>
---
Makefile | 4 ++++
init/Kconfig | 8 ++++++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 22d7584..359470f 100644
--- a/Makefile
+++ b/Makefile
@@ -589,6 +589,10 @@ LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
+ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
+LDFLAGS_vmlinux += -X
+endif
+
# Default kernel image to build when no specific target is given.
# KBUILD_IMAGE may be overruled on the command line or
# set in the environment
diff --git a/init/Kconfig b/init/Kconfig
index f068071..50c267a 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -737,6 +737,14 @@ config KALLSYMS_EXTRA_PASS
you wait for kallsyms to be fixed.
+config STRIP_ASM_SYMS
+ bool "Strip assembler-generated symbols during link"
+ default n
+ help
+ Strip internal assembler-generated symbols during a link (symbols
+ that look like '.Lxxx') so they don't pollute the output of
+ get_wchan() and suchlike.
+
config HOTPLUG
bool "Support for hot-pluggable devices" if EMBEDDED
default y
next reply other threads:[~2009-02-17 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-17 16:55 David Howells [this message]
2009-02-17 16:55 ` [PATCH 2/3] MN10300: Fix oprofile David Howells
2009-02-17 16:56 ` [PATCH 3/3] MN10300: Fix typo && -> || in arch/mn10300/unit-asb2305/pci.c 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=20090217165552.17657.90940.stgit@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-am33-list@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®