From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Larmour To: bartv@redhat.com Cc: tomyeh@infoshock.com, ecos-discuss@sourceware.cygnus.com Subject: Re: [ECOS] i386/Windows target? Date: Fri, 02 Jun 2000 07:56:00 -0000 Message-id: <3937CAE6.90A51F66@redhat.co.uk> References: <200006021331.OAA28911@sheesh.cygnus.co.uk> X-SW-Source: 2000-06/msg00040.html 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