Skip to content

Commit 53e7e1f

Browse files
nathanchanceRussell King (Oracle)
authored andcommitted
ARM: 9450/1: Fix allowing linker DCE with binutils < 2.36
Commit e7607f7 ("ARM: 9443/1: Require linker to support KEEP within OVERLAY for DCE") accidentally broke the binutils version restriction that was added in commit 0d43791 ("ARM: 9414/1: Fix build issue with LD_DEAD_CODE_DATA_ELIMINATION"), reintroducing the segmentation fault addressed by that workaround. Restore the binutils version dependency by using CONFIG_LD_CAN_USE_KEEP_IN_OVERLAY as an additional condition to ensure that CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION is only enabled with binutils >= 2.36 and ld.lld >= 21.0.0. Closes: https://lore.kernel.org/[email protected]/ Closes: https://lore.kernel.org/CAFERDQ0zPoya5ZQfpbeuKVZEo_fKsonLf6tJbp32QnSGAtbi+Q@mail.gmail.com/ Cc: [email protected] Fixes: e7607f7 ("ARM: 9443/1: Require linker to support KEEP within OVERLAY for DCE") Reported-by: Rob Landley <[email protected]> Tested-by: Rob Landley <[email protected]> Reported-by: Martin Wetterwald <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]>
1 parent 87c4e14 commit 53e7e1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ config ARM
121121
select HAVE_KERNEL_XZ
122122
select HAVE_KPROBES if !XIP_KERNEL && !CPU_ENDIAN_BE32 && !CPU_V7M
123123
select HAVE_KRETPROBES if HAVE_KPROBES
124-
select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if (LD_VERSION >= 23600 || LD_CAN_USE_KEEP_IN_OVERLAY)
124+
select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if (LD_VERSION >= 23600 || LD_IS_LLD) && LD_CAN_USE_KEEP_IN_OVERLAY
125125
select HAVE_MOD_ARCH_SPECIFIC
126126
select HAVE_NMI
127127
select HAVE_OPTPROBES if !THUMB2_KERNEL

0 commit comments

Comments
 (0)