diff mbox series

[v2] mksysmap: Fix the mismatch of '.L' symbols in System.map

Message ID 1591083917-63371-1-git-send-email-ashimida@linux.alibaba.com (mailing list archive)
State New, archived
Headers show
Series [v2] mksysmap: Fix the mismatch of '.L' symbols in System.map | expand

Commit Message

Dan Li June 2, 2020, 7:45 a.m. UTC
When System.map was generated, the kernel used mksysmap to
filter the kernel symbols, but all the symbols with the
second letter 'L' in the kernel were filtered out, not just
the symbols starting with 'dot + L'.

For example:
ashimida@ubuntu:~/linux$ cat System.map |grep ' .L'
ashimida@ubuntu:~/linux$ nm -n vmlinux |grep ' .L'
ffff0000088028e0 t bLength_show
......
ffff0000092e0408 b PLLP_OUTC_lock
ffff0000092e0410 b PLLP_OUTA_lock

In the original patch[1], the original intent should
be to filter out all local symbols starting with '.L',
so the dot should be escaped.

[1]. mksysmap: Add h8300 local symbol pattern

Signed-off-by: ashimida <ashimida@linux.alibaba.com>
---
 scripts/mksysmap | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Masahiro Yamada June 2, 2020, 2:42 p.m. UTC | #1
On Tue, Jun 2, 2020 at 4:45 PM ashimida <ashimida@linux.alibaba.com> wrote:
>
> When System.map was generated, the kernel used mksysmap to
> filter the kernel symbols, but all the symbols with the
> second letter 'L' in the kernel were filtered out, not just
> the symbols starting with 'dot + L'.
>
> For example:
> ashimida@ubuntu:~/linux$ cat System.map |grep ' .L'
> ashimida@ubuntu:~/linux$ nm -n vmlinux |grep ' .L'
> ffff0000088028e0 t bLength_show
> ......
> ffff0000092e0408 b PLLP_OUTC_lock
> ffff0000092e0410 b PLLP_OUTA_lock
>
> In the original patch[1], the original intent should
> be to filter out all local symbols starting with '.L',
> so the dot should be escaped.
>
> [1]. mksysmap: Add h8300 local symbol pattern
>
> Signed-off-by: ashimida <ashimida@linux.alibaba.com>
> ---

Applied to linux-kbuild. Thanks.
diff mbox series

Patch

diff --git a/scripts/mksysmap b/scripts/mksysmap
index a35acc0..9aa23d1 100755
--- a/scripts/mksysmap
+++ b/scripts/mksysmap
@@ -41,4 +41,4 @@ 
 # so we just ignore them to let readprofile continue to work.
 # (At least sparc64 has __crc_ in the middle).
 
-$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( .L\)' > $2
+$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)' > $2