[llvm-bugs] [Bug 46088] New: llvm-objdump print wrong function symbol of b instruction

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 26 19:44:25 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46088

            Bug ID: 46088
           Summary: llvm-objdump print wrong function symbol of b
                    instruction
           Product: new-bugs
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: 499537630 at qq.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

llvm-objdump print wrong symbol of b instruction(or other b instructions):

$ cat testb.s 
 .syntax unified
 .section .text, "ax",%progbits
 .globl _start
 .type _start,%function
_start:
 b   func

.global func
.type func,%function
func = 0x2000

llvm-mc -arm-add-build-attributes -filetype=obj
-triple=armv7a-none-linux-gnueabi testb.s -o testb.o

$ llvm-objdump -d testb.o

testb.o:        file format ELF32-arm-little

Disassembly of section .text:
0000000000000000 _start:
       0: fe 07 00 ea                   b       #8184 <_start+0x2000>

but it's wrong when adding triple:

llvm-objdump -d -triple=thumbv7a-linux-gnueabihf testb.o

testb.o:        file format ELF32-arm-little

Disassembly of section .text:
0000000000000000 _start:
       0: fe 07 00 ea                   b       #8184 <_start+0x1ffc>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200527/21ada248/attachment.html>


More information about the llvm-bugs mailing list