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.
Showing the changes to scripts/mod (1 of 1 file). Show all
Unified · Split
| @@ -606,6 +606,11 @@ static int ignore_undef_symbol(struct elf_info *info, const char *symname) · 605 unmodified lines | ||
| 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 | } |