Skip to content

Commit 1ee7b0d

Browse files
committed
linker: x86: add orphan linker sections
Add missing linker section to avoid warning about orphans when building with host compiler. Fixes zephyrproject-rtos#12719 Signed-off-by: Anas Nashif <[email protected]>
1 parent f7b0398 commit 1ee7b0d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

include/arch/x86/linker.ld

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ SECTIONS
107107
*(.text)
108108
*(".text.*")
109109
*(.gnu.linkonce.t.*)
110+
*(.eh_frame_hdr)
110111
*(.eh_frame)
111112
*(.init)
112113
*(.fini)
@@ -450,6 +451,8 @@ SECTIONS
450451

451452
#include <linker/debug-sections.ld>
452453

454+
/DISCARD/ : { *(.note.GNU-stack) }
455+
453456
}
454457

455458
#ifdef CONFIG_XIP

include/linker/debug-sections.ld

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
SECTION_PROLOGUE(.stab.exclstr, 0,) { *(.stab.exclstr) }
88
SECTION_PROLOGUE(.stab.index, 0,) { *(.stab.index) }
99
SECTION_PROLOGUE(.stab.indexstr, 0,) { *(.stab.indexstr) }
10+
SECTION_PROLOGUE(.gnu.build.attributes, 0,) { *(.gnu.build.attributes .gnu.build.attributes.*) }
1011
SECTION_PROLOGUE(.comment, 0,) { *(.comment) }
1112
/* DWARF debug sections.
1213
Symbols in the DWARF debugging sections are relative to the beginning

0 commit comments

Comments
 (0)