Home
last modified time | relevance | path

Searched hist:"4 c5afb74" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/scripts/
H A Dmodule.lds.S4c5afb74 Tue Jul 06 08:02:52 CDT 2021 Reiner Huober <reiner.huober@nokia.com> module: combine constructors in module linker script

The constructor code for modules must be aware of init code inside
different sections.

Newer GCC compilers write constructors in more than one section,
e.g. ".ctors.65435". These must be combined into a single
".ctors" section. In the module loader, only the ".ctors" section
is searched and the constructors therein are initialized, when
CONFIG_CONSTRUCTORS=y is set. Other constructors are ignored.

This change combines all ".ctors.*" and the ".ctors" section, if any,
in <module>.ko into a single ."ctors" section.

For code coverage in GCC, this is necessary to show the
code coverage for modules, since code coverage uses such
constructors when initializing a module in newer version of GCC.

Signed-off-by: Reiner Huober <reiner.huober@nokia.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>