Commit 340fd66c authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Catalin Marinas
Browse files

arm64: fix .data.rel.ro size assertion when CONFIG_LTO_CLANG



Commit be288182 ("arm64/build: Assert for unwanted sections")
introduced an assertion to ensure that the .data.rel.ro section does
not exist.

However, this check does not work when CONFIG_LTO_CLANG is enabled,
because .data.rel.ro matches the .data.[0-9a-zA-Z_]* pattern in the
DATA_MAIN macro.

Move the ASSERT() above the RW_DATA() line.

Fixes: be288182 ("arm64/build: Assert for unwanted sections")
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Acked-by: default avatarWill Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20241106161843.189927-1-masahiroy@kernel.org


Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent dc9b74a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment