Skip to content

Commit 2e3a10a

Browse files
Russell Kingrustyrussell
authored andcommitted
ARM: avoid ARM binutils leaking ELF local symbols
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 <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
1 parent a0d8f80 commit 2e3a10a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/module.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3385,6 +3385,8 @@ static inline int within(unsigned long addr, void *start, unsigned long size)
33853385
*/
33863386
static inline int is_arm_mapping_symbol(const char *str)
33873387
{
3388+
if (str[0] == '.' && str[1] == 'L')
3389+
return true;
33883390
return str[0] == '$' && strchr("atd", str[1])
33893391
&& (str[2] == '\0' || str[2] == '.');
33903392
}

0 commit comments

Comments
 (0)