From 5d7d18f5bc507b60d3d8967e2739d5e6ffdd630f Mon Sep 17 00:00:00 2001 From: David Howells Date: Wed, 4 Mar 2009 11:59:07 -0800 Subject: kbuild: make it possible for the linker to discard local symbols from vmlinux 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 Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3e95d454285..ad830bd45a4 100644 --- a/Makefile +++ b/Makefile @@ -597,6 +597,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 -- cgit v1.2.3