This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
eCos linking problem
- From: Scherer Balazs <scheba at freemail dot hu>
- To: ecos-discuss at sources dot redhat dot com
- Date: Mon, 6 Jun 2005 09:18:15 +0200 (CEST)
- Subject: [ECOS] eCos linking problem
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