This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: undefined reference to `__init_array_end__ when linking with eCOS
Robert Brusa wrote:
> On Wed, 21 Jan 2009 09:16:25 +0100, Gary Thomas <gary@mlbassoc.com> wrote:
>
>> Robert Brusa wrote: ... cut out
>>>>> make: *** [ifw] Fehler 1
>>>>
>>>> Are you using eCos CVS from 2008-11-11 or later? If not, you should.
>>> Yes, I checked it out as recently as 12-Jan-09 using the command:
>>> cvs -z3 -d :pserver:anoncvs@ecos.sourceware.org:/cvs/ecos co -P ecos
>
> My feeling (from the output of ld) is that the problem is somewhere in
> the library files that come with the new toolchains. Somehow the build
> of eCOS seems to involve sections that are not adequately dealt with in
> the target.ld-file. Hence I would firstly look at the eCOS built when
> calling the makefile from within configtool - but:
They are dealt with in sources from 2008-11-11 or later. The start of
SECTION_text in hal/arm/arch/current/src/arm.ld contains:
SECTION_ARM_extab(_region_, _vma_, _lma_) \
SECTION_ARM_exidx(_region_, ALIGN(AAPCS_ALIGN),
FOLLOWING_ALIGNED(.ARM.extab, AAPCS_ALIGN)) \
and further up that's defined:
#define SECTION_ARM_exidx(_region_, _vma_, _lma_) \
. = _vma_; \
. = ALIGN(AAPCS_ALIGN); \
__exidx_start = ABSOLUTE(.); \
.ARM.exidx ALIGN(AAPCS_ALIGN) : _lma_ { \
FORCE_OUTPUT; \
} > _region_ \
__exidx_end = ABSOLUTE(.); \
/DISCARD/ 0 : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
Admittedly that handling is throwing them away (they are linked to C++
exception handling, which is unsupported in public eCos and so they're just
a waste of memory). But if thrown away, you shouldn't get a message saying
"no memory region specified".
It could be that the codesourcery tools have something odd about them which
makes them ignore the discard. To be honest, I don't recommend the
codesourcery prebuilts because they are built against the newlib runtime,
whereas our tools from ftp://ecos.sourceware.org/pub/ecos/gnutools are
built against eCos properly. Make sure you choose the
ecoscentric-gnutools-arm-eabi-20081213-sw set of tools.
Jifl
--
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------ Opinions==mine
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss