From 1ee7b0dc5a3511bc5ed810ad45c06b5f2d5b1724 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Fri, 25 Jan 2019 19:25:37 -0500 Subject: [PATCH] linker: x86: add orphan linker sections Add missing linker section to avoid warning about orphans when building with host compiler. Fixes #12719 Signed-off-by: Anas Nashif --- include/arch/x86/linker.ld | 3 +++ include/linker/debug-sections.ld | 1 + 2 files changed, 4 insertions(+) diff --git a/include/arch/x86/linker.ld b/include/arch/x86/linker.ld index c8e0631150e..4984f05b115 100644 --- a/include/arch/x86/linker.ld +++ b/include/arch/x86/linker.ld @@ -107,6 +107,7 @@ SECTIONS *(.text) *(".text.*") *(.gnu.linkonce.t.*) + *(.eh_frame_hdr) *(.eh_frame) *(.init) *(.fini) @@ -450,6 +451,8 @@ SECTIONS #include + /DISCARD/ : { *(.note.GNU-stack) } + } #ifdef CONFIG_XIP diff --git a/include/linker/debug-sections.ld b/include/linker/debug-sections.ld index 4a7d04fdb21..e0eaf7f7cec 100644 --- a/include/linker/debug-sections.ld +++ b/include/linker/debug-sections.ld @@ -7,6 +7,7 @@ SECTION_PROLOGUE(.stab.exclstr, 0,) { *(.stab.exclstr) } SECTION_PROLOGUE(.stab.index, 0,) { *(.stab.index) } SECTION_PROLOGUE(.stab.indexstr, 0,) { *(.stab.indexstr) } + SECTION_PROLOGUE(.gnu.build.attributes, 0,) { *(.gnu.build.attributes .gnu.build.attributes.*) } SECTION_PROLOGUE(.comment, 0,) { *(.comment) } /* DWARF debug sections. Symbols in the DWARF debugging sections are relative to the beginning