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]

Cygwin / Linux difference


Hi

I would appreciate your help with differences when building an application under Linux compared to when building the same under Windows (cygwin).

Target device: STM32 eval board
compiler: arm-eabi-gcc

The sources for both variants (Windows and Linux) are almost the same. Both have exactly the same ldi file. For Windows I have an older version of ecos-3.0 (for Linux I use the ecos-3.0 HEAD version).

At first sight everything compiles and looks fine. The first difference that makes me suspicious is that the size of the elf file (as well as the size of the image) is under Linux double the size it has under Windows (cygwin).

Then when looking into the generated elf file there is another difference that seems to be the source of my problem (see below)
 * align of LOAD is different
 * first off is 0x00000100 under Windows and 0x00008008 under Linux.

Thank a lot for every hint you can provide for me.

Best regards
Philipp

----
Windows (Cygwin) version of ELF Program Header:
0x70000001 off    0x00000100 vaddr 0x08000008 paddr 0x08000008 align 2**2
         filesz 0x00000010 memsz 0x00000010 flags r--
    LOAD off    0x000000f8 vaddr 0x08000000 paddr 0x08000000 align 2**3
         filesz 0x0000b6ac memsz 0x0000b6b8 flags rwx
    LOAD off    0x0000b7a4 vaddr 0x20000400 paddr 0x0800b6b8 align 2**1
         filesz 0x00000804 memsz 0x00000804 flags rw-
    LOAD off    0x0000bfa8 vaddr 0x68000000 paddr 0x0800bebc align 2**3
         filesz 0x00000810 memsz 0x00044dd4 flags rwx
    LOAD off    0x0000c7b8 vaddr 0xc0000000 paddr 0xc0000000 align 2**2
         filesz 0x00000000 memsz 0x00000074 flags rw-
    LOAD off    0x0000c7b8 vaddr 0xc0180000 paddr 0xc0180000 align 2**0
         filesz 0x00000000 memsz 0x00080000 flags rw-

Linux version of ELF Program Header:
0x70000001 off    0x00008008 vaddr 0x08000008 paddr 0x08000008 align 2**2
         filesz 0x00000010 memsz 0x00000010 flags r--
    LOAD off    0x00008000 vaddr 0x08000000 paddr 0x08000000 align 2**15
         filesz 0x00017c44 memsz 0x00017c50 flags rwx
    LOAD off    0x00020400 vaddr 0x20000400 paddr 0x08017c50 align 2**15
         filesz 0x00000804 memsz 0x00000804 flags rw-
    LOAD off    0x00028000 vaddr 0x68000000 paddr 0x08018454 align 2**15
         filesz 0x00001828 memsz 0x00045e58 flags rwx
    LOAD off    0x00030000 vaddr 0xc0000000 paddr 0xc0000000 align 2**15
         filesz 0x00000000 memsz 0x00000074 flags rw-
    LOAD off    0x00030000 vaddr 0xc0180000 paddr 0xc0180000 align 2**15
         filesz 0x00000000 memsz 0x00080000 flags rw-




-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurÃck-Garantie!		
Jetzt informieren: http://www.gmx.net/de/go/freephone

-- 
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]