From 755ff89ddeaa7ecfac9287fa93ce9c20058ca9e3 Mon Sep 17 00:00:00 2001 From: Henrik Nordstrom Date: Fri, 17 May 2013 17:07:44 +0200 Subject: [PATCH] felboot: Prevent GCC from reordering _start. Must be at a known address --- felboot/fel-boot.ld | 2 +- felboot/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/felboot/fel-boot.ld b/felboot/fel-boot.ld index 19bc549..cf1419f 100644 --- a/felboot/fel-boot.ld +++ b/felboot/fel-boot.ld @@ -7,7 +7,7 @@ SECTIONS . = ALIGN(4); .text : { - main.o (.text*) + main.o (.text.start) *(.text*) } . = ALIGN(4); diff --git a/felboot/main.c b/felboot/main.c index a26243b..a06ecdf 100644 --- a/felboot/main.c +++ b/felboot/main.c @@ -19,7 +19,7 @@ #include -void _start(void) +__attribute__ ((section (".text.start"))) void _start(void) { clock_init(); gpio_init();