]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: avoid ARM binutils leaking ELF local symbols
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 26 Jul 2014 21:59:01 +0000 (07:29 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Sun, 27 Jul 2014 11:22:47 +0000 (20:52 +0930)
Symbols starting with .L are ELF local symbols and should not appear
in ELF symbol tables.  However, unfortunately ARM binutils leaks the
.LANCHOR symbols into the symbol table, which leads kallsyms to report
these symbols rather than the real name.  It is not very useful when
%pf reports symbols against these leaked .LANCHOR symbols.

Arrange for kallsyms to ignore these symbols using the same mechanism
that is used for the ARM mapping symbols.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
kernel/module.c

index e87fdd2fc3c2eff7608130874a9ea79ab59287a2..cd9bce918cdf59a15499f3ad96bb78598b2714f1 100644 (file)
@@ -3385,6 +3385,8 @@ static inline int within(unsigned long addr, void *start, unsigned long size)
  */
 static inline int is_arm_mapping_symbol(const char *str)
 {
+       if (str[0] == '.' && str[1] == 'L')
+               return true;
        return str[0] == '$' && strchr("atd", str[1])
               && (str[2] == '\0' || str[2] == '.');
 }