Messages in this thread | | | From | Masahiro Yamada <> | Date | Thu, 4 Aug 2022 01:35:48 +0900 | Subject | Re: [PATCH 1/4] modpost: shorten warning messages in report_sec_mismatch() |
| |
On Wed, Aug 3, 2022 at 3:13 AM Nick Desaulniers <ndesaulniers@google.com> wrote: > > On Mon, Aug 1, 2022 at 2:41 AM Masahiro Yamada <masahiroy@kernel.org> wrote: > > > > Each section mismatch results in long warning messages. Too much. > > :( > > Yes; they are too verbose. That said, I have found the > recommendations about annotations for function attributes handy in the > past and would be sad to see them go. They remind me of "note" > diagnostics from the compiler that add additional context to > "warning"/"error" diagnostics on what the recommended next steps are > for fixing them. > > Is there a "happy middle ground" here?
I do not know. modpost became painfully ugly.
Moreover, the current hint is not necessarily precise. ("lacks a __initdata" in the following)
[sample code] int dummy __initdata; void set_dummy(void) { dummy = 1; }
[warning] WARNING: modpost: vmlinux.o(.text+0x194412): Section mismatch in reference from the function set_dummy() to the variable .init.data:dummy The function set_dummy() references the variable __initdata dummy. This is often because set_dummy lacks a __initdata annotation or the annotation of dummy is wrong.
-- Best Regards
Masahiro Yamada
| |