Skip to content

Commit 67b0141

Browse files
ardbiesheuvelRussell King
authored andcommitted
ARM: 8995/1: drop Thumb-2 workaround for ancient binutils
The CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11 workaround addresses an issue which was fixed before the oldest supported binutils (2.23 at this time) were released. So we can remove it now. Acked-by: Dave Martin <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 4d44a39 commit 67b0141

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

arch/arm/Kconfig

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,37 +1422,6 @@ config THUMB2_KERNEL
14221422

14231423
If unsure, say N.
14241424

1425-
config THUMB2_AVOID_R_ARM_THM_JUMP11
1426-
bool "Work around buggy Thumb-2 short branch relocations in gas"
1427-
depends on THUMB2_KERNEL && MODULES
1428-
default y
1429-
help
1430-
Various binutils versions can resolve Thumb-2 branches to
1431-
locally-defined, preemptible global symbols as short-range "b.n"
1432-
branch instructions.
1433-
1434-
This is a problem, because there's no guarantee the final
1435-
destination of the symbol, or any candidate locations for a
1436-
trampoline, are within range of the branch. For this reason, the
1437-
kernel does not support fixing up the R_ARM_THM_JUMP11 (102)
1438-
relocation in modules at all, and it makes little sense to add
1439-
support.
1440-
1441-
The symptom is that the kernel fails with an "unsupported
1442-
relocation" error when loading some modules.
1443-
1444-
Until fixed tools are available, passing
1445-
-fno-optimize-sibling-calls to gcc should prevent gcc generating
1446-
code which hits this problem, at the cost of a bit of extra runtime
1447-
stack usage in some cases.
1448-
1449-
The problem is described in more detail at:
1450-
https://bugs.launchpad.net/binutils-linaro/+bug/725126
1451-
1452-
Only Thumb-2 kernels are affected.
1453-
1454-
Unless you are sure your tools don't have this problem, say Y.
1455-
14561425
config ARM_PATCH_IDIV
14571426
bool "Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()"
14581427
depends on CPU_32v7 && !XIP_KERNEL

arch/arm/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,6 @@ AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W)
123123
ifeq ($(CONFIG_THUMB2_KERNEL),y)
124124
CFLAGS_ISA :=-mthumb -Wa,-mimplicit-it=always $(AFLAGS_NOWARN)
125125
AFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb
126-
# Work around buggy relocation from gas if requested:
127-
ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y)
128-
KBUILD_CFLAGS_MODULE +=-fno-optimize-sibling-calls
129-
endif
130126
else
131127
CFLAGS_ISA :=$(call cc-option,-marm,) $(AFLAGS_NOWARN)
132128
AFLAGS_ISA :=$(CFLAGS_ISA)

0 commit comments

Comments
 (0)