Skip to content

Commit e21560b

Browse files
ardbiesheuvelwilldeacon
authored andcommitted
arm64: Disable LLD linker ASSERT()s for the time being
It turns out [1] that the way LLD handles ASSERT()s in the linker script can result in spurious failures, so disable them for the newly introduced BSS symbol export checks. Since we're not aware of any issues with the existing assertions in vmlinux.lds.S, leave those alone for now so that they can continue to provide useful coverage. A linker fix [2] is due to land in version 21 of LLD. Link: https://lore.kernel.org/r/[email protected] [1] Link: llvm/llvm-project@5859863bab7f [2] Link: ClangBuiltLinux#2094 Signed-off-by: Ard Biesheuvel <[email protected]> Tested-by: Arnd Bergmann <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 217e3cb commit e21560b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arch/arm64/kernel/image-vars.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#error This file should only be included in vmlinux.lds.S
1111
#endif
1212

13+
#if defined(CONFIG_LD_IS_LLD) && CONFIG_LLD_VERSION < 210000
14+
#define ASSERT(...)
15+
#endif
16+
1317
#define PI_EXPORT_SYM(sym) \
1418
__PI_EXPORT_SYM(sym, __pi_ ## sym, Cannot export BSS symbol sym to startup code)
1519
#define __PI_EXPORT_SYM(sym, pisym, msg)\
@@ -142,4 +146,6 @@ KVM_NVHE_ALIAS(kvm_protected_mode_initialized);
142146
_kernel_codesize = ABSOLUTE(__inittext_end - _text);
143147
#endif
144148

149+
#undef ASSERT
150+
145151
#endif /* __ARM64_KERNEL_IMAGE_VARS_H */

0 commit comments

Comments
 (0)