Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

modpost: Ignore unresolved section bounds symbols

In preparation for klp-build livepatch module creation tooling,
suppress warnings for unresolved references to linker-generated
__start_* and __stop_* section bounds symbols.

These symbols are expected to be undefined when modpost runs, as they're
created later by the linker.

Cc: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Petr Mladek <pmladek@suse.com>
Tested-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>

+5
+5
scripts/mod/modpost.c
··· 606 606 strstarts(symname, "_savevr_") || 607 607 strcmp(symname, ".TOC.") == 0) 608 608 return 1; 609 + 610 + /* ignore linker-created section bounds variables */ 611 + if (strstarts(symname, "__start_") || strstarts(symname, "__stop_")) 612 + return 1; 613 + 609 614 /* Do not ignore this symbol */ 610 615 return 0; 611 616 }