[llvm-bugs] [Bug 31788] New: [yaml2obj] Repeated symbol name: 'crtstuff.c' for simple ELF.

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jan 28 02:37:03 PST 2017


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

            Bug ID: 31788
           Summary: [yaml2obj] Repeated symbol name: 'crtstuff.c' for
                    simple ELF.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: jonas at devlieghere.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 17907
  --> https://llvm.org/bugs/attachment.cgi?id=17907&action=edit
yaml output

I run into the following error when processing a very simple ELF with obj2yaml
and yaml2obj. I'm not sure which of the two is at fault here. Tested with
release_40 branch and trunk. 

$ cat simple.c 
int main() {
  return 0;
}

$ clang -v
clang version 5.0.0 (http://llvm.org/git/clang.git
0ed751a33b17198220a272e69f0a25f30224c3c2) (http://llvm.org/git/llvm.git
194c9f4ba156d7249ad5f1e4558c8c30728b65f9)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jonas/dev/llvm-trunk/build/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.2.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.2.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.2.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
Found CUDA installation: /usr/local/cuda, version 8.0

$ clang simple.c -o simple

$ obj2yaml simple > simple.yml

$ yaml2obj simple.yml > simple_from_yaml
error: Repeated symbol name: 'crtstuff.c'.

The same thing happens whether I compile simple.c with clang or GCC. However
for GCC obj2yaml didn't work at first (4.0 branch), but that was fixed by
https://reviews.llvm.org/rL293224 and now works for me on trunk.

-- 
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/20170128/344b1759/attachment.html>


More information about the llvm-bugs mailing list