android_kernel_xiaomi_sm8350/scripts/mod
Tejun Heo 56fc82c536 modpost: NOBITS sections may point beyond the end of the file
Impact: fix link failure on certain toolchains with specific configs

Recent percpu change made x86_64 split .data.init section into three
separate segments - data.init, percpu and data.init2.  data.init2 gets
.data.nosave and .bss.* and is followed by .notes segment.  Depending
on configuration both segments might contain no data, in which case
the tool chain makes the section header to contain offset beyond the
end of the file.

modpost isn't too happy about it and fails build - as reported by
Pawel Dziekonski:

    Building modules, stage 2.
    MODPOST 416 modules
    FATAL: vmlinux is truncated. sechdrs[i].sh_offset=10354688 >
    sizeof(*hrd)=64
    make[1]: *** [__modpost] Error 1

Teach modpost that NOBITS section may point beyond the end of the file
and that .modinfo can't be NOBITS.

Reported-by: Pawel Dziekonski <dzieko@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-02-05 20:25:43 +01:00
..
.gitignore
empty.c
file2alias.c PNP: fix broken pnp lowercasing for acpi module aliases 2009-01-20 20:52:08 -08:00
Makefile
mk_elfconfig.c remove the v850 port 2008-07-24 10:47:24 -07:00
modpost.c modpost: NOBITS sections may point beyond the end of the file 2009-02-05 20:25:43 +01:00
modpost.h
sumversion.c kbuild: prevent modpost from looking for a .cmd file for a static library linked into a module 2008-10-29 22:02:10 +01:00