This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: ARM EABI port / static constructor priority removal


> This won't work. For example, some watchdog drivers need the I2C
> subsystem to be initialized before they can be initialized. The IO
> layer must be initialised before libc etc. If you get these in the
> wrong order, expect bad things to happen.

I don't understand why you think "this won't work" when "this" is exactly
what the static constructors are doing, except instead of being in one
translation unit, they're in multiple.  Perhaps you're missing what I'm
saying -- I understand that things have to happen in order.  What I'm saying
is that I don't think static constructors are necessarily the best way to
accomplish this.

> In general, it is assumed gcc is used and that the gcc extensions
> work. There have been a few attempts to use compilers other than gcc,
> but i don't remember anybody ever says they have it working well.

It works fine outside of the aforementioned issue.  The 'it requires GCC'
limitation is just a self imposed one.  There's nothing magic going on.

> As a side question, how well does function sections work with your
> compiler? This is another gcc extension which eCos heavily uses in
> order to keep the image size down. Also HAL tables? These also rely on
> sorting otherwise the start and end won't be in the right place.

Everything seems to work fine with the exception of the static constructors.
It shoots off into the flats because some of the ordering is wrong.
I expect that when the __init_array linker issue is resolved, things will
work more or less fine.

See below, built under EABI:

+
RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version v2_0_52 - built 13:33:07, Mar 25 2008

Platform: BCM95890 (ARM9) 
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
Copyright (C) 2003, 2004, 2005, 2006 eCosCentric Limited

RAM: 0x00000000-0x00200000, [0x00022dc0-0x001bd000] available
FLASH: 0x10000000-0x101fffff, 1 x 0x4000 blocks, 2 x 0x2000 blocks, 1 x
0x38000 blocks, 7 x 0x40000 blocks
RedBoot> go 0x40000
EABI constructors invoked
__cxa_atexit called: 0x0004fa00 0x00063eec 0x0006161c
__cxa_atexit called: 0x0004de80 0x00000000 0x0006161c
__cxa_atexit called: 0x0004c4e0 0x00063ed4 0x0006161c
__cxa_atexit called: 0x0005b338 0x000669b8 0x0006161c
__cxa_atexit called: 0x00052d08 0x00063fb4 0x0006161c
__cxa_atexit called: 0x00050114 0x00066990 0x0006161c
__cxa_atexit called: 0x000500e0 0x000669a4 0x0006161c
__cxa_atexit called: 0x0004dd78 0x000643c8 0x0006161c
__cxa_atexit called: 0x00050114 0x00066490 0x0006161c
__cxa_atexit called: 0x000535b8 0x00066a34 0x0006161c
__cxa_atexit called: 0x00050114 0x00066b44 0x0006161c
__cxa_atexit called: 0x000535b8 0x000664a4 0x0006161c
__cxa_atexit called: 0x000535b8 0x000669f0 0x0006161c
Init device '/dev/ser0'
pl011 SERIAL init - dev: a0300000.7
Set output buffer - buf: 6327c len: 128
Set input buffer - buf: 632fc len: 128
Init device '/dev/ser1'
pl011 SERIAL init - dev: a0301000.8
Set output buffer - buf: 6337c len: 128
Set input buffer - buf: 633fc len: 128
Init device '/dev/ttydiag'
Init tty channel: 616d4
Init device '/dev/haldiag'
HAL/diag SERIAL init
Init device '/dev/flash/'
INFO: <code from 0x00040040 -> 0x000602a4, CRC 2fd4>
INFO:<Stress threads test compiled on Mar 26 2008>

[crash]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]