[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/20523] New: powerpc64le kernel build with additional cross sec
From: |
npiggin at gmail dot com |
Subject: |
[Bug gold/20523] New: powerpc64le kernel build with additional cross section references fails |
Date: |
Fri, 26 Aug 2016 11:41:51 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=20523
Bug ID: 20523
Summary: powerpc64le kernel build with additional cross section
references fails
Product: binutils
Version: 2.28 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at gmail dot com
Reporter: npiggin at gmail dot com
CC: ian at airs dot com
Target Milestone: ---
Making a small change to the way Linux is linked, moving some text to a
different output section:
diff --git a/arch/powerpc/kernel/vmlinux.lds.S
b/arch/powerpc/kernel/vmlinux.lds.S
index c157b8d..03178df 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -49,8 +49,7 @@ SECTIONS
ALIGN_FUNCTION();
HEAD_TEXT
_text = .;
- /* careful! __ftr_alt_* sections need to be close to .text */
- *(.text .text.* .fixup __ftr_alt_* .ref.text)
+ *(.text .text.* .fixup .ref.text)
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
@@ -63,7 +62,6 @@ SECTIONS
*(.got2)
__got2_end = .;
#endif /* CONFIG_PPC32 */
-
} :kernel
. = ALIGN(PAGE_SIZE);
@@ -92,6 +90,10 @@ SECTIONS
__init_begin = .;
INIT_TEXT_SECTION(PAGE_SIZE) :kernel
+ .__ftr_alternates.text : AT(ADDR(.__ftr_alternates.text) - LOAD_OFFSET)
{
+ *(__ftr_alt*);
+ }
+
/* .exit.text is discarded at runtime, not link time,
* to deal with references from __bug_table
*/
Results in gold failing to link the kernel
../binutils/binutils-gdb/gold/ld-new: stub group size is too large; retrying
with 22020096
../binutils/binutils-gdb/gold/ld-new: stub group size is too large; retrying
with 16515072
arch/powerpc/kernel/head_64.o(__ftr_alt_97+0x40): error: relocation overflow
try relinking with a smaller --stub-group-size
arch/powerpc/kernel/head_64.o(__ftr_alt_97+0x7c): error: relocation overflow
try relinking with a smaller --stub-group-size
arch/powerpc/kernel/head_64.o(__ftr_alt_97+0xbc): error: relocation overflow
try relinking with a smaller --stub-group-size
arch/powerpc/lib/built-in.o(__ftr_alt_97+0x8): error: relocation overflow
try relinking with a smaller --stub-group-size
Where some of the instructions in __ftr_alt* have conditional branches back to
.text that will be out of range and require a trampoline:
40: 00 00 82 41 beq 40 <__ftr_alt_97+0x40>
Linking with ld.bfd succeeds. The "careful!" comment in the linker script is
related to these relocations but should not cause this failure (runtime code
patching in the kernel cannot cope with __ftr_alt patch code using branch
trampolines).
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gold/20523] New: powerpc64le kernel build with additional cross section references fails,
npiggin at gmail dot com <=
- [Bug gold/20523] powerpc64le kernel build with additional cross section references fails, npiggin at gmail dot com, 2016/08/26
- [Bug gold/20523] powerpc64le kernel build with additional cross section references fails, amodra at gmail dot com, 2016/08/29
- [Bug gold/20523] powerpc64le kernel build with additional cross section references fails, npiggin at gmail dot com, 2016/08/29
- [Bug gold/20523] powerpc64le kernel build with additional cross section references fails, amodra at gmail dot com, 2016/08/29
- [Bug gold/20523] powerpc64le kernel build with additional cross section references fails, cvs-commit at gcc dot gnu.org, 2016/08/30
- [Bug gold/20523] powerpc64le kernel build with additional cross section references fails, npiggin at gmail dot com, 2016/08/30