lkml.org 
[lkml]   [2019]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86/boot: explicitly place .eh_frame after .rodata
Date
When using GCC as compiler and LLVM's lld as linker, linking
setup.elf fails:
LD arch/x86/boot/setup.elf
ld.lld: error: init sections too big!

This happens because ld.lld has different rules for placing
orphan sections (i.e. sections not mentioned in a linker script)
compared to ld.bfd.

Particularly, in this case, the merged .eh_frame section is
placed before __end_init, which triggers an assert in the script.

Explicitly place this section after .rodata, in accordance with
ld.bfd's behavior.

Signed-off-by: Ilie Halip <ilie.halip@gmail.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/760
---
arch/x86/boot/setup.ld | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/x86/boot/setup.ld b/arch/x86/boot/setup.ld
index 0149e41d42c2..4e02eab11b59 100644
--- a/arch/x86/boot/setup.ld
+++ b/arch/x86/boot/setup.ld
@@ -25,6 +25,7 @@ SECTIONS

. = ALIGN(16);
.rodata : { *(.rodata*) }
+ .eh_frame : { *(.eh_frame*) }

.videocards : {
video_cards = .;
--
2.17.1
\
 
 \ /
  Last update: 2019-11-04 10:04    [W:0.074 / U:25.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site