can not load ELF file generated with IAR using gdb

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Some code is generated using IAR; I need to load it in my dev board using arm-gdb
(bare metal from http://www.codesourcery.com/gnu_toolchains/arm /).

Bootstrap.elf is the file generated with IAR. You can see attached some dump of
objdump.

When loading it into ram using gdb:

Start address 0x10000000, load size 0
Transfer rate: 0 bits in <1 sec.

this does not sound good at all: any one could help me track why gdb does not
find
any code to load when there are hundreds of instructions ?

arm/ocr-start-elf32.elf is generated using arm-gcc, and obviously, there are good
datas to send.

Here is the gdb script:
#!/home/edhp/ARM-gcc/bare_metal/bin/arm-none-eabi-gdb --command
printf "*\tConnecting to target ...\n"
target remote 192.168.12.2:2001
printf "*\tLoading ocr-start ...\n"
load arm/ocr-start-elf32.elf
printf "*\tLoading bootstrap ...\n"
load arm/topbraille.hex
printf "*\tall done.\n"
#info registers
printf "*\texiting ...\n"
quit

here is the script log:
GNU gdb 6.3.50.20050325-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-none-eabi".
*       Connecting to target ...
0x10000000 in ?? ()
*       Loading ocr-start ...
Loading section .text, size 0x98 lma 0x9100000
Start address 0x9100000, load size 152
Transfer rate: 1216 bits in <1 sec, 152 bytes/write.
*       Loading bootstrap ...
Start address 0x10000000, load size 0
Transfer rate: 0 bits in <1 sec.
*       all done.
*       exiting ...

gdb connects to an ethernet JTAG and shall load 2 files in RAM and Flash to
program
the board.

I DO NOT NEED to be able to debug the bootstrap part. So, if from that funny elf
it
is possible to extract code, binary, hex or S19 segments (even if I need to write
scripts or C code), this does not matter. I just need to be able to load that
bootstrap and start the target. I dont need to debug it.

I have tried to load my files using the telnet interface of the JTAG, but it does
not recognise the ELF format, and I dont know which alternative format gcc-ld
could
produce that the JTAG could understand.

JTAG is an ethernet BDI2000 from abatron.

Those programs are run standalone: there is no system around. The whole system is
coded from scratch.

Note that parts of code are strode at various places:

libocr at 0x9100000 or 0x9200000 or 0x9300000; when the bootstrap has parts at
0x9000000 and other ones at 0x1000000 ... in fact, I expect gdb getting confused
when it sees jumps backward in the memory management, or maybe because the .text
zone of the elf is empty ? ... not really sure why it bugs (if I were, I d not
ask
your help).

Thanks.

********************************************************************************

arm-none-eabi-objdump -i arm/bootstrap.elf
BFD header file version 2.15.96 20050323
elf32-littlearm
 (header little endian, data little endian)
  arm
elf32-bigarm
 (header big endian, data big endian)
  arm
elf32-little
 (header little endian, data little endian)
  arm
elf32-big
 (header big endian, data big endian)
  arm
srec
 (header endianness unknown, data endianness unknown)
  arm
symbolsrec
 (header endianness unknown, data endianness unknown)
  arm
tekhex
 (header endianness unknown, data endianness unknown)
  arm
binary
 (header endianness unknown, data endianness unknown)
  arm
ihex
 (header endianness unknown, data endianness unknown)
  arm
               elf32-littlearm elf32-bigarm elf32-little elf32-big srec
           arm elf32-littlearm elf32-bigarm elf32-little elf32-big srec

               symbolsrec tekhex binary ihex
           arm symbolsrec tekhex binary ihex

*******************************************************************************

arm-none-eabi-objdump -x arm/bootstrap.elf

arm/bootstrap.elf:     file format elf32-littlearm
arm/bootstrap.elf
architecture: arm, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x10000000

Program Header:
    LOAD off    0x00000034 vaddr 0x00202000 paddr 0x00202000 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00202004 paddr 0x00202004 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00202008 paddr 0x00202008 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00202014 paddr 0x00202014 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00205000 paddr 0x00205000 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00205004 paddr 0x00205004 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00205008 paddr 0x00205008 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0020500c paddr 0x0020500c align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00205010 paddr 0x00205010 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00205014 paddr 0x00205014 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00205018 paddr 0x00205018 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0020501c paddr 0x0020501c align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00205020 paddr 0x00205020 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00205024 paddr 0x00205024 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00205034 paddr 0x00205034 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00209000 paddr 0x00209000 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00209004 paddr 0x00209004 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00209008 paddr 0x00209008 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0020900c paddr 0x0020900c align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00209010 paddr 0x00209010 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00209014 paddr 0x00209014 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00209018 paddr 0x00209018 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0020901c paddr 0x0020901c align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00209040 paddr 0x00209040 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00209044 paddr 0x00209044 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00209048 paddr 0x00209048 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00209080 paddr 0x00209080 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00209084 paddr 0x00209084 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0020908c paddr 0x0020908c align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00209090 paddr 0x00209090 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00209094 paddr 0x00209094 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00209098 paddr 0x00209098 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00217004 paddr 0x00217004 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00217008 paddr 0x00217008 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0021700c paddr 0x0021700c align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00217010 paddr 0x00217010 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0021c000 paddr 0x0021c000 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0021c004 paddr 0x0021c004 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0021c01c paddr 0x0021c01c align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0021c020 paddr 0x0021c020 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0021c038 paddr 0x0021c038 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0021c300 paddr 0x0021c300 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0021c304 paddr 0x0021c304 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0021c308 paddr 0x0021c308 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0021c31c paddr 0x0021c31c align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0021c320 paddr 0x0021c320 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0021c338 paddr 0x0021c338 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00223010 paddr 0x00223010 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00223014 paddr 0x00223014 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00223018 paddr 0x00223018 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0022301c paddr 0x0022301c align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00223020 paddr 0x00223020 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x0022303c paddr 0x0022303c align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00223040 paddr 0x00223040 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00223044 paddr 0x00223044 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00224000 paddr 0x00224000 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00224004 paddr 0x00224004 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x00224008 paddr 0x00224008 align 2**0
         filesz 0x00000000 memsz 0x00000004 flags rw-
    LOAD off    0x00000034 vaddr 0x091a0000 paddr 0x091a0000 align 2**2
         filesz 0x00000000 memsz 0x0000025e flags rw-
    LOAD off    0x00000034 vaddr 0x09200000 paddr 0x09200000 align 2**2
         filesz 0x00001ff0 memsz 0x00001ff0 flags r-x
    LOAD off    0x00002024 vaddr 0x09201ff0 paddr 0x09201ff0 align 2**2
         filesz 0x0000000c memsz 0x0000000c flags r--
    LOAD off    0x00002030 vaddr 0x09201ffc paddr 0x09201ffc align 2**2
         filesz 0x000000d0 memsz 0x000000d0 flags r--
    LOAD off    0x00002100 vaddr 0x092020cc paddr 0x092020cc align 2**0
         filesz 0x0000df34 memsz 0x0000df34 flags r-x
    LOAD off    0x00010034 vaddr 0x10000000 paddr 0x10000000 align 2**2
         filesz 0x00000048 memsz 0x00000048 flags r-x
    LOAD off    0x0001007c vaddr 0x10000048 paddr 0x10000048 align 2**0
         filesz 0x000000b8 memsz 0x000000b8 flags r-x
    LOAD off    0x00010134 vaddr 0x10000100 paddr 0x10000100 align 2**2
         filesz 0x00000138 memsz 0x00000138 flags r-x
    LOAD off    0x0001026c vaddr 0x10000238 paddr 0x10000238 align 2**0
         filesz 0x000000c8 memsz 0x000000c8 flags r-x
private flags = 2: [APCS-32] [FPA float format] [has entry point]

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .debug_info   0000396f  00000000  00000000  00011190  2**0
                  CONTENTS, READONLY, DEBUGGING
  1 .debug_abbrev 000000e4  00000000  00000000  00014b00  2**0
                  CONTENTS, READONLY, DEBUGGING
  2 .debug_line   0000123c  00000000  00000000  00014be4  2**0
                  CONTENTS, READONLY, DEBUGGING
  3 .debug_frame  0000036c  00000000  00000000  00015e20  2**0
                  CONTENTS, READONLY, DEBUGGING
SYMBOL TABLE:
10000040 l     F *ABS*  00000000 _?0
10000044 l     F *ABS*  00000000 _?1
10000204 l     F *ABS*  00000000 _?0
10000208 l     F *ABS*  00000000 _?1
1000020c l     F *ABS*  00000000 _?2
10000210 l     F *ABS*  00000000 _?3
10000214 l     F *ABS*  00000000 _?4
10000218 l     F *ABS*  00000000 _?5
1000021c l     F *ABS*  00000000 _?6
10000220 l     F *ABS*  00000000 _?7
10000224 l     F *ABS*  00000000 _?8
10000228 l     F *ABS*  00000000 _?9
1000022c l     F *ABS*  00000000 _?10
10000230 l     F *ABS*  00000000 _?11
10000234 l     F *ABS*  00000000 _?12
00001000 g     F *ABS*  00000000 _HEAP_SIZE
00001000 g     F *ABS*  00000000 _ABT_STACK_SIZE
00001000 g     F *ABS*  00000000 _UND_STACK_SIZE
00001000 g     F *ABS*  00000000 _FIQ_STACK_SIZE
00001000 g     F *ABS*  00000000 _IRQ_STACK_SIZE
00001000 g     F *ABS*  00000000 _CSTACK_SIZE
091fffff g     F *ABS*  00000000 RAMEND
091a0000 g     F *ABS*  00000000 RAMSTART
0920ffff g     F *ABS*  00000000 ROMEND
09200000 g     F *ABS*  00000000 ROMSTART
10000000 g     F *ABS*  00000000 __program_start
10000100 g     F *ABS*  00000000 ?cstartup
09200000 g     F *ABS*  00000000 ??EnI_a
09201ff0 g     O *ABS*  00000000 ?init?tab?DATA_Z
00209084 g     O *ABS*  00000004 DAR_CH0
0020908c g     O *ABS*  00000004 _A_CCR_CH0
00224008 g     O *ABS*  00000004 _A_CSISR
00209018 g     O *ABS*  00000004 _A_DBOSR
0020900c g     O *ABS*  00000004 _A_DBTOSR
00209004 g     O *ABS*  00000004 _A_DISR
00209010 g     O *ABS*  00000004 _A_DRTOSR
00209014 g     O *ABS*  00000004 _A_DSESR
00223044 g     O *ABS*  00000004 _A_FIVECSR
00223040 g     O *ABS*  00000004 _A_NIVECSR
00202014 g     O *ABS*  00000004 _A_TSTAT1
092000b4 g     F *ABS*  00000000 data_handler
09200148 g     F *ABS*  00000000 fast_dummy_isr
09200100 g     F *ABS*  00000000 fiq_handler
09200010 g     F *ABS*  00000000 initialisation_interruption
092000b8 g     F *ABS*  00000000 irq_handler
09200150 g     F *ABS*  00000000 norm_csi_isr
092001d8 g     F *ABS*  00000000 norm_dma_isr
0920014c g     F *ABS*  00000000 norm_dummy_isr
092002dc g     F *ABS*  00000000 norm_timer1_isr
092000b0 g     F *ABS*  00000000 prefetch_handler
092000ac g     F *ABS*  00000000 undef_handler
091a0100 g     O *ABS*  00000100 vector_fiq
091a0000 g     O *ABS*  00000100 vector_irq
00209080 g     O *ABS*  00000004 SAR_CH0
00209094 g     O *ABS*  00000004 _A_BLR_CH0
00224000 g     O *ABS*  00000004 _A_CSICR1
00224004 g     O *ABS*  00000004 _A_CSICR2
0020901c g     O *ABS*  00000004 _A_DBTOCR
00209000 g     O *ABS*  00000004 _A_DCR
0021c000 g     O *ABS*  00000004 _A_DDIR_A
0021c300 g     O *ABS*  00000004 _A_DDIR_D
00209008 g     O *ABS*  00000004 _A_DIMR
0021c01c g     O *ABS*  00000004 _A_DR_A
0021c31c g     O *ABS*  00000004 _A_DR_D
0021c020 g     O *ABS*  00000004 _A_GIUS_A
0021c320 g     O *ABS*  00000004 _A_GIUS_D
0021c038 g     O *ABS*  00000004 _A_GPR_A
00217008 g     O *ABS*  00000004 _A_I2CR
00217010 g     O *ABS*  00000004 _A_I2DR
0021700c g     O *ABS*  00000004 _A_I2SR
00217004 g     O *ABS*  00000004 _A_IFDR
00223010 g     O *ABS*  00000004 _A_INTENABLEH
00223014 g     O *ABS*  00000004 _A_INTENABLEL
00223018 g     O *ABS*  00000004 _A_INTTYPEH
0022301c g     O *ABS*  00000004 _A_INTTYPEL
0022303c g     O *ABS*  00000004 _A_NIPRIORITY0
00223020 g     O *ABS*  00000004 _A_NIPRIORITY7
0021c004 g     O *ABS*  00000004 _A_OCR1_A
0021c308 g     O *ABS*  00000004 _A_OCR2_D
00209090 g     O *ABS*  00000004 _A_RSSR_CH0
00209098 g     O *ABS*  00000004 _A_RTORBUCR_CH0
00209040 g     O *ABS*  00000004 _A_WSRA
00209044 g     O *ABS*  00000004 _A_XSRA
00209048 g     O *ABS*  00000004 _A_YSRA
092012ec g     O *ABS*  00000000 delai::??rA
09200fdc g     F *ABS*  00000000 ecriture_config_CMOS
09200d90 g     F *ABS*  00000000 ecriture_sccb
09200368 g     F *ABS*  00000000 initialisation_CMOS
09200960 g     F *ABS*  00000000 initialisation_sccb
09201064 g     F *ABS*  00000000 initialisation_transfer_dma
09200f5c g     F *ABS*  00000000 lecture_config_CMOS
09200b18 g     F *ABS*  00000000 lecture_sccb
09200a98 g     F *ABS*  00000000 verification_transmission_sccb
092013e4 g     O *ABS*  00000000 ??rA??EnI_a
0021c304 g     O *ABS*  00000004 _A_OCR1_D
09201ffc g     O *ABS*  00000056 adresse_config_CMOS
09202054 g     O *ABS*  00000078 adresse_image_memoire
091a025d g     O *ABS*  00000001 cmpt_image
091a0200 g     O *ABS*  00000056 config_CMOS
091a025c g     O *ABS*  00000001 defaut_sccb
092012f8 g     F *ABS*  00000000 initialisation
092013fc g     O *ABS*  00000000 initialisation_CMOS::??rA
092013cc g     O *ABS*  00000000 initialisation_interruption::??rA
09201408 g     O *ABS*  00000000 initialisation_lcd::??rA
092013d8 g     O *ABS*  00000000 initialisation_timer1::??rA
092013f0 g     O *ABS*  00000000 initialisation_transfer_dma::??rA
09201414 g     O *ABS*  00000000 lecture_config_CMOS::??rA
0920138c g     F *ABS*  00000000 main
091a0258 g     O *ABS*  00000002 tempo
091a025a g     O *ABS*  00000002 timeout_sccb
0020500c g     O *ABS*  00000004 _A_CPOS
0021c338 g     O *ABS*  00000004 _A_GPR_D
0020501c g     O *ABS*  00000004 _A_HCR
00205014 g     O *ABS*  00000004 _A_LCHCC
00205010 g     O *ABS*  00000004 _A_LCWHB
00205018 g     O *ABS*  00000004 _A_PCR
00205024 g     O *ABS*  00000004 _A_POS
00205034 g     O *ABS*  00000004 _A_RMCR
00205004 g     O *ABS*  00000004 _A_SIZE
00205000 g     O *ABS*  00000004 _A_SSA
00205020 g     O *ABS*  00000004 _A_VCR
00205008 g     O *ABS*  00000004 _A_VPW
09201ef0 g     O *ABS*  00000000 delai::??rA
09201420 g     F *ABS*  00000000 initialisation_lcd
00202008 g     O *ABS*  00000004 _A_TCMP1
00202000 g     O *ABS*  00000004 _A_TCTL1
00202004 g     O *ABS*  00000004 _A_TPRER1
09201fd0 g     F *ABS*  00000000 delai
09201efc g     F *ABS*  00000000 initialisation_timer1

************************************************************************


dump of the .text zone of the library I can sucessfully load into the board:
arm/ocr-start-elf32.elf:     file format elf32-littlearm
arm/ocr-start-elf32.elf
architecture: arm, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x09100000

Program Header:
    LOAD off    0x00008000 vaddr 0x09100000 paddr 0x09100000 align 2**15
         filesz 0x00000098 memsz 0x00000098 flags rwx
private flags = 4000002: [Version4 EABI] [has entry point]

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000098  09100000  09100000  00008000  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .glue_7       00000000  09100098  09100098  00008098  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .glue_7t      00000000  09100098  09100098  00008098  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  3 .data         00000000  09100098  09100098  00008098  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  4 .bss          00000000  09100098  09100098  00008098  2**0
                  ALLOC
  5 .comment      00000038  00000000  00000000  00008098  2**0
                  CONTENTS, READONLY
SYMBOL TABLE:
09100000 l    d  .text  00000000 .text
09100098 l    d  .glue_7        00000000 .glue_7
09100098 l    d  .glue_7t       00000000 .glue_7t
09100098 l    d  .data  00000000 .data
09100098 l    d  .bss   00000000 .bss
00000000 l    d  .comment       00000000 .comment
00000000 l    d  *ABS*  00000000 .shstrtab
00000000 l    d  *ABS*  00000000 .symtab
00000000 l    d  *ABS*  00000000 .strtab
00000000 l    df *ABS*  00000000 start.S
00000000 l    df *ABS*  00000000 main.c
09100020 g       .text  00000000 _test
09100010 g       .text  00000000 _init
09100038 g     F .text  00000014 pif
09100070 g     F .text  00000010 ocr_cache_init
09100000 g       .text  00000000 _start
0910004c g     F .text  00000024 main
09100030 g     F .text  00000008 plop
09100080 g     F .text  00000018 ocr_cache_test

****************************************************************************

edhp@pluton:/home/tftproot/projects$ arm-none-eabi-objdump -S arm/bootstrap.elf

arm/bootstrap.elf:     file format elf32-littlearm

edhp@pluton:/home/tftproot/projects$ arm-none-eabi-objdump -S
arm/ocr-start-elf32.elf

arm/ocr-start-elf32.elf:     file format elf32-littlearm

Disassembly of section .text:

09100000 <_start>:
 9100000:       ea000011        b       910004c <main>
 9100004:       e1a0f00e        mov     pc, lr
 9100008:       e1a00000        nop                     (mov r0,r0)
 910000c:       e1a00000        nop                     (mov r0,r0)

09100010 <_init>:
 9100010:       ea000016        b       9100070 <ocr_cache_init>
 9100014:       e1a0f00e        mov     pc, lr
 9100018:       e1a00000        nop                     (mov r0,r0)
 910001c:       e1a00000        nop                     (mov r0,r0)

09100020 <_test>:
 9100020:       ea000016        b       9100080 <ocr_cache_test>
 9100024:       e1a0f00e        mov     pc, lr
 9100028:       e1a00000        nop                     (mov r0,r0)
 910002c:       e1a00000        nop                     (mov r0,r0)

09100030 <plop>:
 9100030:       e3a00028        mov     r0, #40 ; 0x28
 9100034:       e1a0f00e        mov     pc, lr

09100038 <pif>:
 9100038:       e5903000        ldr     r3, [r0]
 910003c:       e2833005        add     r3, r3, #5      ; 0x5
 9100040:       e5803000        str     r3, [r0]
 9100044:       e3a00000        mov     r0, #0  ; 0x0
 9100048:       e1a0f00e        mov     pc, lr

0910004c <main>:
 910004c:       e52de004        str     lr, [sp, #-4]!
 9100050:       e3a03003        mov     r3, #3  ; 0x3
 9100054:       e24dd00c        sub     sp, sp, #12     ; 0xc
 9100058:       e28d0008        add     r0, sp, #8      ; 0x8
 910005c:       e5203004        str     r3, [r0, #-4]!
 9100060:       ebfffff4        bl      9100038 <pif>
 9100064:       e59d0004        ldr     r0, [sp, #4]
 9100068:       e28dd00c        add     sp, sp, #12     ; 0xc
 910006c:       e8bd8000        ldmia   sp!,

09100070 <ocr_cache_init>:
 9100070:       e3a00000        mov     r0, #0  ; 0x0
 9100074:       e3a03302        mov     r3, #134217728  ; 0x8000000
 9100078:       e5830000        str     r0, [r3]
 910007c:       e1a0f00e        mov     pc, lr

09100080 <ocr_cache_test>:
 9100080:       e3a02302        mov     r2, #134217728  ; 0x8000000
 9100084:       e5923000        ldr     r3, [r2]
 9100088:       e3a00000        mov     r0, #0  ; 0x0
 910008c:       e2833001        add     r3, r3, #1      ; 0x1
 9100090:       e5823000        str     r3, [r2]
 9100094:       e1a0f00e        mov     pc, lr


as you can see, objdump can list and disassemble the libocr but not the
bootstrap,
even thought objdump -x still can list the addresses of routines.


--
DEMAINE Benoit-Pierre (aka DoubleHP ) http://www.demaine.info /
\_o< If computing were an exact science, IT engineers would not have work >o_/

Site Timeline