提交 d3d35d95 编写于 作者: T Tony Breeds 提交者: Benjamin Herrenschmidt

powerpc/le: Avoid creatng R_PPC64_TOCSAVE relocations for modules.

When building modules with a native le toolchain the linker will
generate R_PPC64_TOCSAVE relocations when it's safe to omit saving r2 on
a plt call.  This isn't helpful in the conext of a kernel module and the
kernel will fail to load those modules with an error like:
	nf_conntrack: Unknown ADD relocation: 109

This patch tells the linker to avoid createing R_PPC64_TOCSAVE
relocations allowing modules to load.
Signed-off-by: NTony Breeds <tony@bakeyournoodle.com>
Signed-off-by: NAnton Blanchard <anton@samba.org>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 282efb70
...@@ -74,6 +74,7 @@ override CROSS32AS += -mlittle-endian ...@@ -74,6 +74,7 @@ override CROSS32AS += -mlittle-endian
LDEMULATION := lppc LDEMULATION := lppc
GNUTARGET := powerpcle GNUTARGET := powerpcle
MULTIPLEWORD := -mno-multiple MULTIPLEWORD := -mno-multiple
KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-save-toc-indirect)
else else
ifeq ($(call cc-option-yn,-mbig-endian),y) ifeq ($(call cc-option-yn,-mbig-endian),y)
override CC += -mbig-endian override CC += -mbig-endian
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册