linux/include/asm-generic
Masahiro Yamada bb43a59944 Rename .data.unlikely to .data..unlikely
Commit 7ccaba5314ca ("consolidate WARN_...ONCE() static variables")
was intended to collect all .data.unlikely sections into one chunk.
However, this has not worked when CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
or CONFIG_LTO_CLANG is enabled, because .data.unlikely matches the
.data.[0-9a-zA-Z_]* pattern in the DATA_MAIN macro.

Commit cb87481ee89d ("kbuild: linker script do not match C names unless
LD_DEAD_CODE_DATA_ELIMINATION is configured") was introduced to suppress
the issue for the default CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=n case,
providing a minimal fix for stable backporting. We were aware this did
not address the issue for CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y. The
plan was to apply correct fixes and then revert cb87481ee89d. [1]

Seven years have passed since then, yet the #ifdef workaround remains in
place.

Using a ".." separator in the section name fixes the issue for
CONFIG_LD_DEAD_CODE_DATA_ELIMINATION and CONFIG_LTO_CLANG.

[1]: https://lore.kernel.org/linux-kbuild/CAK7LNASck6BfdLnESxXUeECYL26yUDm0cwRZuM4gmaWUkxjL5g@mail.gmail.com/

Fixes: cb87481ee89d ("kbuild: linker script do not match C names unless LD_DEAD_CODE_DATA_ELIMINATION is configured")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2024-11-27 09:38:27 +09:00
..
2022-02-25 09:36:06 +01:00
2023-02-13 22:13:29 +01:00
2017-11-15 13:28:48 -08:00
2024-05-07 14:20:48 +02:00
2023-12-15 16:25:55 -08:00
2024-01-17 17:52:29 -08:00
2021-12-11 23:31:51 +01:00
2024-04-11 16:23:56 -07:00
2024-09-01 20:26:13 -07:00
2024-04-11 16:23:56 -07:00
2024-09-03 21:15:32 -07:00
2022-07-22 17:34:57 -05:00
2022-05-26 10:50:30 -07:00