Dear Chris, Thanks for your valuable help.
Yesterday, I made a little progress. What have been done are listed below: 1) modify target.ld by replacing .ctors with .init_array as below, __CTOR_LIST__ = ABSOLUTE(.) ; KEEP(*(SORT(.init_array*))) __CTOR_END__= ABSOLUTE(.) ; 2) add libc.a into GROUP(..) in target.ld and remove -nostdlib linker flag 3) make. After done, the info of redboot.elf was dumped to check the constructor list, and __CTOR_LIST and __CTOR_END have different addresses. The above work removed the malloc() error encountered during flash initialization, then after these work, no malloc() error occurs , but redboot will fell in the state of waiting for BOOTP feedback after ethernet controller initialization. You mentioned that hal_misc.c needs to be modified. Would you like to describe your work more detailedly or send me the related modified files in your work package? Thanks a lot. -- br, Fisher On 5/13/08, Chris Zimman <[EMAIL PROTECTED]> wrote: > > > I use arm-none-eabi-ld --verbose and arm-elf-ld --verbose to print > > the detailed link script for comparison, and I also read the arm.ld of > > redboot in \src\hal\arm\arch\current\src. > > > I found after compiling with arm eabi tool chain, there is no > > ARM.exidex and ARM.extab in the generated target.ld. I edited target.ld > > and then make again. I get a redboot.elf. However, after I dumped the > > info of redboot.elf generated by arm-eabi. I found that __CTOR_LIST__ > > ,__CTOR_END__, __DTOR_LIST__, and __DTOR_END__ have the same pointer. > > It means that the constructors and destructors of redboot don't be > > compiled correctly. > > > > > > could you give me more suggestions? I am a newbie in embedded linux. > > There are a few things here if you're trying to get it to work with EABI. > > (1) Constructors are in a new section called .init_array -- they get created > in the opposite order that they are done under arm-elf, so you would need to > modify arm/arch/hal_misc.c as well as arm/arch/arm.ld > > (2) You need to provide .ARM.extab and .ARM.exidx as they are required by > EABI. They need to be added in arm/arch/arm.ld > > I have a working port of eCos w/ ARM EABI support that I've given to > eCosCentric. I believe they are adding this to eCosPro (someone from > eCosCentric please correct me if I'm wrong here). > > --Chris > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
