Commit 6ed79cf1 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Greg Kroah-Hartman
Browse files

ARM: 9450/1: Fix allowing linker DCE with binutils < 2.36

commit 53e7e1fb upstream.

Commit e7607f7d ("ARM: 9443/1: Require linker to support KEEP within
OVERLAY for DCE") accidentally broke the binutils version restriction
that was added in commit 0d437918 ("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/6739da7d-e555-407a-b5cb-e5681da71056@landley.net/
Closes: https://lore.kernel.org/CAFERDQ0zPoya5ZQfpbeuKVZEo_fKsonLf6tJbp32QnSGAtbi+Q@mail.gmail.com/



Cc: stable@vger.kernel.org
Fixes: e7607f7d ("ARM: 9443/1: Require linker to support KEEP within OVERLAY for DCE")
Reported-by: default avatarRob Landley <rob@landley.net>
Tested-by: default avatarRob Landley <rob@landley.net>
Reported-by: default avatarMartin Wetterwald <martin@wetterwald.eu>
Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f7ff0324
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment