]> git.baikalelectronics.ru Git - kernel.git/commit
ARC: change some branchs to jumps to resolve linkage errors
authorYuriy Kolerov <yuriy.kolerov@synopsys.com>
Wed, 12 Aug 2015 14:23:32 +0000 (17:23 +0300)
committerVineet Gupta <vgupta@synopsys.com>
Thu, 20 Aug 2015 13:23:15 +0000 (18:53 +0530)
commit5f5bb6fe66f166c3ecb4426876e266ecee87b31c
treef04687c44c4d3e537fcd83e287c9132d8737ef1e
parent7df25821a1c3ebb04760f49c4fb140aa223606d8
ARC: change some branchs to jumps to resolve linkage errors

When kernel's binary becomes large enough (32M and more) errors
may occur during the final linkage stage. It happens because
the build system uses short relocations for ARC  by default.
This problem may be easily resolved by passing -mlong-calls
option to GCC to use long absolute jumps (j) instead of short
relative branchs (b).

But there are fragments of pure assembler code exist which use
branchs in inappropriate places and cause a linkage error because
of relocations overflow.

First of these fragments is .fixup insertion in futex.h and
unaligned.c. It inserts a code in the separate section (.fixup)
with branch instruction. It leads to the linkage error when
kernel becomes large.

Second of these fragments is calling scheduler's functions
(common kernel code) from entry.S of ARC's code. When kernel's
binary becomes large it may lead to the linkage error because
scheduler may occur far enough from ARC's code in the final
binary.

Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/include/asm/futex.h
arch/arc/kernel/entry.S
arch/arc/kernel/unaligned.c