Re: [Linux-kernel-mentees] [PATCH] checkpatch: add warning for avoiding .L prefix symbols in assembly files
From: Joe Perches <joe@perches.com>
Date: 2021-01-20 10:25:05
Also in:
lkml
From: Joe Perches <joe@perches.com>
Date: 2021-01-20 10:25:05
Also in:
lkml
On Wed, 2021-01-20 at 12:55 +0530, Aditya Srivastava wrote:
Local symbols prefixed with '.L' do not emit symbol table entries, as they have special meaning for the assembler. '.L' prefixed symbols can be used within a code region, but should be avoided for denoting a range of code via 'SYM_*_START/END' annotations. Add a new check to emit a warning on finding the usage of '.L' symbols in '.S' files, if it lies within SYM_*_START/END annotation pair.
I believe this needs a test for $file as it won't work well on patches as the SYM_*_START/END may not be in the patch context. Also, is this supposed to work for local labels like '.L<foo>:'? I don't think a warning should be generated for those. _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees