ARM fix for v6.11

- Fix a build issue with older binutils with LD dead code elimination
   disabled
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEuNNh8scc2k/wOAE+9OeQG+StrGQFAmbYZagACgkQ9OeQG+St
 rGRtxBAAjj7hWL9sodPuTq9gowxYGJFiuIZQ3dHt6vNfuGlT13L4M4fDmX9Tq9FE
 LWjp2eTQyzzGTO5abdWAKkrhR7ASKqRMeDmOJdjC/sgRnIxGhIoP9Iy5Vch+yXMC
 TPZ1D+wMoeB/2QhtFc0ExS22BNbanmARiM+kikY+Fkm5OapceTD43gMgglVSEmRx
 /mS8EKO50Dn4GxB0uoPgkhYM2Q9NSvUcE/uXbMkAsPuC8FUCT+z7/YcxyMZwuXrX
 zy8wzriV67Fg/s2NK7B+Dt55mIClraIq0ATmn7qNUIBhrjUGw0qc8W6PA8pyLV91
 aQP5MhXOaMEroZ9n41lCbuivefRRJLxxAa2YfDd7g+1dVQeqHYOpTpYWU0TtsKi0
 5kOcur96U2SnYbVxihugzJgYIzNW54eH3rHTY9fJ88A+QQfLHxASZ7aTt23QRqPc
 drjRmaTUInd+f6C9leL+roxWu39nXJeuey2VXivKA7K/WbhvEbFn2L9QR2htwFZd
 hOhBaflVepJYlOWr8YOTvRzuXf/E78sYegfH9tD1M7Vnk3Ek/sPbhoYSK7OX9QTU
 rei++QA+bE84ksKSEwyc3UHPTvL1rK3ZFYPFQ7PEYsZMEKkMMg/isNOxFVtJ7N9S
 bURxl4GkSvqamtvqkCISqViPN8iNRHZcyT1EupUpTQQ6J8p4lqk=
 =fJoT
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2024-09-04 09:17:33 -07:00
commit c7fb1692dc
2 changed files with 10 additions and 4 deletions

View file

@ -117,7 +117,7 @@ config ARM
select HAVE_KERNEL_XZ
select HAVE_KPROBES if !XIP_KERNEL && !CPU_ENDIAN_BE32 && !CPU_V7M
select HAVE_KRETPROBES if HAVE_KPROBES
select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if (LD_VERSION >= 23600 || LD_IS_LLD)
select HAVE_MOD_ARCH_SPECIFIC
select HAVE_NMI
select HAVE_OPTPROBES if !THUMB2_KERNEL

View file

@ -29,6 +29,12 @@
#include "entry-header.S"
#include <asm/probes.h>
#ifdef CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION
#define RELOC_TEXT_NONE .reloc .text, R_ARM_NONE, .
#else
#define RELOC_TEXT_NONE
#endif
/*
* Interrupt handling.
*/
@ -1065,7 +1071,7 @@ vector_addrexcptn:
.globl vector_fiq
.section .vectors, "ax", %progbits
.reloc .text, R_ARM_NONE, .
RELOC_TEXT_NONE
W(b) vector_rst
W(b) vector_und
ARM( .reloc ., R_ARM_LDR_PC_G0, .L__vector_swi )
@ -1079,7 +1085,7 @@ THUMB( .reloc ., R_ARM_THM_PC12, .L__vector_swi )
#ifdef CONFIG_HARDEN_BRANCH_HISTORY
.section .vectors.bhb.loop8, "ax", %progbits
.reloc .text, R_ARM_NONE, .
RELOC_TEXT_NONE
W(b) vector_rst
W(b) vector_bhb_loop8_und
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 )
W(b) vector_bhb_loop8_fiq
.section .vectors.bhb.bpiall, "ax", %progbits
.reloc .text, R_ARM_NONE, .
RELOC_TEXT_NONE
W(b) vector_rst
W(b) vector_bhb_bpiall_und
ARM( .reloc ., R_ARM_LDR_PC_G0, .L__vector_bhb_bpiall_swi )