Skip to content

Commit 77ab21a

Browse files
Andi KleenH. Peter Anvin
authored andcommitted
Kbuild, lto, workaround: Don't warn for initcall_reference in modpost
This reference is discarded, but can cause warnings when it refers to exit. Ignore for now. This is a workaround and can be removed once we get rid of -fno-toplevel-reorder Signed-off-by: Andi Kleen <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: H. Peter Anvin <[email protected]>
1 parent 58edae3 commit 77ab21a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/mod/modpost.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,6 +1455,10 @@ static void check_section_mismatch(const char *modname, struct elf_info *elf,
14551455
to = find_elf_symbol(elf, r->r_addend, sym);
14561456
tosym = sym_name(elf, to);
14571457

1458+
if (!strncmp(fromsym, "reference___initcall",
1459+
sizeof("reference___initcall")-1))
1460+
return;
1461+
14581462
/* check whitelist - we may ignore it */
14591463
if (secref_whitelist(mismatch,
14601464
fromsec, fromsym, tosec, tosym)) {

0 commit comments

Comments
 (0)