Move startup code into its own section so the linker can place it first

This commit is contained in:
Jim Paris 2010-09-25 16:40:24 -04:00
parent d6adce955c
commit b7727f6595
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,7 @@
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
"elf32-littlearm") "elf32-littlearm")
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); ENTRY(_start)
SECTIONS SECTIONS
{ {
@ -18,7 +18,7 @@ HEAP_SIZE = 1024;
PROVIDE (__executable_start = 0x00400000); . = 0x00400000; PROVIDE (__executable_start = 0x00400000); . = 0x00400000;
.text : .text :
{ {
*start*.o (.text) *(.start)
*(.irq) *(.irq)
*(.text .stub .text.* .gnu.linkonce.t.*) *(.text .stub .text.* .gnu.linkonce.t.*)
/* .gnu.warning sections are handled specially by elf32.em. */ /* .gnu.warning sections are handled specially by elf32.em. */

View File

@ -53,6 +53,7 @@
************************************************************************* *************************************************************************
*/ */
.section .start
.set base, . .set base, .
.set _rom_data_init, 0x108d0 .set _rom_data_init, 0x108d0