Files
Centos-kernel-stream-10/drivers/tty
Joe Lawrence 1f98488564 tty: synclink_gt: Fix namespace collision and startup() section placement with -ffunction-sections
JIRA: https://issues.redhat.com/browse/RHEL-114916

commit 31863337138a0482d614f1090727dac87c936959
Author: Josh Poimboeuf <jpoimboe@kernel.org>
Date:   Thu Nov 20 12:14:19 2025 -0800

    tty: synclink_gt: 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 startup_hw().  For consistency, also rename its
    shutdown() counterpart to shutdown_hw().

    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/f0ee750f35c878172cc09916a0724b74e62eadc2.1763669451.git.jpoimboe@kernel.org

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
2026-01-07 12:55:03 -05:00
..
2024-09-03 10:47:56 +02:00
2024-09-03 10:47:47 +02:00
2025-05-29 07:19:49 +02:00