diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2016-01-21 17:07:24 -0500 |
---|---|---|
committer | Bruno Martins <bgcngm@gmail.com> | 2022-10-28 15:57:23 +0100 |
commit | bf7540ffce4475591be8fb64f5db70c8311d37f1 (patch) | |
tree | a54aaab1a7b0e0a3a6ab9b62ceb8ff7ac57fa049 /include/linux/moduleparam.h | |
parent | c49d2545e437162d2a4b7f1e85f591c336129077 (diff) |
BACKPORT: kbuild: record needed exported symbols for modules
Kernel modules are partially linked object files with some undefined
symbols that are expected to be matched with EXPORT_SYMBOL() entries
from elsewhere.
Each .tmp_versions/*.mod file currently contains two line of text
separated by a newline character. The first line has the actual module
file name while the second line has a list of object files constituting
that module. Those files are parsed by modpost (scripts/mod/sumversion.c),
scripts/Makefile.modpost, scripts/Makefile.modsign, etc. Only the
modpost utility cares about the second line while the others retrieve
only the first line.
Therefore we can add a third line to record the list of undefined symbols
aka required EXPORT_SYMBOL() entries for each module into that file
without breaking anything. Like for the second line, symbols are separated
by a blank and the list is terminated with a newline character.
To avoid needless build overhead, the undefined symbols extraction is
performed only when CONFIG_TRIM_UNUSED_KSYMS is selected.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Change-Id: Id8b7b497b8f4afce796a868fad99e9d3aee51e50
(cherry picked from commit 9895c03d48115c7783c0ef0a591447d53254ef84)
Signed-off-by: Dan Aloni <daloni@magicleap.com>
Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
Diffstat (limited to 'include/linux/moduleparam.h')
0 files changed, 0 insertions, 0 deletions