login
Header Space

 
 

Re: /proc/kallsyms broken in 2.6.26-rc1-git6

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andi Kleen <andi@...>
Cc: Cyrill Gorcunov <gorcunov@...>, Paulo Marques <pmarques@...>, Alexey Dobriyan <adobriyan@...>, <linux-kernel@...>
Date: Monday, May 19, 2008 - 2:11 pm

On Tue, May 13, 2008 at 11:54:37AM +0200, Andi Kleen wrote:

I have just commit the following that should fix it.

	Sam

commit aab34ac8582303ef57b792710fc5dd5991477475
Author: Sam Ravnborg <sam@ravnborg.org>
Date:   Mon May 19 20:07:58 2008 +0200

    kbuild: filter away debug symbols from kernel symbols
    
    Andi Kleen <andi@firstfloor.org>
    reported that he saw a lot of symbols like this:
    
    0000000000000b24 N DW.aio.h.903a6d92.2
    0000000000000bce N DW.task_io_accounting.h.8d8de327.0
    0000000000000bec N DW.hrtimer.h.c23659c6.0
    
    in his System.map / kallsyms output.
    
    Simple solution is to skip all debugging
    symbols (they are marked 'N').
    
    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
    Cc: Paulo Marques <pmarques@grupopie.com>

diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 5d20a2e..ad2434b 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -108,6 +108,9 @@ static int read_symbol(FILE *in, struct sym_entry *s)
 	/* exclude also MIPS ELF local symbols ($L123 instead of .L123) */
 	else if (str[0] == '$')
 		return -1;
+	/* exclude debugging symbols */
+	else if (stype == 'N')
+		return -1;
 
 	/* include the type field in the symbol name, so that it gets
 	 * compressed together */
diff --git a/scripts/mksysmap b/scripts/mksysmap
index 4390fab..6e133a0 100644
--- a/scripts/mksysmap
+++ b/scripts/mksysmap
@@ -32,6 +32,7 @@
 # For System.map filter away:
 #   a - local absolute symbols
 #   U - undefined global symbols
+#   N - debugging symbols
 #   w - local weak symbols
 
 # readprofile starts reading symbols when _stext is found, and
@@ -40,5 +41,5 @@
 # so we just ignore them to let readprofile continue to work.
 # (At least sparc64 has __crc_ in the middle).
 
-$NM -n $1 | grep -v '\( [aUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2
+$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
/proc/kallsyms broken in 2.6.26-rc1-git6, Andi Kleen, (Fri May 9, 1:41 pm)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Paulo Marques, (Fri May 9, 2:03 pm)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Andi Kleen, (Fri May 9, 3:36 pm)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Paulo Marques, (Fri May 9, 3:59 pm)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Andi Kleen, (Fri May 9, 7:16 pm)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Paulo Marques, (Mon May 12, 5:55 am)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Andi Kleen, (Mon May 12, 6:08 am)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Alexey Dobriyan, (Fri May 9, 7:37 pm)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Paulo Marques, (Mon May 12, 6:00 am)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Cyrill Gorcunov, (Mon May 12, 11:50 am)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Sam Ravnborg, (Mon May 12, 1:23 pm)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Andi Kleen, (Tue May 13, 5:54 am)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Sam Ravnborg, (Mon May 19, 2:11 pm)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Cyrill Gorcunov, (Mon May 19, 2:15 pm)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Sam Ravnborg, (Mon May 19, 2:21 pm)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Cyrill Gorcunov, (Mon May 19, 2:22 pm)
Re: /proc/kallsyms broken in 2.6.26-rc1-git6, Cyrill Gorcunov, (Mon May 12, 1:28 pm)
speck-geostationary