diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2015-04-20 03:50:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-08 08:44:12 +0300 |
commit | 62011a96b21de60b18b83e2750340f91d369c7e1 (patch) | |
tree | 843eebc235a5fb7023af6f8d91e6c5bdd082abf8 /lib | |
parent | 0acdf4380cbdc9dbc8d49ee5063295f55873c91b (diff) | |
download | linux-62011a96b21de60b18b83e2750340f91d369c7e1.tar.xz |
modpost: don't emit section mismatch warnings for compiler optimizations
commit 4a3893d069b788f3570c19c12d9e986e8e15870f upstream.
Currently an allyesconfig build [gcc-4.9.1] can generate the following:
WARNING: vmlinux.o(.text.unlikely+0x3864): Section mismatch in
reference from the function cpumask_empty.constprop.3() to the
variable .init.data:nmi_ipi_mask
which comes from the cpumask_empty usage in arch/x86/kernel/nmi_selftest.c.
Normally we would not see a symbol entry for cpumask_empty since it is:
static inline bool cpumask_empty(const struct cpumask *srcp)
however in this case, the variant of the symbol gets emitted when GCC does
constant propagation optimization.
Fix things up so that any locally optimized constprop variants don't warn
when accessing variables that live in the __init sections.
[arnd: adapted text_sections definition to 3.18]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions