I now did build+link the kernel with allyesconfig and
-flto=partition=balanced (which is better for finding bugs).

There are two issues interesting for GCC:

1) Do we give any guarantee in which section is toplevel assembly
emitted? "__static_call_return" causes modpost error when it is not
emitted into ".text*" but in ".rodata*". Even without LTO this happens
when the preceding (noreorder) symbol is a string constant.

2) Do we want to allow defining symbols inside functions?
It seems to be a weird single use case, where it would be better to just
recommend to make it global if they really want to keep this.


extern void int3_selftest_ip(void);
/* Must be noinline to ensure uniqueness of int3_selftest_ip. */
static noinline void __init int3_selftest(void)
{
        /* ... */
        asm volatile ("int3_selftest_ip:\n\t" /*..*/);
        /* ... */
}

Reply via email to