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]

Re: elf to binary conversion problem


Andrew Lunn ?????:
On Thu, May 28, 2009 at 10:01:01AM +0300, Max Salov wrote:
Hi,
I've made a port of eCos-3.0 to stm3210b eval board by stripping some elements off the stm3210e port. It builds successfully. With minimal set of packages (libc_stdio, libc_stdlib, libc_string, libc_i18n) "hello world" example's size is
$ arm-eabi-size hello.elf
text data bss dec hex filename
5172 88 1936 7196 1c1c hello
but if I try to convert elf to binary with
$ arm-eabi-objcopy -Obinary hello.elf hello.bin
resulting binary image occupy 402654296 bytes (384 MBytes!).

What does:


arm-eabi-objdump --headers hello.elf

show?

Andrew

hello.elf: file format elf32-littlearm

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .debug_aranges 00000978  00000000  00000000  00001508  2**3
                  CONTENTS, READONLY, DEBUGGING
  1 .debug_pubnames 00001302  00000000  00000000  00001e80  2**0
                  CONTENTS, READONLY, DEBUGGING
  2 .debug_info   0000a2ea  00000000  00000000  00003182  2**0
                  CONTENTS, READONLY, DEBUGGING
  3 .debug_abbrev 00003a20  00000000  00000000  0000d46c  2**0
                  CONTENTS, READONLY, DEBUGGING
  4 .debug_line   00004ae2  00000000  00000000  00010e8c  2**0
                  CONTENTS, READONLY, DEBUGGING
  5 .debug_frame  00001314  00000000  00000000  00015970  2**2
                  CONTENTS, READONLY, DEBUGGING
  6 .debug_str    00002d89  00000000  00000000  00016c84  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_loc    00007c1d  00000000  00000000  00019a0d  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .rom_vectors  00000008  08000000  08000000  00000078  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  9 .text         000013ec  08000008  08000008  00000080  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
 10 .rodata       00000040  080013f8  080013f8  00001470  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 11 .eh_frame     00000008  08001438  08001438  000014b0  2**0
                  ALLOC
 12 .data         00000058  20000400  20000400  000014b0  2**3
                  CONTENTS, ALLOC, LOAD, DATA
 13 .bss          00000788  20000458  20000458  00001508  2**2
                  ALLOC
 14 .ARM.attributes 0000002f  00000000  00000000  0002162a  2**0
                  CONTENTS, READONLY
 15 .debug_ranges 00001520  00000000  00000000  00021659  2**0
                  CONTENTS, READONLY, DEBUGGING
 16 .comment      00000843  00000000  00000000  00022b79  2**0
                  CONTENTS, READONLY

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