]> cvs.zerfleddert.de Git - proxmark3-svn/blame_incremental - armsrc/start.c
client/elf.h: Add missing Elf32_Phdr struct to compile under Mac OS X. client/flash...
[proxmark3-svn] / armsrc / start.c
... / ...
CommitLineData
1//-----------------------------------------------------------------------------\r
2// Just vector to AppMain(). This is in its own file so that I can place it\r
3// with the linker script.\r
4// Jonathan Westhues, Mar 2006\r
5//-----------------------------------------------------------------------------\r
6#include <proxmark3.h>\r
7#include "apps.h"\r
8\r
9extern char __data_start__, __data_src_start__, __data_end__, __bss_start__, __bss_end__;\r
10void __attribute__((section(".startos"))) Vector(void)\r
11{\r
12 /* Stack should have been set up by the bootloader */\r
13 char *src, *dst, *end;\r
14 \r
15 /* Set up (that is: clear) BSS. */\r
16 dst = &__bss_start__;\r
17 end = &__bss_end__;\r
18 while(dst < end) *dst++ = 0;\r
19 \r
20 /* Set up data segment: Copy from flash to ram */\r
21 src = &__data_src_start__;\r
22 dst = &__data_start__;\r
23 end = &__data_end__;\r
24 while(dst < end) *dst++ = *src++;\r
25 \r
26 AppMain();\r
27}\r
Impressum, Datenschutz