Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This is just a warning. The kernel build systems did a sanity check and found out something that might be an error. The warning message says somewhere in kernel code there is code that might do inappropriate cross section access. Note that your kernel did build!</p> <p>To understand what the warning means, consider the following example:</p> <p>Some kernel code in the kernel text section might be trying to call a function marked with the <code>__init</code> data macro, which the linker puts in the kernel <em>init</em> section that gets de-allocated after boot or module loading.</p> <p>This might be a run time error since if the code in the <em>text</em> section calls the code in the <em>init</em> section after the initialization code has finished, it is basically calling a stale pointer.</p> <p>Having said that, that call may be perfectly fine - it is possible that the calls in the kernel <em>text</em> section has some good reason to know that it only calls the function in the <em>init</em> section when it is guaranteed to be there.</p> <p>This, of course, is just an example. Similar other scenarios also exists.</p> <p>The solution is to compile with <code>CONFIG_DEBUG_SECTION_MISMATCH=y</code> which will give you output of what function is trying to access which data or function and which section they belong to. You can then try to figure out if the build time warning is warranted and if so hopefully fix.</p> <p>The <a href="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/linux/init.h" rel="noreferrer">init.h</a> macros <code>__ref</code> and <code>__refdata</code> can be used to allow such <em>init</em> references without warnings. For example,</p> <pre><code>char * __init_refok bar(void) { static int flag = 0; static char* rval = NULL; if(!flag) { flag = 1; rval = init_fn(); /* a function discarded after init */ } return rval; } </code></pre> <p><code>__init_refok</code>, etc can fix "valid" instances, so the fact they exist <em>may</em> not inspire confidence.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload