[llvm-bugs] [Bug 35351] New: llvm-readobj missing "File: lib.a(file.o)" info when dumping .a files.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 17 10:54:58 PST 2017


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

            Bug ID: 35351
           Summary: llvm-readobj missing "File: lib.a(file.o)" info when
                    dumping .a files.
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: huangs at google.com
                CC: llvm-bugs at lists.llvm.org

When llvm-readobj runs on a .a file, the output is missing

  File: lib.a(file.o)

info that tells you where the dump come from.

Example: Assume $LLVM_PATH set to LLVM output binaries directory, 

  set LLVM_PATH=/.../bin/

Run the following to create test.a and dump it using readelf and llvm-readobj:

  echo 'void foo() {}' | $LLVM_PATH/clang -x c++ - -c -o a.o
  echo 'void bar() {}' | $LLVM_PATH/clang -x c++ - -c -o b.o
  $LLVM_PATH/llvm-ar rs test.a a.o b.o
  readelf -S -W test.a > out1
  $LLVM_PATH/llvm-readobj -S -W -elf-output-style=GNU test.a > out2
  diff out1 out2

Expected output: <Empty>

Actual output:
1,2d0
< 
< File: test.a(a.o)
19,20d16
< 
< File: test.a(b.o)

-- 
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/20171117/ed51e1e9/attachment.html>


More information about the llvm-bugs mailing list