Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to read the object dump file of gcc compiler for cortex-m3

Status
Not open for further replies.

raghavkmr

Junior Member level 2
Joined
Nov 26, 2013
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
194
Hi, i compiled the following code

Code:
#include<stdio.h>
main()
{
printf("helloworld");
}

using arm-gcc cross compiler and dumped its objdump file ,the executable is prefectly running on uclinux on cortex m3,can you tell me what each column represents in that file , a few lines are given below


Code:
...
.
00000064 <main>:
      64:	4801      	ldr	r0, [pc, #4]	; (6c <main+0x8>)
      66:	f000 b803 	b.w	70 <printf>
      6a:	bf00      	nop
      6c:	00004540 	.word	0x00004540

00000070 <printf>:
      70:	b40f      	push	{r0, r1, r2, r3}
      72:	4b06      	ldr	r3, [pc, #24]	; (8c <printf+0x1c>)
      74:	b507      	push	{r0, r1, r2, lr}
      76:	aa04      	add	r2, sp, #16
      78:	6818      	ldr	r0, [r3, #0]
      7a:	f852 1b04 	ldr.w	r1, [r2], #4
      7e:	9201      	str	r2, [sp, #4]
      80:	f000 f864 	bl	14c <vfprintf>
      84:	e8bd 400e 	ldmia.w	sp!, {r1, r2, r3, lr}
      88:	b004      	add	sp, #16
      8a:	4770      	bx	lr
      8c:	00004640 	.word	0x00004640

00000090 <_stdio_init>:
      90:	4b0c      	ldr	r3, [pc, #48]	; (c4 <_stdio_init+0x34>)
      92:	2000      	movs	r0, #0
.....
.
 

This is the code that is a result of you compilation process in Assembly.
So you wrote your C code, and passed it to the GCC, the gcc then made this assembly code out of your helloworld program.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top