Skip to content

Commit 4f5a4a7

Browse files
authored
Merge pull request #76 from kkebo/orphan-sections
build: prohibit orphan sections
2 parents efb38ce + 4613c36 commit 4f5a4a7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

linker.ld

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@ SECTIONS {
1515
*(.debug*)
1616
*(.eh_frame*)
1717
}
18+
.symtab : { *(.symtab) }
19+
.strtab : { *(.strtab) }
20+
.shstrtab : { *(.shstrtab) }
1821
}
1922
__bss_size = (__bss_end - __bss_start) >> 3;

toolset.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"--gc-sections",
1919
"--print-gc-sections",
2020
"--strip-all",
21+
"--orphan-handling=error",
2122
"-T", "linker.ld",
2223
"-Map", ".build/kernel.map",
2324
]

0 commit comments

Comments
 (0)