]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/module_64: use module_init_section instead of patching names
authorWedson Almeida Filho <wedsonaf@google.com>
Wed, 2 Feb 2022 05:51:23 +0000 (05:51 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 3 Feb 2022 11:20:37 +0000 (22:20 +1100)
commit75f24c0b769c02a7c4b261a635be251a9e2138e5
tree520a969d36b2cb71cf5a107d046caa8f62d4dcd3
parentc1b3f5a5c4bb0b3df910d842b93fc0562d8df262
powerpc/module_64: use module_init_section instead of patching names

Without this patch, module init sections are disabled by patching their
names in arch-specific code when they're loaded (which prevents code in
layout_sections from finding init sections). This patch uses the new
arch-specific module_init_section instead.

This allows modules that have .init_array sections to have the
initialisers properly called (on load, before init). Without this patch,
the initialisers are not called because .init_array is renamed to
_init_array, and thus isn't found by code in find_module_sections().

Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220202055123.2144842-1-wedsonaf@google.com
arch/powerpc/kernel/module_64.c