From 1d4eb87486931ab41c0a085c9ac9daf075655932 Mon Sep 17 00:00:00 2001 From: Erin Date: Sun, 4 Jun 2017 11:37:11 -0500 Subject: [PATCH] linker.ld: merge small sections --- src/arch/x86_64/linker.ld | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/arch/x86_64/linker.ld b/src/arch/x86_64/linker.ld index 60e920c..afee66c 100644 --- a/src/arch/x86_64/linker.ld +++ b/src/arch/x86_64/linker.ld @@ -10,6 +10,14 @@ SECTIONS { .text : { /* Kernel code */ - *(.text) + *(.text .text.*) /* .text.* ensures that all small .text fragments are linked together */ } -} \ No newline at end of file + + /* ensure small fragments in .rodata and .rel.ro are linked together */ + .rodata : { + *(.rodata .rodata.*) + } + .data.rel.ro : { + *(.data.rel.ro.local*) *(.data.rel.ro .data.rel.ro.*) + } +}