From b7727f65959b4c3e858bd903b4bbd611f1e9a677 Mon Sep 17 00:00:00 2001 From: Jim Paris Date: Sat, 25 Sep 2010 16:40:24 -0400 Subject: [PATCH] Move startup code into its own section so the linker can place it first --- mc1322x.lds | 4 ++-- src/start.S | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mc1322x.lds b/mc1322x.lds index 2b233bf64..d4a93a57f 100644 --- a/mc1322x.lds +++ b/mc1322x.lds @@ -2,7 +2,7 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) -SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); +ENTRY(_start) SECTIONS { @@ -18,7 +18,7 @@ HEAP_SIZE = 1024; PROVIDE (__executable_start = 0x00400000); . = 0x00400000; .text : { - *start*.o (.text) + *(.start) *(.irq) *(.text .stub .text.* .gnu.linkonce.t.*) /* .gnu.warning sections are handled specially by elf32.em. */ diff --git a/src/start.S b/src/start.S index d60c90221..82a0e7651 100644 --- a/src/start.S +++ b/src/start.S @@ -53,6 +53,7 @@ ************************************************************************* */ +.section .start .set base, . .set _rom_data_init, 0x108d0