[ECOS]undefined reference to `__init_array_end__ when linking with eCOS

Gary Thomas gary@mlbassoc.com
Wed Jan 21 14:13:00 GMT 2009


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.
>>>>
>>>> Jifl
>>> 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
>>>  Let me add, that previously I used the old version of eCOS (2.x) - 
>>> and the toolchain that comes with it. My app compiled, linked and 
>>> worked. But now I want to expand it and I thought it would make sense 
>>> to update things a bit. But hellas!!! - see above.
>>
>> Are you building *all* the objects with the same (new, arm-eabi) tools?
>>
>> You should be able to figure which file is generating this section
>> using "arm-eabi-objdump --section-headers"  This may help isolate the
>> issue.
>>
> 
> 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:

You didn't answer the first question; are you using this toolchain to
build all the object files, or are you trying to import some from elsewhere?

> I have never used arm-none-eabi-objdump before so I do not understand 
> from your advice what exactly to do. Following your advice, I have run 
> it for the section-headers of one of the library files of eCOS extras.o. 
> The output is attached. I see nothing special in it.
> 
> There are a lot more *.o-files in the the directories generated during 
> the build of the eCOS system - and of course, there are also *.a files. 
> Do I have to systematically check all of them and what am I expected to 
> see?

Yes, look at all the files (easy to do with some scripting) and use
'grep' (or similar) to find the one(s) that reference the section
that's causing troubles.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list