From 4b7796c2d5dae94ef31ff6f3e445b2d26a5b07a9 Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Sun, 18 Dec 2016 02:28:32 +0000 Subject: [PATCH] restore .init section --- dkarm-eabi/crtls/ds_arm7.ld | 8 ++++++++ dkarm-eabi/crtls/ds_arm7_vram.ld | 6 ++++++ dkarm-eabi/crtls/ds_arm9.mem | 4 ++-- dkarm-eabi/crtls/ds_cart.ld | 5 +++++ dkarm-eabi/crtls/dsi_arm9.mem | 4 +--- dkarm-eabi/crtls/gba_cart.ld | 11 ++++++----- dkarm-eabi/crtls/gba_mb.ld | 9 +++++---- dkarm-eabi/crtls/gp32.ld | 6 ++++++ 8 files changed, 39 insertions(+), 14 deletions(-) diff --git a/dkarm-eabi/crtls/ds_arm7.ld b/dkarm-eabi/crtls/ds_arm7.ld index ca2b8c5..9f818f8 100644 --- a/dkarm-eabi/crtls/ds_arm7.ld +++ b/dkarm-eabi/crtls/ds_arm7.ld @@ -27,8 +27,16 @@ SECTIONS KEEP (*(.crt0)) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ } >iwram = 0xff + + .init : + { + KEEP (*(SORT_NONE(.init))) + } >iwram = 0xff + .plt : { *(.plt) } >iwram = 0xff + + .text : /* ALIGN (4): */ { *(.text .stub .text.* .gnu.linkonce.t.*) diff --git a/dkarm-eabi/crtls/ds_arm7_vram.ld b/dkarm-eabi/crtls/ds_arm7_vram.ld index 1d9acd9..8840455 100644 --- a/dkarm-eabi/crtls/ds_arm7_vram.ld +++ b/dkarm-eabi/crtls/ds_arm7_vram.ld @@ -28,6 +28,12 @@ SECTIONS KEEP (*(.crt0)) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ } >vram = 0xff + + .init : + { + KEEP (*(SORT_NONE(.init))) + } >vram = 0xff + .plt : { *(.plt) } >vram = 0xff .text : /* ALIGN (4): */ diff --git a/dkarm-eabi/crtls/ds_arm9.mem b/dkarm-eabi/crtls/ds_arm9.mem index b29a644..9e2dd2b 100644 --- a/dkarm-eabi/crtls/ds_arm9.mem +++ b/dkarm-eabi/crtls/ds_arm9.mem @@ -1,7 +1,7 @@ MEMORY { - rom : ORIGIN = 0x08000000, LENGTH = 32M - ewram : ORIGIN = 0x02000000, LENGTH = 4M - 4k + rom : ORIGIN = 0x08000000, LENGTH = 32M + ewram : ORIGIN = 0x02000000, LENGTH = 4M - 32k dtcm : ORIGIN = 0x0b000000, LENGTH = 16K vectors : ORIGIN = 0x01000000, LENGTH = 256 itcm : ORIGIN = 0x01000100, LENGTH = 32K - 256 diff --git a/dkarm-eabi/crtls/ds_cart.ld b/dkarm-eabi/crtls/ds_cart.ld index 46f7c85..baf2059 100644 --- a/dkarm-eabi/crtls/ds_cart.ld +++ b/dkarm-eabi/crtls/ds_cart.ld @@ -29,6 +29,11 @@ SECTIONS . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ } >rom = 0xff + .init : + { + KEEP (*(SORT_NONE(.init))) + } >rom = 0xff + .plt : { *(.plt) } >rom = 0xff .init : diff --git a/dkarm-eabi/crtls/dsi_arm9.mem b/dkarm-eabi/crtls/dsi_arm9.mem index 7bee484..a8ea218 100644 --- a/dkarm-eabi/crtls/dsi_arm9.mem +++ b/dkarm-eabi/crtls/dsi_arm9.mem @@ -1,7 +1,5 @@ MEMORY { - - rom : ORIGIN = 0x08000000, LENGTH = 32M - ewram : ORIGIN = 0x02000000, LENGTH = 16M - 4k + ewram : ORIGIN = 0x02000000, LENGTH = 16M - 32k dtcm : ORIGIN = 0x0b000000, LENGTH = 16K vectors : ORIGIN = 0x01000000, LENGTH = 256 itcm : ORIGIN = 0x01000100, LENGTH = 32K - 256 diff --git a/dkarm-eabi/crtls/gba_cart.ld b/dkarm-eabi/crtls/gba_cart.ld index 0c85e42..2ce1d67 100644 --- a/dkarm-eabi/crtls/gba_cart.ld +++ b/dkarm-eabi/crtls/gba_cart.ld @@ -73,17 +73,18 @@ SECTIONS . = ALIGN(4); } >rom =0xff - .plt : - { - *(.plt) - . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >rom .init : { KEEP (*(SORT_NONE(.init))) } >rom + .plt : + { + *(.plt) + . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ + } >rom + .text : /* ALIGN (4): */ { *(EXCLUDE_FILE (*.iwram*) .text) diff --git a/dkarm-eabi/crtls/gba_mb.ld b/dkarm-eabi/crtls/gba_mb.ld index 6580182..5563643 100644 --- a/dkarm-eabi/crtls/gba_mb.ld +++ b/dkarm-eabi/crtls/gba_mb.ld @@ -68,16 +68,17 @@ SECTIONS . = ALIGN(4); } >ewram =0xff + .init : + { + KEEP (*(SORT_NONE(.init))) + } >ewram + .plt : { *(.plt) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ } >ewram - .init : - { - KEEP (*(SORT_NONE(.init))) - } >ewram .text ALIGN (4): { diff --git a/dkarm-eabi/crtls/gp32.ld b/dkarm-eabi/crtls/gp32.ld index 85fcab2..f0826e0 100644 --- a/dkarm-eabi/crtls/gp32.ld +++ b/dkarm-eabi/crtls/gp32.ld @@ -15,6 +15,12 @@ SECTIONS KEEP (*(.crt0)) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ } >ram = 0xff + + .init : + { + KEEP (*(SORT_NONE(.init))) + } >ram + .plt : { *(.plt) } >ram = 0xff