From 93c8c90804df38a8f62670c11a83e3c7c1d88c8e Mon Sep 17 00:00:00 2001 From: TuxSH Date: Sat, 15 Apr 2017 17:11:36 +0200 Subject: [PATCH] Fix linker scripts --- exceptions/arm11/linker.ld | 7 ++++--- exceptions/arm9/linker.ld | 7 ++++--- linker.ld | 11 +++++++---- loader/linker.ld | 7 ++++--- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/exceptions/arm11/linker.ld b/exceptions/arm11/linker.ld index 9e7ecd1..078d9ec 100644 --- a/exceptions/arm11/linker.ld +++ b/exceptions/arm11/linker.ld @@ -5,8 +5,9 @@ ENTRY(_start) SECTIONS { . = 0; - .text : ALIGN(4) { *(.text.start) *(.text*)} - .rodata : ALIGN(4) { *(.rodata*) } - .data : ALIGN(4) { *(.data*) *(.bss* COMMON)} + .text : ALIGN(4) { *(.text.start) *(.text*); . = ALIGN(4); } + .rodata : ALIGN(4) { *(.rodata*); . = ALIGN(4); } + .data : ALIGN(4) { *(.data*); . = ALIGN(8); *(.bss* COMMON); . = ALIGN(8); } + . = ALIGN(4); } diff --git a/exceptions/arm9/linker.ld b/exceptions/arm9/linker.ld index fa0936c..219e9af 100644 --- a/exceptions/arm9/linker.ld +++ b/exceptions/arm9/linker.ld @@ -5,8 +5,9 @@ ENTRY(_start) SECTIONS { . = 0x01FF7FE0; - .text : ALIGN(4) { *(.text.start) *(.text*)} - .rodata : ALIGN(4) { *(.rodata*) } - .data : ALIGN(4) { *(.data*) *(.bss* COMMON)} + .text : ALIGN(4) { *(.text.start) *(.text*); . = ALIGN(4); } + .rodata : ALIGN(4) { *(.rodata*); . = ALIGN(4); } + .data : ALIGN(4) { *(.data*); . = ALIGN(8); *(.bss* COMMON); . = ALIGN(8); } + . = ALIGN(4); } diff --git a/linker.ld b/linker.ld index 26789a9..5486ff0 100644 --- a/linker.ld +++ b/linker.ld @@ -6,10 +6,13 @@ SECTIONS { . = 0x23F00000; - .text : ALIGN(4) { *(.text.start) *(.text*) } - .rodata : ALIGN(4) { *(.rodata*) } - .data : ALIGN(4) { *(.data*) } - .bss : ALIGN(4) { __bss_start = .; *(.bss* COMMON); __bss_end = .;} + .text : ALIGN(4) { *(.text.start) *(.text*); . = ALIGN(4); } + .rodata : ALIGN(4) { *(.rodata*); . = ALIGN(4); } + .data : ALIGN(4) { *(.data*); . = ALIGN(4); } + + __bss_start = .; + .bss : ALIGN(8) { *(.bss* COMMON); . = ALIGN(8); } + __bss_end = .; . = ALIGN(4); } diff --git a/loader/linker.ld b/loader/linker.ld index 8186950..bf648ad 100644 --- a/loader/linker.ld +++ b/loader/linker.ld @@ -5,8 +5,9 @@ ENTRY(_start) SECTIONS { . = 0x24FFFE00; - .text : ALIGN(4) { *(.text.start) *(.text*)} - .rodata : ALIGN(4) { *(.rodata*) } - .data : ALIGN(4) { *(.data*) *(.bss* COMMON)} + .text : ALIGN(4) { *(.text.start) *(.text*); . = ALIGN(4); } + .rodata : ALIGN(4) { *(.rodata*); . = ALIGN(4); } + .data : ALIGN(4) { *(.data*); . = ALIGN(8); *(.bss* COMMON); . = ALIGN(8); } + . = ALIGN(4); }