Skip to content

Commit c7fb169

Browse files
committed
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux
Pull ARM fix from Russell King: - Fix a build issue with older binutils with LD dead code elimination disabled * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux: ARM: 9414/1: Fix build issue with LD_DEAD_CODE_DATA_ELIMINATION
2 parents 962da4d + 0d43791 commit c7fb169

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

arch/arm/Kconfig

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

arch/arm/kernel/entry-armv.S

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
#include "entry-header.S"
3030
#include <asm/probes.h>
3131

32+
#ifdef CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION
33+
#define RELOC_TEXT_NONE .reloc .text, R_ARM_NONE, .
34+
#else
35+
#define RELOC_TEXT_NONE
36+
#endif
37+
3238
/*
3339
* Interrupt handling.
3440
*/
@@ -1065,7 +1071,7 @@ vector_addrexcptn:
10651071
.globl vector_fiq
10661072

10671073
.section .vectors, "ax", %progbits
1068-
.reloc .text, R_ARM_NONE, .
1074+
RELOC_TEXT_NONE
10691075
W(b) vector_rst
10701076
W(b) vector_und
10711077
ARM( .reloc ., R_ARM_LDR_PC_G0, .L__vector_swi )
@@ -1079,7 +1085,7 @@ THUMB( .reloc ., R_ARM_THM_PC12, .L__vector_swi )
10791085

10801086
#ifdef CONFIG_HARDEN_BRANCH_HISTORY
10811087
.section .vectors.bhb.loop8, "ax", %progbits
1082-
.reloc .text, R_ARM_NONE, .
1088+
RELOC_TEXT_NONE
10831089
W(b) vector_rst
10841090
W(b) vector_bhb_loop8_und
10851091
ARM( .reloc ., R_ARM_LDR_PC_G0, .L__vector_bhb_loop8_swi )
@@ -1092,7 +1098,7 @@ THUMB( .reloc ., R_ARM_THM_PC12, .L__vector_bhb_loop8_swi )
10921098
W(b) vector_bhb_loop8_fiq
10931099

10941100
.section .vectors.bhb.bpiall, "ax", %progbits
1095-
.reloc .text, R_ARM_NONE, .
1101+
RELOC_TEXT_NONE
10961102
W(b) vector_rst
10971103
W(b) vector_bhb_bpiall_und
10981104
ARM( .reloc ., R_ARM_LDR_PC_G0, .L__vector_bhb_bpiall_swi )

0 commit comments

Comments
 (0)