summaryrefslogtreecommitdiff
path: root/lib/raid6/algos.c
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2025-11-20 12:14:16 -0800
committerPeter Zijlstra <peterz@infradead.org>2025-11-21 10:04:09 +0100
commitda6202139aef11c3c5881176e6e3184d88d8a0d9 (patch)
tree9f78a843ed08952bfccc34894e5cb34d7d938219 /lib/raid6/algos.c
parent106f11d43be53156187270d00c83ddf5ef3f6ac6 (diff)
serial: icom: Fix namespace collision and startup() section placement with -ffunction-sections
When compiled with -ffunction-sections (e.g., for LTO, livepatch, dead code elimination, AutoFDO, or Propeller), the startup() function gets compiled into the .text.startup section (or in some cases .text.startup.constprop.0 or .text.startup.isra.0). However, the .text.startup and .text.startup.* sections are also used by the compiler for __attribute__((constructor)) code. This naming conflict causes the vmlinux linker script to wrongly place startup() function code in .init.text, which gets freed during boot. Some builds have a mix of objects, both with and without -ffunctions-sections, so it's not possible for the linker script to disambiguate with #ifdef CONFIG_FUNCTION_SECTIONS or similar. This means that "startup" unfortunately needs to be prohibited as a function name. Rename startup() to icom_startup(). For consistency, also rename its shutdown() counterpart to icom_shutdown(). Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/1aee9ef69f9d40405676712b34f0c397706e7023.1763669451.git.jpoimboe@kernel.org
Diffstat (limited to 'lib/raid6/algos.c')
0 files changed, 0 insertions, 0 deletions