This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Elf to Bin format
- To: "'Mark Salter'" <msalter at redhat dot com>
- Subject: RE: [ECOS] Elf to Bin format
- From: "Narayana, Venkat A." <NarayVA at nsc-msg01 dot network dot com>
- Date: Mon, 4 Jun 2001 10:56:57 -0500
- Cc: "'ecos-discuss at sources dot redhat dot com'" <ecos-discuss at sources dot redhat dot com>
[snip]
> As was previously stated in this thread, my bin
> file, when i flashed it into a flash, does not contain
> .data section.
What makes you think this?
Because,after i load the bin file into flash,i am using
windriver's visionclick to view the contents of flash,
and i find that the contents are correct till .rodata
section,i.e upto address 302ec.
.data section follows rodata section. i,e .data section
begins at 302ec,which is rom_data_start and goes up to
0x7d4 bytes. Now,the tool shows me that from 302ec onwards
there's no data. The tool could be wrong, so when i single
steeped, i got to the same conclusion, when i am at this
piece of code:( this is in vectors.S )
// Relocate [copy] data from ROM to RAM
// .__ram_data_start is same as __ram_data_start
// this is because of the way PTR defines them.
ldr r3,.__rom_data_start
ldr r4,.__ram_data_start
ldr r5,.__ram_data_end
cmp r4,r5 // jump if no data to move
% ls -l redboot.bin
-rwxr-xr-x 1 root root 199360 Jun 1 13:49 redboot.bin
objdump of redboot.elf
arm-elf-objdump -h redboot.elf | more
redboot.elf: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .debug_aranges 000005a0 00000000 00000000 0003a7d4 2**0
CONTENTS, READONLY, DEBUGGING
1 .debug_pubnames 000027b0 00000000 00000000 0003ad74 2**0
CONTENTS, READONLY, DEBUGGING
2 .debug_info 000303df 00000000 00000000 0003d524 2**0
CONTENTS, READONLY, DEBUGGING
3 .debug_abbrev 00004794 00000000 00000000 0006d903 2**0
CONTENTS, READONLY, DEBUGGING
4 .debug_line 000184ab 00000000 00000000 00072097 2**0
CONTENTS, READONLY, DEBUGGING
5 .rom_vectors 00000040 a0000000 00000000 00008000 2**0
CONTENTS, ALLOC, LOAD, CODE
6 .text 000274b4 00002000 00002000 0000a000 2**14
CONTENTS, ALLOC, LOAD, READONLY, CODE
7 .fini 00000000 000294b4 000294b4 0008a542 2**0
CONTENTS
8 .rodata 00006e38 000294b4 000294b4 000314b4 2**2
CONTENTS, ALLOC, LOAD, DATA
9 .rodata1 00000000 000302ec 000302ec 0008a542 2**0
CONTENTS
10 .fixup 00000000 000302ec 000302ec 0008a542 2**0
CONTENTS
11 .gcc_except_table 00000000 000302ec 000302ec 0008a542 2**0
CONTENTS
12 .fixed_vectors 00000160 a1f00020 a1f00020 0008a560 2**5
CONTENTS
13 .data 000007d4 a000a000 000302ec 0003a000 2**2
CONTENTS, ALLOC, LOAD, DATA
14 .bss 00006c38 a000a7d4 a000a7d4 0003a7d4 2**4
ALLOC