From 099e6fcaafd395eeeccc23fb3055c54332a25b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Mendes?= Date: Tue, 31 Jan 2017 15:54:27 +0100 Subject: [PATCH 1/2] Linker script: merge all .text* sections Fixes cnplab/clickos#36 With this change, all .text sections are merged into one during the final linking. --- arch/x86/minios-x86_64.lds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/minios-x86_64.lds b/arch/x86/minios-x86_64.lds index 3da0a9f..f134016 100644 --- a/arch/x86/minios-x86_64.lds +++ b/arch/x86/minios-x86_64.lds @@ -6,7 +6,7 @@ SECTIONS . = 0x0; _text = .; /* Text and read-only data */ .text : { - *(.text) + *(.text) *(.text.*) *(.gnu.warning) } = 0x9090 From ac514c8b9a160fb68f2f84c909c1437aa382b380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Mendes?= Date: Tue, 31 Jan 2017 16:11:08 +0100 Subject: [PATCH 2/2] Linker script: merge .data* and .bss* sections Resulting .data.* and .bss.* sections (e.g. resulting from setting CFLAGS+=-fdata-sections) are merged into .data and .bss sections respectively during the final linking --- arch/x86/minios-x86_64.lds | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/minios-x86_64.lds b/arch/x86/minios-x86_64.lds index f134016..040c5dc 100644 --- a/arch/x86/minios-x86_64.lds +++ b/arch/x86/minios-x86_64.lds @@ -44,14 +44,14 @@ SECTIONS } .data : { /* Data */ - *(.data) + *(.data) *(.data.*) } _edata = .; /* End of data section */ __bss_start = .; /* BSS */ .bss : { - *(.bss) + *(.bss) *(.bss.*) *(.app.bss) } _end = . ;