Skip to content

Commit

Permalink
ARM: avoid ARM binutils leaking ELF local symbols
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King authored and Rusty Russell committed Jul 27, 2014
1 parent a0d8f80 commit 2e3a10a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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] == '.');
}
Expand Down

0 comments on commit 2e3a10a

Please sign in to comment.