[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/21507] New: objdump: Incorrect jump label in disassemble f
From: |
msmttchr at gmail dot com |
Subject: |
[Bug binutils/21507] New: objdump: Incorrect jump label in disassemble for arm object file |
Date: |
Sat, 20 May 2017 18:31:14 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=21507
Bug ID: 21507
Summary: objdump: Incorrect jump label in disassemble for arm
object file
Product: binutils
Version: 2.28
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: msmttchr at gmail dot com
Target Milestone: ---
Consider this simple C program:
int g(void)
{
}
int f(void)
{
g();
}
After compiling it with arm gcc toolchain as follow:
arm-none-eabi-gcc -mthumb -mcpu=cortex-m0 -O0 -g -ffunction-sections -c -o
file.o file.c
You run objdump to see the disassemble of the ELF object file:
objdump -d file.o
file.o: file format elf32-littlearm
Disassembly of section .text.g:
00000000 <g>:
0: b580 push {r7, lr}
2: af00 add r7, sp, #0
4: 46c0 nop ; (mov r8, r8)
6: 0018 movs r0, r3
8: 46bd mov sp, r7
a: bd80 pop {r7, pc}
Disassembly of section .text.f:
00000000 <f>:
0: b580 push {r7, lr}
2: af00 add r7, sp, #0
4: f7ff fffe bl 0 <f> <<<<< This label should be <g> >>>>>>
8: 46c0 nop ; (mov r8, r8)
a: 0018 movs r0, r3
c: 46bd mov sp, r7
e: bd80 pop {r7, pc}
In function f, the jump instruction 'bl' is showing a label '<f>' as if the
function was calling itself.
In reality the jump label should be '<g>'.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/21507] New: objdump: Incorrect jump label in disassemble for arm object file,
msmttchr at gmail dot com <=