From 507b31f941f6e9bac6ed1d61e579f8ebb5744e7b Mon Sep 17 00:00:00 2001 From: Antti Kantee Date: Tue, 14 Apr 2015 18:46:11 +0000 Subject: [PATCH] Output initfini as a separate section. Without this, rodata and initfini would overlap. I'll be the first to admit I don't 100% understand why it happened, but it did, and this change seems to address the problem. If it ever happens again, we'll have to get to the bottom of things. Also, collate all of .rodata* into a single section --- platform/baremetal/arch/i386/kern.ldscript | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/baremetal/arch/i386/kern.ldscript b/platform/baremetal/arch/i386/kern.ldscript index f64419f..c96e9ea 100644 --- a/platform/baremetal/arch/i386/kern.ldscript +++ b/platform/baremetal/arch/i386/kern.ldscript @@ -20,6 +20,12 @@ SECTIONS AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text))) { *(.rodata) + *(.rodata.*) + } + + .initfini : + AT (LOADADDR(.text) + (ADDR(.initfini) - ADDR(.text))) + { __init_array_start = . ; *(SORT_BY_INIT_PRIORITY(.init_array.*)) *(SORT_BY_INIT_PRIORITY(.ctors*)) -- 2.39.5