From 5f252a3a349532ff7e30a5380207c0259efecc85 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Wed, 22 Feb 2017 18:00:49 +0100 Subject: [PATCH] Updated .ld files thanks to @Wolfvak --- a9lh.ld | 17 ++++++++++------- gateway.ld | 15 +++++++++------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/a9lh.ld b/a9lh.ld index 6602263..b33f6d6 100644 --- a/a9lh.ld +++ b/a9lh.ld @@ -1,13 +1,16 @@ +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") +OUTPUT_ARCH(arm) ENTRY(_start) + SECTIONS { . = 0x23F00000; - .text.start : { *(.text.start) } - .text : { *(.text) } - .data : { *(.data) } - .bss : { __bss_start = .; *(.bss COMMON) } - __bss_end = .; - .rodata : { *(.rodata) } + + .text : ALIGN(4) { *(.text.start) *(.text*) } + .rodata : ALIGN(4) { *(.rodata*) } + .data : ALIGN(4) { *(.data*) } + .bss : ALIGN(4) { __bss_start = .; *(.bss* COMMON); __bss_end = .;} + . = ALIGN(4); __end__ = ABSOLUTE(.); -} \ No newline at end of file +} diff --git a/gateway.ld b/gateway.ld index 48952fc..b7452db 100644 --- a/gateway.ld +++ b/gateway.ld @@ -1,13 +1,16 @@ +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") +OUTPUT_ARCH(arm) ENTRY(_start) + SECTIONS { . = 0x08000000; - .text.start : { *(.text.start) } - .text : { *(.text) } - .data : { *(.data) } - .bss : { __bss_start = .; *(.bss COMMON) } - __bss_end = .; - .rodata : { *(.rodata) } + + .text : ALIGN(4) { *(.text.start) *(.text*) } + .rodata : ALIGN(4) { *(.rodata*) } + .data : ALIGN(4) { *(.data*) } + .bss : ALIGN(4) { __bss_start = .; *(.bss* COMMON); __bss_end = .;} + . = ALIGN(4); __end__ = ABSOLUTE(.); }