This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
question on arm objdump
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Mon, 3 Aug 2009 11:01:22 -0500
- Subject: question on arm objdump
Hi,
I am trying to analyse an objdump of code from
an ep7312 (arm7tdmi) and I see a number of places
at the end of subroutines with odd .word directives.
My guess is that they are part of a trick
used by gcc to get absolute addresses of global
variables.
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
fe18: e59f3008 ldr r3, [pc, #8] ; fe28
<sched_get_priority_max+0x30>
fe1c: e5d30000 ldrb r0, [r3]
fe20: e2400001 sub r0, r0, #1 ; 0x1
}
fe24: e49df004 pop {pc} ; (ldr pc, [sp], #4)
fe28: 00018090 .word
0x00018090
From the symbol table:
00018090 D rtems_maximum_priority
So I think it is using a pc-relative instruction to
fetch the address of rtems_maximum_priority and then
loading that.
Am I right in my interpretation?
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985