From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31876 invoked by alias); 6 Jun 2005 07:18:23 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 31857 invoked by uid 22791); 6 Jun 2005 07:18:18 -0000 Received: from fmx1.freemail.hu (HELO fmx1.freemail.hu) (195.228.242.221) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Mon, 06 Jun 2005 07:18:18 +0000 Received: (qmail 47912 invoked from network); 6 Jun 2005 09:18:15 +0200 Received: from fm18.freemail.hu (195.228.242.218) by fmx1.freemail.hu with SMTP; 6 Jun 2005 09:18:15 +0200 Received: (qmail 40263 invoked by uid 821968); 6 Jun 2005 09:18:15 +0200 Date: Mon, 06 Jun 2005 07:18:00 -0000 From: Scherer Balazs To: ecos-discuss@sources.redhat.com Message-ID: X-HTTP-User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-2 Subject: [ECOS] eCos linking problem X-SW-Source: 2005-06/txt/msg00026.txt.bz2 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 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