diff --git a/book/games/pong/gba.ld b/book/games/pong/gba.ld index 72752f95..8f5dbc23 100644 --- a/book/games/pong/gba.ld +++ b/book/games/pong/gba.ld @@ -17,18 +17,18 @@ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 32M } -__text_start = ORIGIN(rom); - SECTIONS { - . = __text_start; + . = ORIGIN(rom); + + .entrypoint : { + *(.entrypoint.regular .entrypoint.common); + . = ALIGN(4); + } > rom .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > rom - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/book/games/pong/gba_mb.ld b/book/games/pong/gba_mb.ld index f4cce4c6..63dfdae5 100644 --- a/book/games/pong/gba_mb.ld +++ b/book/games/pong/gba_mb.ld @@ -16,18 +16,18 @@ MEMORY { iwram (w!x) : ORIGIN = 0x03000000, LENGTH = 32K - __bios_reserved_iwram } -__text_start = ORIGIN(ewram); - SECTIONS { - . = __text_start; + . = ORIGIN(ewram); + + .entrypoint : { + *(.entrypoint.multiboot .entrypoint.common); + . = ALIGN(4); + } > ewram .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > ewram - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/examples/amplitude/gba.ld b/examples/amplitude/gba.ld index 72752f95..8f5dbc23 100644 --- a/examples/amplitude/gba.ld +++ b/examples/amplitude/gba.ld @@ -17,18 +17,18 @@ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 32M } -__text_start = ORIGIN(rom); - SECTIONS { - . = __text_start; + . = ORIGIN(rom); + + .entrypoint : { + *(.entrypoint.regular .entrypoint.common); + . = ALIGN(4); + } > rom .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > rom - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/examples/amplitude/gba_mb.ld b/examples/amplitude/gba_mb.ld index f4cce4c6..63dfdae5 100644 --- a/examples/amplitude/gba_mb.ld +++ b/examples/amplitude/gba_mb.ld @@ -16,18 +16,18 @@ MEMORY { iwram (w!x) : ORIGIN = 0x03000000, LENGTH = 32K - __bios_reserved_iwram } -__text_start = ORIGIN(ewram); - SECTIONS { - . = __text_start; + . = ORIGIN(ewram); + + .entrypoint : { + *(.entrypoint.multiboot .entrypoint.common); + . = ALIGN(4); + } > ewram .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > ewram - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/examples/combo/gba.ld b/examples/combo/gba.ld index 72752f95..8f5dbc23 100644 --- a/examples/combo/gba.ld +++ b/examples/combo/gba.ld @@ -17,18 +17,18 @@ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 32M } -__text_start = ORIGIN(rom); - SECTIONS { - . = __text_start; + . = ORIGIN(rom); + + .entrypoint : { + *(.entrypoint.regular .entrypoint.common); + . = ALIGN(4); + } > rom .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > rom - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/examples/combo/gba_mb.ld b/examples/combo/gba_mb.ld index f4cce4c6..63dfdae5 100644 --- a/examples/combo/gba_mb.ld +++ b/examples/combo/gba_mb.ld @@ -16,18 +16,18 @@ MEMORY { iwram (w!x) : ORIGIN = 0x03000000, LENGTH = 32K - __bios_reserved_iwram } -__text_start = ORIGIN(ewram); - SECTIONS { - . = __text_start; + . = ORIGIN(ewram); + + .entrypoint : { + *(.entrypoint.multiboot .entrypoint.common); + . = ALIGN(4); + } > ewram .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > ewram - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/examples/hyperspace-roll/gba.ld b/examples/hyperspace-roll/gba.ld index 72752f95..8f5dbc23 100644 --- a/examples/hyperspace-roll/gba.ld +++ b/examples/hyperspace-roll/gba.ld @@ -17,18 +17,18 @@ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 32M } -__text_start = ORIGIN(rom); - SECTIONS { - . = __text_start; + . = ORIGIN(rom); + + .entrypoint : { + *(.entrypoint.regular .entrypoint.common); + . = ALIGN(4); + } > rom .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > rom - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/examples/hyperspace-roll/gba_mb.ld b/examples/hyperspace-roll/gba_mb.ld index f4cce4c6..63dfdae5 100644 --- a/examples/hyperspace-roll/gba_mb.ld +++ b/examples/hyperspace-roll/gba_mb.ld @@ -16,18 +16,18 @@ MEMORY { iwram (w!x) : ORIGIN = 0x03000000, LENGTH = 32K - __bios_reserved_iwram } -__text_start = ORIGIN(ewram); - SECTIONS { - . = __text_start; + . = ORIGIN(ewram); + + .entrypoint : { + *(.entrypoint.multiboot .entrypoint.common); + . = ALIGN(4); + } > ewram .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > ewram - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/examples/the-dungeon-puzzlers-lament/gba.ld b/examples/the-dungeon-puzzlers-lament/gba.ld index 72752f95..8f5dbc23 100644 --- a/examples/the-dungeon-puzzlers-lament/gba.ld +++ b/examples/the-dungeon-puzzlers-lament/gba.ld @@ -17,18 +17,18 @@ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 32M } -__text_start = ORIGIN(rom); - SECTIONS { - . = __text_start; + . = ORIGIN(rom); + + .entrypoint : { + *(.entrypoint.regular .entrypoint.common); + . = ALIGN(4); + } > rom .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > rom - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/examples/the-dungeon-puzzlers-lament/gba_mb.ld b/examples/the-dungeon-puzzlers-lament/gba_mb.ld index f4cce4c6..63dfdae5 100644 --- a/examples/the-dungeon-puzzlers-lament/gba_mb.ld +++ b/examples/the-dungeon-puzzlers-lament/gba_mb.ld @@ -16,18 +16,18 @@ MEMORY { iwram (w!x) : ORIGIN = 0x03000000, LENGTH = 32K - __bios_reserved_iwram } -__text_start = ORIGIN(ewram); - SECTIONS { - . = __text_start; + . = ORIGIN(ewram); + + .entrypoint : { + *(.entrypoint.multiboot .entrypoint.common); + . = ALIGN(4); + } > ewram .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > ewram - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/examples/the-hat-chooses-the-wizard/gba.ld b/examples/the-hat-chooses-the-wizard/gba.ld index 72752f95..8f5dbc23 100644 --- a/examples/the-hat-chooses-the-wizard/gba.ld +++ b/examples/the-hat-chooses-the-wizard/gba.ld @@ -17,18 +17,18 @@ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 32M } -__text_start = ORIGIN(rom); - SECTIONS { - . = __text_start; + . = ORIGIN(rom); + + .entrypoint : { + *(.entrypoint.regular .entrypoint.common); + . = ALIGN(4); + } > rom .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > rom - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/examples/the-purple-night/gba.ld b/examples/the-purple-night/gba.ld index 72752f95..8f5dbc23 100644 --- a/examples/the-purple-night/gba.ld +++ b/examples/the-purple-night/gba.ld @@ -17,18 +17,18 @@ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 32M } -__text_start = ORIGIN(rom); - SECTIONS { - . = __text_start; + . = ORIGIN(rom); + + .entrypoint : { + *(.entrypoint.regular .entrypoint.common); + . = ALIGN(4); + } > rom .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > rom - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/examples/the-purple-night/gba_mb.ld b/examples/the-purple-night/gba_mb.ld index f4cce4c6..63dfdae5 100644 --- a/examples/the-purple-night/gba_mb.ld +++ b/examples/the-purple-night/gba_mb.ld @@ -16,18 +16,18 @@ MEMORY { iwram (w!x) : ORIGIN = 0x03000000, LENGTH = 32K - __bios_reserved_iwram } -__text_start = ORIGIN(ewram); - SECTIONS { - . = __text_start; + . = ORIGIN(ewram); + + .entrypoint : { + *(.entrypoint.multiboot .entrypoint.common); + . = ALIGN(4); + } > ewram .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > ewram - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/template/gba.ld b/template/gba.ld index 72752f95..8f5dbc23 100644 --- a/template/gba.ld +++ b/template/gba.ld @@ -17,18 +17,18 @@ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 32M } -__text_start = ORIGIN(rom); - SECTIONS { - . = __text_start; + . = ORIGIN(rom); + + .entrypoint : { + *(.entrypoint.regular .entrypoint.common); + . = ALIGN(4); + } > rom .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > rom - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/template/gba_mb.ld b/template/gba_mb.ld index f4cce4c6..63dfdae5 100644 --- a/template/gba_mb.ld +++ b/template/gba_mb.ld @@ -16,18 +16,18 @@ MEMORY { iwram (w!x) : ORIGIN = 0x03000000, LENGTH = 32K - __bios_reserved_iwram } -__text_start = ORIGIN(ewram); - SECTIONS { - . = __text_start; + . = ORIGIN(ewram); + + .entrypoint : { + *(.entrypoint.multiboot .entrypoint.common); + . = ALIGN(4); + } > ewram .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > ewram - __text_end = .; .rodata : { *(.rodata .rodata.*); diff --git a/tracker/agb-tracker/gba.ld b/tracker/agb-tracker/gba.ld index 72752f95..8f5dbc23 100644 --- a/tracker/agb-tracker/gba.ld +++ b/tracker/agb-tracker/gba.ld @@ -17,18 +17,18 @@ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 32M } -__text_start = ORIGIN(rom); - SECTIONS { - . = __text_start; + . = ORIGIN(rom); + + .entrypoint : { + *(.entrypoint.regular .entrypoint.common); + . = ALIGN(4); + } > rom .text : { - KEEP(*(.crt0)); - *(.crt0 .crt0*); *(.text .text*); . = ALIGN(4); } > rom - __text_end = .; .rodata : { *(.rodata .rodata.*);