* [PATCH 0/4] scripts: update namespace.pl
@ 2019-10-03 3:13 rd.dunlab
2019-10-03 3:13 ` [PATCH 1/4] scripts: namespace.pl: handle lib-ksyms.o as lib.a rd.dunlab
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: rd.dunlab @ 2019-10-03 3:13 UTC (permalink / raw)
To: linux-kbuild; +Cc: rdunlap, Masahiro Yamada
This patch series updates scripts/namespace.pl:
1/4: handle rename of lib-ksyms.o to lib.a by scripts/Makefile.build
2/4: add a few x86 object files to the namespace exceptions list
3/4: include trailing ".o" in the namespace exceptions list of
file names and change/fix "acpia" to "acpica"
4/4: add a blank line to separate a section of the output
scripts/namespace.pl | 48 +++++++++++++++++++++++------------------
1 file changed, 27 insertions(+), 21 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/4] scripts: namespace.pl: handle lib-ksyms.o as lib.a 2019-10-03 3:13 [PATCH 0/4] scripts: update namespace.pl rd.dunlab @ 2019-10-03 3:13 ` rd.dunlab 2019-10-23 5:22 ` Masahiro Yamada 2019-10-03 3:13 ` [PATCH 2/4] scripts: namespace.pl: add some x86 object files to nmexception rd.dunlab ` (2 subsequent siblings) 3 siblings, 1 reply; 8+ messages in thread From: rd.dunlab @ 2019-10-03 3:13 UTC (permalink / raw) To: linux-kbuild; +Cc: Randy Dunlap, Masahiro Yamada, rdunlap [-- Attachment #1: scr-namespace-check-fix002.patch --] [-- Type: text/plain, Size: 951 bytes --] Fix these warnings: No source file found for drivers/firmware/efi/libstub/lib-ksyms.o No source file found for arch/x86/lib/lib-ksyms.o No source file found for lib/lib-ksyms.o In scripts/Makefile.build, any resulting lib-ksyms.o file is renamed to lib.a, so handle that rename here also. Signed-off-by: Randy Dunlap <rd.dunlab@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Randy Dunlap <rdunlap@infradead.org> --- patch 1/4: scripts/namespace.pl | 3 +++ 1 file changed, 3 insertions(+) --- linux-next-20191002.orig/scripts/namespace.pl +++ linux-next-20191002/scripts/namespace.pl @@ -231,6 +231,9 @@ sub do_nm return; } ($source = $basename) =~ s/\.o$//; + if ($basename eq "lib-ksyms.o") { # modified in scripts/Makefile.build + $basename = "lib.a"; # from lib.a to lib-ksyms.o + } if (-e "$source.c" || -e "$source.S") { $source = File::Spec->catfile($objtree, $File::Find::dir, $source) } else { ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/4] scripts: namespace.pl: handle lib-ksyms.o as lib.a 2019-10-03 3:13 ` [PATCH 1/4] scripts: namespace.pl: handle lib-ksyms.o as lib.a rd.dunlab @ 2019-10-23 5:22 ` Masahiro Yamada 0 siblings, 0 replies; 8+ messages in thread From: Masahiro Yamada @ 2019-10-23 5:22 UTC (permalink / raw) To: rd.dunlab; +Cc: Linux Kbuild mailing list, Randy Dunlap Randy, On Thu, Oct 3, 2019 at 12:18 PM <rd.dunlab@gmail.com> wrote: > In scripts/Makefile.build, any resulting lib-ksyms.o file is renamed to > lib.a, so handle that rename here also. This description is incorrect. lib-ksyms.o is included in built-in.a The code attempts to suppress the warnings in a strange way. I think the following is a more straightforward way. diff --git a/scripts/namespace.pl b/scripts/namespace.pl index 4a545ba868f8..f0c94333a23d 100755 --- a/scripts/namespace.pl +++ b/scripts/namespace.pl @@ -166,6 +166,7 @@ sub linux_objects if (/.*\.o$/ && ! ( m:/built-in.a$: + || m:/lib-ksyms.o$: || m:arch/x86/vdso/: || m:arch/x86/boot/: || m:arch/ia64/ia32/ia32.o$: -- Best Regards Masahiro Yamada ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/4] scripts: namespace.pl: add some x86 object files to nmexception 2019-10-03 3:13 [PATCH 0/4] scripts: update namespace.pl rd.dunlab 2019-10-03 3:13 ` [PATCH 1/4] scripts: namespace.pl: handle lib-ksyms.o as lib.a rd.dunlab @ 2019-10-03 3:13 ` rd.dunlab 2019-10-23 5:33 ` Masahiro Yamada 2019-10-03 3:13 ` [PATCH 3/4] scripts: namespace.pl: add .o to nmexception file names and fix "acpica" rd.dunlab 2019-10-03 3:13 ` [PATCH 4/4] scripts: namespace.pl: add blank section separator line rd.dunlab 3 siblings, 1 reply; 8+ messages in thread From: rd.dunlab @ 2019-10-03 3:13 UTC (permalink / raw) To: linux-kbuild; +Cc: Randy Dunlap, Masahiro Yamada, rdunlap [-- Attachment #1: scr-namespace-x86-excepts.patch --] [-- Type: text/plain, Size: 787 bytes --] These x86 object files do not have any exports or public symbols so they can be excluded from the namespace checking. Signed-off-by: Randy Dunlap <rd.dunlab@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Randy Dunlap <rdunlap@infradead.org> --- patch 2/4: scripts/namespace.pl | 2 ++ 1 file changed, 2 insertions(+) --- linux-next-20191002.orig/scripts/namespace.pl +++ linux-next-20191002/scripts/namespace.pl @@ -91,6 +91,8 @@ my %nmexception = ( 'arch/x86/lib/thunk_32' => 1, 'arch/x86/lib/cmpxchg' => 1, 'arch/x86/vdso/vdso32/note' => 1, + 'arch/x86/entry/vdso/vdso-note.o' => 1, + 'arch/x86/entry/vdso/vdso32/note.o' => 1, 'lib/irq_regs' => 1, 'usr/initramfs_data' => 1, 'drivers/scsi/aic94xx/aic94xx_dump' => 1, ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/4] scripts: namespace.pl: add some x86 object files to nmexception 2019-10-03 3:13 ` [PATCH 2/4] scripts: namespace.pl: add some x86 object files to nmexception rd.dunlab @ 2019-10-23 5:33 ` Masahiro Yamada 0 siblings, 0 replies; 8+ messages in thread From: Masahiro Yamada @ 2019-10-23 5:33 UTC (permalink / raw) To: rd.dunlab; +Cc: Linux Kbuild mailing list, Randy Dunlap On Thu, Oct 3, 2019 at 12:18 PM <rd.dunlab@gmail.com> wrote: You can grow %nmexception until you no longer see "No nm data for ..." messages, but is this maintainable? I think it is more realistic to delete the printf "No nm data for $fullname\n" line. -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/4] scripts: namespace.pl: add .o to nmexception file names and fix "acpica" 2019-10-03 3:13 [PATCH 0/4] scripts: update namespace.pl rd.dunlab 2019-10-03 3:13 ` [PATCH 1/4] scripts: namespace.pl: handle lib-ksyms.o as lib.a rd.dunlab 2019-10-03 3:13 ` [PATCH 2/4] scripts: namespace.pl: add some x86 object files to nmexception rd.dunlab @ 2019-10-03 3:13 ` rd.dunlab 2019-10-23 5:34 ` Masahiro Yamada 2019-10-03 3:13 ` [PATCH 4/4] scripts: namespace.pl: add blank section separator line rd.dunlab 3 siblings, 1 reply; 8+ messages in thread From: rd.dunlab @ 2019-10-03 3:13 UTC (permalink / raw) To: linux-kbuild; +Cc: Randy Dunlap, Masahiro Yamada, rdunlap [-- Attachment #1: scr-namespace-fix-excepts.patch --] [-- Type: text/plain, Size: 2514 bytes --] 'nm' exceptions are checked against $fullname, which includes the trailing '.o', so the list of file names should include the trailing '.o'. Also, the sub-directory for drivers/acpi/acpica/ has a typo, so s/acpia/acpica/g. The acpica list of exceptions almost surely needs to be updated. Signed-off-by: Randy Dunlap <rd.dunlab@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Randy Dunlap <rdunlap@infradead.org> --- patch 3/4: scripts/namespace.pl | 42 ++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) --- linux-next-20191002.orig/scripts/namespace.pl +++ linux-next-20191002/scripts/namespace.pl @@ -86,29 +86,29 @@ my %ref = (); # $ref{$name} exists if t my %export = (); # $export{$name} exists if there is an EXPORT_... of $name my %nmexception = ( - 'fs/ext3/bitmap' => 1, - 'fs/ext4/bitmap' => 1, - 'arch/x86/lib/thunk_32' => 1, - 'arch/x86/lib/cmpxchg' => 1, - 'arch/x86/vdso/vdso32/note' => 1, + 'fs/ext3/bitmap.o' => 1, + 'fs/ext4/bitmap.o' => 1, + 'arch/x86/lib/thunk_32.o' => 1, + 'arch/x86/lib/cmpxchg.o' => 1, + 'arch/x86/vdso/vdso32/note.o' => 1, 'arch/x86/entry/vdso/vdso-note.o' => 1, 'arch/x86/entry/vdso/vdso32/note.o' => 1, - 'lib/irq_regs' => 1, - 'usr/initramfs_data' => 1, - 'drivers/scsi/aic94xx/aic94xx_dump' => 1, - 'drivers/scsi/libsas/sas_dump' => 1, - 'lib/dec_and_lock' => 1, - 'drivers/ide/ide-probe-mini' => 1, - 'usr/initramfs_data' => 1, - 'drivers/acpi/acpia/exdump' => 1, - 'drivers/acpi/acpia/rsdump' => 1, - 'drivers/acpi/acpia/nsdumpdv' => 1, - 'drivers/acpi/acpia/nsdump' => 1, - 'arch/ia64/sn/kernel/sn2/io' => 1, - 'arch/ia64/kernel/gate-data' => 1, - 'security/capability' => 1, - 'fs/ntfs/sysctl' => 1, - 'fs/jfs/jfs_debug' => 1, + 'lib/irq_regs.o' => 1, + 'usr/initramfs_data.o' => 1, + 'drivers/scsi/aic94xx/aic94xx_dump.o' => 1, + 'drivers/scsi/libsas/sas_dump.o' => 1, + 'lib/dec_and_lock.o' => 1, + 'drivers/ide/ide-probe-mini.o' => 1, + 'usr/initramfs_data.o' => 1, + 'drivers/acpi/acpica/exdump.o' => 1, + 'drivers/acpi/acpica/rsdump.o' => 1, + 'drivers/acpi/acpica/nsdumpdv.o' => 1, + 'drivers/acpi/acpica/nsdump.o' => 1, + 'arch/ia64/sn/kernel/sn2/io.o' => 1, + 'arch/ia64/kernel/gate-data.o' => 1, + 'security/capability.o' => 1, + 'fs/ntfs/sysctl.o' => 1, + 'fs/jfs/jfs_debug.o' => 1, ); my %nameexception = ( ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/4] scripts: namespace.pl: add .o to nmexception file names and fix "acpica" 2019-10-03 3:13 ` [PATCH 3/4] scripts: namespace.pl: add .o to nmexception file names and fix "acpica" rd.dunlab @ 2019-10-23 5:34 ` Masahiro Yamada 0 siblings, 0 replies; 8+ messages in thread From: Masahiro Yamada @ 2019-10-23 5:34 UTC (permalink / raw) To: rd.dunlab; +Cc: Linux Kbuild mailing list, Randy Dunlap On Thu, Oct 3, 2019 at 12:18 PM <rd.dunlab@gmail.com> wrote: The same comment as 2/4. I doubt if %nmexception is maintainable. For example, you are fixing fs/ext3/bitmap to fs/ext3/bitmap.o but I do not see the directory fs/ext3/. How many entries in the %nmexception are still valid? -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 4/4] scripts: namespace.pl: add blank section separator line 2019-10-03 3:13 [PATCH 0/4] scripts: update namespace.pl rd.dunlab ` (2 preceding siblings ...) 2019-10-03 3:13 ` [PATCH 3/4] scripts: namespace.pl: add .o to nmexception file names and fix "acpica" rd.dunlab @ 2019-10-03 3:13 ` rd.dunlab 3 siblings, 0 replies; 8+ messages in thread From: rd.dunlab @ 2019-10-03 3:13 UTC (permalink / raw) To: linux-kbuild; +Cc: Randy Dunlap, Masahiro Yamada, rdunlap [-- Attachment #1: scr-namespace-blank-sep-line.patch --] [-- Type: text/plain, Size: 706 bytes --] Most namespace report sections are separated by blank lines, but a blank line is needed before the "multiply defined" output as a separator, to make it easier to find the beginning of this section of output. Signed-off-by: Randy Dunlap <rd.dunlab@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Randy Dunlap <rdunlap@infradead.org> --- patch 4/4: scripts/namespace.pl | 1 + 1 file changed, 1 insertion(+) --- linux-next-20191002.orig/scripts/namespace.pl +++ linux-next-20191002/scripts/namespace.pl @@ -368,6 +368,7 @@ sub drop_def sub list_multiply_defined { + printf "\n"; foreach my $name (keys(%def)) { if ($#{$def{$name}} > 0) { # Special case for cond_syscall ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-10-23 5:35 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-10-03 3:13 [PATCH 0/4] scripts: update namespace.pl rd.dunlab 2019-10-03 3:13 ` [PATCH 1/4] scripts: namespace.pl: handle lib-ksyms.o as lib.a rd.dunlab 2019-10-23 5:22 ` Masahiro Yamada 2019-10-03 3:13 ` [PATCH 2/4] scripts: namespace.pl: add some x86 object files to nmexception rd.dunlab 2019-10-23 5:33 ` Masahiro Yamada 2019-10-03 3:13 ` [PATCH 3/4] scripts: namespace.pl: add .o to nmexception file names and fix "acpica" rd.dunlab 2019-10-23 5:34 ` Masahiro Yamada 2019-10-03 3:13 ` [PATCH 4/4] scripts: namespace.pl: add blank section separator line rd.dunlab
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.