This is the mail archive of the ecos-discuss@sourceware.cygnus.com 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]

Re: i386/Windows target?


Bart Veer wrote:
> 
> eCos does not specifically demand ELF, in that there is nothing in the
> source code which knows about ELF executables. However it does require
> the following:
> 
> 1) constructor priority ordering. This is most easily implemented by
>    putting the static objects into appropriately numbered linker
>    sections, and sorting them in the linker script. So you need an
>    image format which supports lots of linker sections.
> 
> 2) linker garbage collection, also known as selective linking. This is
>    most easily implemented by putting every function and variable into
>    its own linker section. Strictly speaking this is not absolutely
>    necessary, but without it the final executables will be
>    significantly bigger than necessary. Arguably this is not so much
>    of a problem when using a synthetic target.
> 
> 3) weak symbol support.

4) Handling of arbitrary output section names. Some object formats only
permit a particular list of names: .text, .data, etc. rather than arbitrary
ones.

> ELF can handle all of this. Older image formats typically cannot, e.g.
> there are likely to be strict limits on the number of linker sections
> you can create. I do not know exactly what the limitations are in the
> image format currently used by Windows, so I cannot comment further.

 As I understand it,  Windows uses PE, which is based on COFF. COFF does
not support any of the features 1-4 above. (ECOFF supports 3 and 4 IIRC,
but that's no use to PE). Therefore PE cannot support the features required
by eCos at present.

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

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