This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: XScale Redboot C-runtime startup
- To: Kip dot McAtee at SpirentCom dot COM
- Subject: Re: [ECOS] XScale Redboot C-runtime startup
- From: Mark Salter <msalter at redhat dot com>
- Date: Mon, 25 Jun 2001 20:17:47 -0400
- CC: ecos-discuss at sourceware dot cygnus dot com
- References: <8AC36D3167EED41184C800508BD954055832C5@apollo.adtech-inc.com>
>>>>> McAtee, Kip writes:
> Greetings-
> We're debugging on an XScale Cyclone board with Redboot.
> When I link my 'app' with:
> /usr/xscale-001130/H-i686-pc-cygwin/bin/xscale-elf-gcc -DDEBUG_PCI
> -DCYGPKG_IO_P CI_DEBUG -Wall -Wpointer-arith -Wstrict-prototypes
> -Winline -Wundef -Woverloaded -virtual -g -fno-rtti -fno-exceptions
> -fvtable-gc -finit-priority -mapcs-frame - I../rb/inc
> -L/usr/xscale-001130/H-i686-pc-cygwin/lib/gcc-lib/
> xscale-elf/2.9-xscale-001130-specs=iq80310.specs
> ./objs/main.o
> -o objs/test
> and starting with a JTAG emulator from:
> a0020000 <start>:
> a0020000: e3a0b000 mov r11, #0 ; 0x0
> a0020004: e3a07000 mov r7, #0 ; 0x0
> a0020008: ea002e75 b a002b9e4 <c_start>
> we find ourselves in bsp_trap, without calling main().
> Where is the source to the following C runtime startup routines?
> __do_global_ctors
> __gccmain
> c_start
> _bsp_trap
None of these are provided by RedBoot. They are part of the XScale
toolchain. __do_global_ctors and __gccmain are part of gcc. c_start
and _bsp_trap are part of the toolchain bsp. The early trap (SWI)
is used to get a shared data structure from RedBoot. Other traps
are used for program i/o, etc.
--Mark