From 8e65034643a683375f4e9e10108fd04b428c8d1d Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Thu, 31 Dec 2015 03:02:00 +0100 Subject: [PATCH] Align sections in linker script --- src/arch/x86_64/linker.ld | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/arch/x86_64/linker.ld b/src/arch/x86_64/linker.ld index 5b1481dd..6d512b63 100644 --- a/src/arch/x86_64/linker.ld +++ b/src/arch/x86_64/linker.ld @@ -14,22 +14,28 @@ ENTRY(start) SECTIONS { . = 1M; - .boot : + .rodata : ALIGN(4K) { /* ensure that the multiboot header is at the beginning */ KEEP(*(.multiboot_header)) + *(.rodata .rodata.*) } - .text : + .text : ALIGN(4K) { *(.text .text.*) } - .rodata : { - *(.rodata .rodata.*) + .data : ALIGN(4K) + { + *(.data .data.*) } - .data.rel.ro : { + .data.rel.ro : ALIGN(4K) { *(.data.rel.ro.local*) *(.data.rel.ro .data.rel.ro.*) } + + .gcc_except_table : ALIGN(4K) { + *(.gcc_except_table) + } }