Fix linker scripts

This commit is contained in:
TuxSH 2017-02-23 19:30:09 +01:00
parent bf7e30539e
commit b1b81c87f2
5 changed files with 34 additions and 21 deletions

View File

@ -1,11 +1,12 @@
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start) ENTRY(_start)
SECTIONS SECTIONS
{ {
. = 0; . = 0;
.text.start : { *(.text.start) } .text : ALIGN(4) { *(.text.start) *(.text*)}
.text : { *(.text) } .rodata : ALIGN(4) { *(.rodata*) }
.data : { *(.data) } .data : ALIGN(4) { *(.data*) *(.bss* COMMON)}
.bss : { *(.bss COMMON) }
.rodata : { *(.rodata) }
. = ALIGN(4); . = ALIGN(4);
} }

View File

@ -1,11 +1,12 @@
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start) ENTRY(_start)
SECTIONS SECTIONS
{ {
. = 0x01FF7FE0; . = 0x01FF7FE0;
.text.start : { *(.text.start) } .text : ALIGN(4) { *(.text.start) *(.text*)}
.text : { *(.text) } .rodata : ALIGN(4) { *(.rodata*) }
.data : { *(.data) } .data : ALIGN(4) { *(.data*) *(.bss* COMMON)}
.bss : { *(.bss COMMON) }
.rodata : { *(.rodata) }
. = ALIGN(4); . = ALIGN(4);
} }

View File

@ -1,11 +1,15 @@
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start) ENTRY(_start)
SECTIONS SECTIONS
{ {
. = 0x23F00000; . = 0x23F00000;
.text.start : { *(.text.start) }
.text : { *(.text) } .text : ALIGN(4) { *(.text.start) *(.text*) }
.data : { *(.data) } .rodata : ALIGN(4) { *(.rodata*) }
.bss : { *(.bss COMMON) } .data : ALIGN(4) { *(.data*) }
.rodata : { *(.rodata) } .bss : ALIGN(4) { __bss_start = .; *(.bss* COMMON); __bss_end = .;}
. = ALIGN(4); . = ALIGN(4);
} }

View File

@ -1,11 +1,12 @@
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start) ENTRY(_start)
SECTIONS SECTIONS
{ {
. = 0x24FFFE00; . = 0x24FFFE00;
.text.start : { *(.text.start) } .text : ALIGN(4) { *(.text.start) *(.text*)}
.text : { *(.text) } .rodata : ALIGN(4) { *(.rodata*) }
.data : { *(.data) } .data : ALIGN(4) { *(.data*) *(.bss* COMMON)}
.bss : { *(.bss COMMON) }
.rodata : { *(.rodata) }
. = ALIGN(4); . = ALIGN(4);
} }

View File

@ -91,4 +91,10 @@ start:
mov r1, #0x340 mov r1, #0x340
str r1, [r0] str r1, [r0]
ldr r0, =__bss_start
mov r1, #0
ldr r2, =__bss_end
sub r2, r0
bl memset32
b main b main