[llvm-bugs] [Bug 49135] New: --disassemble-symbols does not work for symbols defined in module assembly

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 10 17:49:04 PST 2021


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

            Bug ID: 49135
           Summary: --disassemble-symbols does not work for symbols
                    defined in module assembly
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-objdump
          Assignee: unassignedbugs at nondot.org
          Reporter: yuanfang.chen at sony.com
                CC: llvm-bugs at lists.llvm.org

// asm.ll
target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

module asm ".global foo"
module asm ".equ foo, p1"

define internal i32 @p1(i32 %0) {
  %2 = add nsw i32 %0, 1
  ret i32 %2
}


> llc -filetype=obj asm.ll -o asm.o
> llvm-nm asm.o
0000000000000000 T foo
0000000000000000 t p1
> llvm-objdump --disassemble-symbols=foo asm.o

asm.o:  file format elf64-x86-64

> llvm-objdump --disassemble-symbols=p1 asm.o

asm.o:  file format elf64-x86-64


Disassembly of section .text:

0000000000000000 <p1>:
       0: 8d 47 01                      leal    1(%rdi), %eax
       3: c3                            retq

-- 
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/20210211/cd5ccadd/attachment.html>


More information about the llvm-bugs mailing list