public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] eCos linking problem
@ 2005-06-06  7:18 Scherer Balazs
  0 siblings, 0 replies; only message in thread
From: Scherer Balazs @ 2005-06-06  7:18 UTC (permalink / raw)
  To: ecos-discuss

Hello,

I have an resource problem, when I'm building and linking eCos 
applications for the lpc2106 ARM7 processor. 

The build process done successfully and the application is also working 
fine, but when I'm reading the properties of the builded project I get 
the following:

arm-elf-objdump -h hello

hello:     file format elf32-littlearm

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .rom_vectors  00000040  00000000  00000000  00008000  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .text         00006a98  00000040  00000040  00008040  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .fini         00000000  00006ad8  00006ad8  000106ec  2**0
                  CONTENTS
  3 .rodata       00000278  00006ad8  00006ad8  0000ead8  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .rodata1      00000000  00006d50  00006d50  000106ec  2**0
                  CONTENTS
  5 .fixup        00000000  00006d50  00006d50  000106ec  2**0
                  CONTENTS
  6 .gcc_except_table 00000000  00006d50  00006d50  000106ec  2**0
                  CONTENTS
  7 .fixed_vectors 00000140  40000040  40000040  00010700  2**5
                  CONTENTS, READONLY
  8 .data         0000056c  40000180  00006d50  00010180  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  9 .bss          000044d8  400006ec  400006ec  000106ec  2**5
                  ALLOC


As you can see the Algn part of the .bss section is huge (32 bytes), and 
every time when I'm creating a global variable (even an unsigned char) 
the reserved space for this variable will be 32 bytes, which is not to 
resource efficient.

I have examined the linker script file, but it looks to be fine (I think).

My ldi file is:

#include <cyg/infra/cyg_type.inc>

MEMORY
{
    ram : ORIGIN = 0x40000000, LENGTH = 0x10000
    rom : ORIGIN = 0x0, LENGTH = 0x20000
}

SECTIONS
{
    SECTIONS_BEGIN
    SECTION_rom_vectors (rom, 0, LMA_EQ_VMA)   
    SECTION_text (rom, ALIGN (1), LMA_EQ_VMA)
    SECTION_fini (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata1 (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixup (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixed_vectors (ram, 0x40000040, LMA_EQ_VMA)
    SECTION_data (ram, ALIGN (0x4), FOLLOWING (.gcc_except_table))
    SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
    SECTIONS_END
} 


Can anybody help me?
What coud be the problem?

Thank you.

Regards,

Balazs Scherer

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-06  7:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-06  7:18 [ECOS] eCos linking problem Scherer Balazs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).