android_kernel_xiaomi_sm7250/init
Quentin Perret 3d0431a87a BACKPORT: FROMLIST: kbuild: allow symbol whitelisting with TRIM_UNUSED_KSYMS
CONFIG_TRIM_UNUSED_KSYMS currently removes all unused exported symbols
from ksymtab. This works really well when using in-tree drivers, but
cannot be used in its current form if some of them are out-of-tree.

Indeed, even if the list of symbols required by out-of-tree drivers is
known at compile time, the only solution today to guarantee these don't
get trimmed is to set CONFIG_TRIM_UNUSED_KSYMS=n. This not only wastes
space, but also makes it difficult to control the ABI usable by vendor
modules in distribution kernels such as Android. Being able to control
the kernel ABI surface is particularly useful to ship a unique Generic
Kernel Image (GKI) for all vendors, which is a first step in the
direction of getting all vendors to contribute their code upstream.

As such, attempt to improve the situation by enabling users to specify a
symbol 'whitelist' at compile time. Any symbol specified in this
whitelist will be kept exported when CONFIG_TRIM_UNUSED_KSYMS is set,
even if it has no in-tree user. The whitelist is defined as a simple
text file, listing symbols, one per line.

[ BACKPORT: 60ae1b194b45 not present, sed 3rd line of modules.order ]

Bug: 148277666
Acked-by: Jessica Yu <jeyu@kernel.org>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Tested-by: Matthias Maennich <maennich@google.com>
Reviewed-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Quentin Perret <qperret@google.com>
Link: https://lore.kernel.org/lkml/20200218094139.78835-2-qperret@google.com
Change-Id: Ie9a4bbb8eebb20202623f084859fb89e55a32698
2020-02-27 10:00:39 +00:00
..
calibrate.c
do_mounts_initrd.c init/: remove ineffective sparse disabling 2018-08-22 10:52:49 -07:00
do_mounts_md.c init/: remove ineffective sparse disabling 2018-08-22 10:52:49 -07:00
do_mounts_rd.c init/: remove ineffective sparse disabling 2018-08-22 10:52:49 -07:00
do_mounts.c init/: remove ineffective sparse disabling 2018-08-22 10:52:49 -07:00
do_mounts.h
init_task.c FROMLIST: add support for Clang's Shadow Call Stack (SCS) 2019-11-27 12:37:25 -08:00
initramfs.c initramfs: don't free a non-existent initrd 2019-10-01 08:26:09 +02:00
Kconfig BACKPORT: FROMLIST: kbuild: allow symbol whitelisting with TRIM_UNUSED_KSYMS 2020-02-27 10:00:39 +00:00
Kconfig.gki ANDROID: gki: Fixed some typos in Kconfig.gki 2020-01-31 16:11:59 -08:00
main.c UPSTREAM: random: move rand_initialize() earlier 2020-02-19 14:34:33 -08:00
Makefile
noinitramfs.c
version.c